diff --git a/src/icons/svg/jiaban.svg b/src/icons/svg/jiaban.svg
new file mode 100644
index 0000000..6bec1b5
--- /dev/null
+++ b/src/icons/svg/jiaban.svg
@@ -0,0 +1 @@
+
diff --git a/src/utils/formBuilder.js b/src/utils/formBuilder.js
index a96c46d..e0200de 100644
--- a/src/utils/formBuilder.js
+++ b/src/utils/formBuilder.js
@@ -518,7 +518,6 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
custom_model_id: info.stub
}).then(res => {
this.$set(this.flows, info.name, res.data.data)
- console.log(this.flows)
})
}
formItem = h(
@@ -648,11 +647,13 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
const $table = this.$refs[`subForm-${info.name}`];
if ($table) {
const record = {};
- const { row: newRow } = await $table.insert(
- record
- );
+ this.form[info.name].unshift(record)
+ // 临时数据不好验证长度
+ // const { row: newRow } = await $table.insert(
+ // record
+ // );
await this.$nextTick();
- await $table.setEditRow(newRow);
+ await $table.setEditRow(record);
}
},
},
@@ -789,7 +790,6 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
custom_model_id: info.stub
}).then(res => {
this.$set(this.flows, info.name, res.data.data)
- console.log(this.flows)
})
}
formItem = h(
@@ -901,10 +901,12 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
if (formItem) {
let jointlySignContent = []
+ let isJointly = false
this.jointlySignLog.forEach(log => {
const data = JSON.parse(log.data)
Object.entries(data).forEach(([key, value]) => {
if (value.hasOwnProperty('custom_field_id') && (value['custom_field_id'] === info.id)) {
+ isJointly = log.is_jointly_sign
jointlySignContent.push(h('div',[
h('span', value.value),
h('br'),
@@ -946,8 +948,8 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
"grid-row-end": info.gs_y + 1 + (info.name === 'flow_title' ? 0 : 1) + info.gs_height,
},
},
- [(/\/detail/.test(this.$route.path) && this.$route.query.flow_id && jointlySignContent.length > 0) ? '' : formItem,(() => {
- if (info.is_sign && !(/\/detail/.test(this.$route.path) && this.$route.query.flow_id && jointlySignContent.length > 0)) {
+ isJointly ? [(/\/detail/.test(this.$route.path) && this.$route.query.flow_id && jointlySignContent.length > 0) ? '' : formItem,(() => {
+ if (info.is_sign && !(/\/detail/.test(this.$route.path && this.$route.query.flow_id && jointlySignContent.length > 0))) {
let log = this.logs.find(log => log.node?.fields?.findIndex(field => field?.field?.name === info.name) !== -1) && (row ? row[info.name] : this.form[info.name])
if (log && log.user) {
return h('div',[
@@ -965,11 +967,36 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
src: log.user?.sign_file?.url,
alt: log.user?.name
}
- })
+ }),
+ h('div', this.$moment(log.updated_at).format('YYYY年MM月DD日 HH时mm分'))
+ ])
+ }
+ }
+ })(),jointlySignContent] : [formItem,(() => {
+ if (info.is_sign) {
+ let log = this.logs.find(log => log.node?.fields?.findIndex(field => field?.field?.name === info.name) !== -1 && (row ? row[info.name] : this.form[info.name]))
+ if (log && log.user) {
+ return h('div',[
+ h('el-image',{
+ style: {
+ 'max-height': '80px',
+ 'max-width': '120px'
+ },
+ props: {
+ src: log.user?.sign_file?.url,
+ fit: 'contain',
+ alt: log.user?.name
+ },
+ attrs: {
+ src: log.user?.sign_file?.url,
+ alt: log.user?.name
+ }
+ }),
+ h('div', this.$moment(log.updated_at).format('YYYY年MM月DD日 HH时mm分'))
])
}
}
- })(),jointlySignContent]
+ })()]
);
}
}
@@ -1280,7 +1307,6 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
custom_model_id: info.stub
}).then(res => {
this.$set(this.flows, info.name, res.data.data)
- console.log(this.flows)
})
}
formItem = h("van-field", {
@@ -1565,7 +1591,6 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
custom_model_id: info.stub
}).then(res => {
this.$set(this.flows, info.name, res.data.data)
- console.log(this.flows)
})
}
formItem = h(
diff --git a/src/views/attendance/WorkOvertime.vue b/src/views/attendance/WorkOvertime.vue
new file mode 100644
index 0000000..0f5a793
--- /dev/null
+++ b/src/views/attendance/WorkOvertime.vue
@@ -0,0 +1,152 @@
+
+