Commit c9d53052 authored by daywrite's avatar daywrite

表单配置选项

parent 2de7ef32
...@@ -8560,15 +8560,6 @@ ...@@ -8560,15 +8560,6 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
"dev": true "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": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz", "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
...@@ -8580,6 +8571,15 @@ ...@@ -8580,6 +8571,15 @@
"strip-ansi": "3.0.1" "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": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz",
......
...@@ -11,7 +11,22 @@ export default { ...@@ -11,7 +11,22 @@ export default {
computed: { computed: {
createdByArray () { 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) return ret && [].concat(ret.value)
} }
}, },
...@@ -21,6 +36,10 @@ export default { ...@@ -21,6 +36,10 @@ export default {
return `Schedules[${key}]` return `Schedules[${key}]`
}, },
getArrayByKey (key) {
return this.retNewArray.find(item => item.key === this.selectKeyFormat(key))
},
initSetting (params) { initSetting (params) {
let methods = this.$options && this.$options.methods let methods = this.$options && this.$options.methods
params.forEach(item => { params.forEach(item => {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:inputWidth="340" :inputWidth="340"
:startLoadInitial="false"/> :startLoadInitial="false"/>
</el-form-item> </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 <el-input
class="ec-input-normal" class="ec-input-normal"
type="textarea" type="textarea"
...@@ -16,15 +16,17 @@ ...@@ -16,15 +16,17 @@
</el-input> </el-input>
<span class="tips">待办事项内容不能为空</span> <span class="tips">待办事项内容不能为空</span>
</el-form-item> </el-form-item>
<el-form-item label="待办时间" prop="actName" class="ec-clear-left"> <el-form-item label="待办时间" prop="time_type" class="ec-clear-left">
<el-date-picker <el-select v-model="model.time_type" placeholder="请选择" size="small">
size="small" <el-option
v-model="model.time_type" v-for="item in timeTypeArray"
type="datetime" :key="item.key"
placeholder="选择日期时间"> :label="item.name"
</el-date-picker> :value="item.id">
</el-option>
</el-select>
</el-form-item> </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 <el-date-picker
size="small" size="small"
v-model="model.start_at" v-model="model.start_at"
...@@ -32,7 +34,7 @@ ...@@ -32,7 +34,7 @@
placeholder="选择日期时间"> placeholder="选择日期时间">
</el-date-picker> </el-date-picker>
</el-form-item> </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 <el-date-picker
size="small" size="small"
v-model="model.end_at" v-model="model.end_at"
...@@ -40,15 +42,17 @@ ...@@ -40,15 +42,17 @@
placeholder="选择日期时间"> placeholder="选择日期时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="提醒时间" prop="actName" class="ec-clear-left"> <el-form-item label="提醒时间" prop="alarm_before" class="ec-clear-left">
<el-date-picker <el-select v-model="model.alarm_before" placeholder="请选择" size="small">
size="small" <el-option
v-model="model.alarm_before" v-for="item in alarmBeforeArray"
type="datetime" :key="item.key"
placeholder="选择日期时间"> :label="item.name"
</el-date-picker> :value="item.id">
</el-option>
</el-select>
</el-form-item> </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 <el-input
class="ec-input-normal" class="ec-input-normal"
type="textarea" type="textarea"
...@@ -56,15 +60,18 @@ ...@@ -56,15 +60,18 @@
v-model.trim="model.description"> v-model.trim="model.description">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="重复" prop="actName" class="ec-clear-left"> <el-form-item label="重复" prop="repeat_type" class="ec-clear-left">
<el-input <el-select v-model="model.repeat_type" placeholder="请选择" size="small">
class="ec-input-normal" <el-option
size="mini" v-for="item in repeatTypeArray"
v-model.trim="model.actMsg"> :key="item.key"
</el-input> :label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="负责人" prop="actName" class="ec-clear-left"> <el-form-item label="负责人" prop="created_by" class="ec-clear-left">
<el-select v-model="model.created_by" placeholder="请选择"> <el-select v-model="model.created_by" placeholder="请选择" size="small">
<el-option <el-option
v-for="item in createdByArray" v-for="item in createdByArray"
:key="item.key" :key="item.key"
......
...@@ -25,6 +25,12 @@ export default { ...@@ -25,6 +25,12 @@ export default {
model: { model: {
client_id: '', client_id: '',
schedule_title: '', schedule_title: '',
start_at: '',
end_at: '',
alarm_before: '',
description: '',
time_type: '',
repeat_type: '',
created_by: '' // 负责人 created_by: '' // 负责人
} }
} }
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<div class="page-body-content"> <div class="page-body-content">
<ScheduleItem <ScheduleItem
v-for="item in result.list" v-for="item in result.list"
:item="item"> :item="item"
:key="item.id">
</ScheduleItem> </ScheduleItem>
</div> </div>
<Pagenation <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