diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue index 32bda2d..ba230b3 100644 --- a/src/components/XyDialog/index.vue +++ b/src/components/XyDialog/index.vue @@ -144,6 +144,7 @@ export default { if(form.hasOwnProperty(key) && $scopedSlots[key]){ formItems.push( {eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)} diff --git a/src/const/inputType.js b/src/const/inputType.js index 91d8ebc..317c287 100644 --- a/src/const/inputType.js +++ b/src/const/inputType.js @@ -8,6 +8,7 @@ export const domMap = new Map([ ["file","el-upload"], ["files","el-upload"], ["textarea", "el-input"], + ["placeholdertext","div"], ["map", "my-map"], diff --git a/src/utils/createDialog.js b/src/utils/createDialog.js index 279203e..8898d51 100644 --- a/src/utils/createDialog.js +++ b/src/utils/createDialog.js @@ -67,6 +67,9 @@ export class CreateDialog { } optionsRender(h, info) { let that = this.self; + if(info.edit_input==='placeholdertext'){ + return info.placeholdertext + } if (info.edit_input === "checkbox" || info.edit_input === "radio") { return info._params && info._params instanceof Array ? info._params.map((i) => @@ -173,7 +176,7 @@ export class CreateDialog { }, props: { model: that.form, - labelWidth: "80px", + labelWidth: "120px", rules: that.rules, labelPosition: "right", size: "small", @@ -194,6 +197,7 @@ export class CreateDialog { style: { width: "100%", }, + class:i.field, props: { label: i.name, prop: i.field, diff --git a/src/views/category/component/create.vue b/src/views/category/component/create.vue index 076aee3..b9239b3 100644 --- a/src/views/category/component/create.vue +++ b/src/views/category/component/create.vue @@ -1,5 +1,6 @@ diff --git a/src/views/fill/index.vue b/src/views/fill/index.vue new file mode 100644 index 0000000..640d0e5 --- /dev/null +++ b/src/views/fill/index.vue @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + {{item}} + + + + + + + + 查看 + + + + + + + + + + + + + + + diff --git a/src/views/h5/home/index.vue b/src/views/h5/home/index.vue index 98b6b2f..e684af3 100644 --- a/src/views/h5/home/index.vue +++ b/src/views/h5/home/index.vue @@ -1,17 +1,287 @@ - - + + + + {{item}} + + + + + + + + + + + + + + + + + 点击上传 + + + + + + + + 立即创建 + 取消 + + + + + + diff --git a/src/views/h5/login/login.vue b/src/views/h5/login/login.vue index 139e40e..9828729 100644 --- a/src/views/h5/login/login.vue +++ b/src/views/h5/login/login.vue @@ -174,7 +174,7 @@ export default { .then(() => { console.log(this.redirect); this.$router.push({ - path: this.redirect || "/h5", + path: this.redirect || "/h5/index", }); this.loading = false; }) diff --git a/src/views/person/component/create.vue b/src/views/person/component/create.vue index 23fb365..b6e71c6 100644 --- a/src/views/person/component/create.vue +++ b/src/views/person/component/create.vue @@ -10,7 +10,7 @@ export default { render(h) { let dialog = new CreateDialog(this,[ ],{ - width: "480px" + width: "570px" }) return dialog.render() }, @@ -20,29 +20,43 @@ export default { row: {}, formInfo: [ { - name: '姓名', - field: 'name', - edit_input: 'text', - form_show: true + name: "部门", + field: "department_id", + edit_input: "radio", + form_show: true, + _params: [] }, { - name: '职位', - field: 'position', - edit_input: 'text', - form_show: true + name: "人员类型", + field: "person_type", + edit_input: "radio", + form_show: true, + _params: [] }, { - name: '是否在职', - field: 'is_active', - edit_input: 'el-switch', - form_show: true, - _props: { - "active-text": "是", - "inactive-text": "否", - "active-value": 1, - "inactive-value": 0, - } + name: '姓名', + field: 'name', + edit_input: 'text', + form_show: true }, + // { + // name: '职位', + // field: 'position', + // edit_input: 'text', + // form_show: true + // }, + // { + // name: '是否在职', + // field: 'is_active', + // edit_input: 'el-switch', + // form_show: true, + // _props: { + // "active-text": "是", + // "inactive-text": "否", + // "active-value": 1, + // "inactive-value": 0, + // } + // }, { name: '用户名', field: 'username', @@ -59,20 +73,23 @@ export default { } }, { - name: "部门", - field: "department_id", - edit_input: "radio", - form_show: true, - _params: [] + name: '开始填报日期', + field: 'start_date', + edit_input: 'date', + form_show: true + }, + { + name: '结束填报日期', + field: 'end_date', + edit_input: 'date', + form_show: true }, { - name: '排序值', - field: 'myindex', - edit_input: 'el-input-number', + name: '', + field: '', + edit_input: 'placeholdertext', + placeholdertext:'留空表示填报状态持续开启,不留空系统会自动刷新填报状态', form_show: true, - _props: { - controls: false - } } ], id: "", @@ -82,14 +99,14 @@ export default { originalForm: {}, rules: { name: [ - { required: true,message: "请填写清单名称" } - ], - position: [ - { required: true,message: "请填写职位" } - ], - is_active: [ - { required: true,message: "请选择是否在职" } + { required: true,message: "请填写姓名" } ], + // position: [ + // { required: true,message: "请填写职位" } + // ], + // is_active: [ + // { required: true,message: "请选择是否在职" } + // ], department_id: [ { required: true,message: "请选择部门" } ], diff --git a/src/views/person/component/createType.vue b/src/views/person/component/createType.vue new file mode 100644 index 0000000..badf31c --- /dev/null +++ b/src/views/person/component/createType.vue @@ -0,0 +1,107 @@ + + + + + + + *人员类型: + + + + + + + + + + 清单类型: + + + + {{item.title}} + + + + + + + + 排序: + + + + + + + + + + + + + + diff --git a/src/views/person/component/createTypeSetting.vue b/src/views/person/component/createTypeSetting.vue new file mode 100644 index 0000000..405d97b --- /dev/null +++ b/src/views/person/component/createTypeSetting.vue @@ -0,0 +1,73 @@ + + + + + + + + + {{item.title}} + + + + + + + + + + + + + diff --git a/src/views/person/person.vue b/src/views/person/person.vue index b90b035..8a4a7f4 100644 --- a/src/views/person/person.vue +++ b/src/views/person/person.vue @@ -10,6 +10,17 @@ + + 填报状态: + + {{ item.label }} + + + + + + { - return val ? "在职" : "离职" - } + prop: "person.name", + label: "人员类别", + width: 120 }, { - prop: "username", - label: "用户名" + prop: "start_date", + label: "开始填报日期", + width: 160 }, { - prop: "department.name", - label: "部门", - width: 200 + prop: "end_date", + label: "结束填报日期", + width: 160 }, + { + prop: "status", + label: "填报状态", + width: 160, + customFn: (row) => { + return ( { + + } + } + }>) + } + }, + // { + // prop: "position", + // label: "职位" + // }, + // { + // prop: "is_active", + // label: "是否在职", + // width: 80, + // formatter:(v1,v2,val) => { + // return val ? "在职" : "离职" + // } + // }, + { + prop: "username", + label: "用户名" + }, + { width: 80, prop: "myindex", diff --git a/src/views/person/personType.vue b/src/views/person/personType.vue new file mode 100644 index 0000000..86ee483 --- /dev/null +++ b/src/views/person/personType.vue @@ -0,0 +1,135 @@ + + + + + + + + + + + 新增 + + + + + + + + { + $refs['createType'].setId(row.id); + $refs['createType'].setType('editor'); + $refs['createType'].show(); + }"> + + + + + + + 确定要删除吗? + + 取消 + 确定 + + + + + + 删除 + + + + 编辑 + 设置清单类型 + + + + + + + + + + + + + +
确定要删除吗?