From 77946261ec663aa1fe7f6f97e550532ed879f982 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 六月 2025 13:47:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
---
admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue b/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue
index 0e58415..a5e0fe1 100644
--- a/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue
+++ b/admin/src/views/Inspection/components/OperaYwPatrolSchemeWindow.vue
@@ -14,7 +14,7 @@
</el-select>
</el-form-item>
<el-form-item label="宸℃璐熻矗浜�" prop="userIds">
- <el-select v-model="form.userIds" filterable clearable>
+ <el-select v-model="form.userIds" multiple filterable clearable>
<el-option v-for="item in staffList" :value="item.id" :label="item.realname"></el-option>
</el-select>
</el-form-item>
@@ -76,7 +76,7 @@
status: '',
sortnum: '',
lineId: '',
- userIds: '',
+ userIds: [],
dealUserId: '',
dealDate: '',
dealInfo: '',
@@ -118,6 +118,56 @@
})
},
methods: {
+ open(title) {
+ this.title = title
+ this.visible = true
+ },
+ __confirmCreate () {
+ this.$refs.form.validate((valid) => {
+ if (!valid) {
+ return
+ }
+ let obj = JSON.parse(JSON.stringify(this.form))
+ obj.userIds = obj.userIds.join(',')
+ // 璋冪敤鏂板缓鎺ュ彛
+ this.isWorking = true
+ this.api.create(obj)
+ .then(() => {
+ this.visible = false
+ this.$tip.apiSuccess('鏂板缓鎴愬姛')
+ this.$emit('success')
+ })
+ .catch(e => {
+ // this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ })
+ },
+ __confirmEdit () {
+ this.$refs.form.validate((valid) => {
+ if (!valid) {
+ return
+ }
+ let obj = JSON.parse(JSON.stringify(this.form))
+ obj.userIds = obj.userIds.join(',')
+ // 璋冪敤鏂板缓鎺ュ彛
+ this.isWorking = true
+ this.api.updateById(obj)
+ .then(() => {
+ this.visible = false
+ this.$tip.apiSuccess('淇敼鎴愬姛')
+ this.$emit('success')
+ })
+ .catch(e => {
+ // this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ })
+ },
weekClick(i) {
this.weeks.forEach((item, index) => {
if (i == index) { item.sel = !item.sel }
@@ -155,7 +205,7 @@
detailById(id).then(res => {
this.form = res
if (res.userIds) {
- this.$set(this.form, 'userIds', Number(res.userIds))
+ this.$set(this.form, 'userIds', [...res.userIds.split(',').map(item => Number(item))])
}
if (res.startTime) {
this.$set(this.form, 'selTime', [res.startTime, res.endTime])
@@ -239,4 +289,4 @@
border: 1px solid $primary-color;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3