Commit c9d53052 authored by daywrite's avatar daywrite

表单配置选项

parent 2de7ef32
......@@ -8560,15 +8560,6 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
"dev": true
},
"string_decoder": {
"version": "1.1.1",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz",
"integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
......@@ -8580,6 +8571,15 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz",
"integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz",
......
......@@ -11,7 +11,22 @@ export default {
computed: {
createdByArray () {
let ret = this.retNewArray.find(item => item.key === this.selectKeyFormat('created_by'))
let ret = this.getArrayByKey('created_by')
return ret && [].concat(ret.value)
},
timeTypeArray () {
let ret = this.getArrayByKey('time_type')
return ret && [].concat(ret.value)
},
alarmBeforeArray () {
let ret = this.getArrayByKey('alarm_before')
return ret && [].concat(ret.value)
},
repeatTypeArray () {
let ret = this.getArrayByKey('repeat_type')
return ret && [].concat(ret.value)
}
},
......@@ -21,6 +36,10 @@ export default {
return `Schedules[${key}]`
},
getArrayByKey (key) {
return this.retNewArray.find(item => item.key === this.selectKeyFormat(key))
},
initSetting (params) {
let methods = this.$options && this.$options.methods
params.forEach(item => {
......
......@@ -7,7 +7,7 @@
:inputWidth="340"
:startLoadInitial="false"/>
</el-form-item>
<el-form-item label="待办事项内容" prop="actMsg" class="ec-clear-left ec-form-item-lg is-required">
<el-form-item label="待办事项内容" prop="schedule_title" class="ec-clear-left ec-form-item-lg is-required">
<el-input
class="ec-input-normal"
type="textarea"
......@@ -16,15 +16,17 @@
</el-input>
<span class="tips">待办事项内容不能为空</span>
</el-form-item>
<el-form-item label="待办时间" prop="actName" class="ec-clear-left">
<el-date-picker
size="small"
v-model="model.time_type"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
<el-form-item label="待办时间" prop="time_type" class="ec-clear-left">
<el-select v-model="model.time_type" placeholder="请选择" size="small">
<el-option
v-for="item in timeTypeArray"
:key="item.key"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="actName" class="ec-clear-left">
<el-form-item label="开始时间" prop="start_at" class="ec-clear-left">
<el-date-picker
size="small"
v-model="model.start_at"
......@@ -32,7 +34,7 @@
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="actName" class="ec-clear-left">
<el-form-item label="结束时间" prop="end_at" class="ec-clear-left">
<el-date-picker
size="small"
v-model="model.end_at"
......@@ -40,15 +42,17 @@
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="提醒时间" prop="actName" class="ec-clear-left">
<el-date-picker
size="small"
v-model="model.alarm_before"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
<el-form-item label="提醒时间" prop="alarm_before" class="ec-clear-left">
<el-select v-model="model.alarm_before" placeholder="请选择" size="small">
<el-option
v-for="item in alarmBeforeArray"
:key="item.key"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="actMsg" class="ec-clear-left ec-form-item-lg">
<el-form-item label="备注" prop="description" class="ec-clear-left ec-form-item-lg">
<el-input
class="ec-input-normal"
type="textarea"
......@@ -56,15 +60,18 @@
v-model.trim="model.description">
</el-input>
</el-form-item>
<el-form-item label="重复" prop="actName" class="ec-clear-left">
<el-input
class="ec-input-normal"
size="mini"
v-model.trim="model.actMsg">
</el-input>
<el-form-item label="重复" prop="repeat_type" class="ec-clear-left">
<el-select v-model="model.repeat_type" placeholder="请选择" size="small">
<el-option
v-for="item in repeatTypeArray"
:key="item.key"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="负责人" prop="actName" class="ec-clear-left">
<el-select v-model="model.created_by" placeholder="请选择">
<el-form-item label="负责人" prop="created_by" class="ec-clear-left">
<el-select v-model="model.created_by" placeholder="请选择" size="small">
<el-option
v-for="item in createdByArray"
:key="item.key"
......
......@@ -25,6 +25,12 @@ export default {
model: {
client_id: '',
schedule_title: '',
start_at: '',
end_at: '',
alarm_before: '',
description: '',
time_type: '',
repeat_type: '',
created_by: '' // 负责人
}
}
......
......@@ -5,7 +5,8 @@
<div class="page-body-content">
<ScheduleItem
v-for="item in result.list"
:item="item">
:item="item"
:key="item.id">
</ScheduleItem>
</div>
<Pagenation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment