|  |  |  | 
|---|
|  |  |  | </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> | 
|---|
|  |  |  | 
|---|
|  |  |  | status: '', | 
|---|
|  |  |  | sortnum: '', | 
|---|
|  |  |  | lineId: '', | 
|---|
|  |  |  | userIds: '', | 
|---|
|  |  |  | userIds: [], | 
|---|
|  |  |  | dealUserId: '', | 
|---|
|  |  |  | dealDate: '', | 
|---|
|  |  |  | dealInfo: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | __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 } | 
|---|
|  |  |  | 
|---|
|  |  |  | border: 1px solid $primary-color; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | </style> | 
|---|