|
@@ -232,7 +232,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="归属部门" prop="sysDeptId">
|
|
|
- <treeselect v-model="form.sysDeptId" :options="deptOptionstr" :show-count="true" placeholder="请选择归属部门" />
|
|
|
+ <treeselect :multiple="true" v-model="form.sysDeptId" :options="deptOptionstr" placeholder="请选择归属部门" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
@@ -380,9 +380,37 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
+ let yhehg = []
|
|
|
const id = row.id || this.ids
|
|
|
getReport(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ this.form.sysDeptId = JSON.parse(this.form.sysDeptId)
|
|
|
+ // if(this.form.sysDeptId == '[]'){
|
|
|
+ // console.log(345)
|
|
|
+ // this.form.sysDeptId = []
|
|
|
+ // }else{
|
|
|
+ // this.form.sysDeptId = this.form.sysDeptId.split(',')
|
|
|
+
|
|
|
+ // this.form.sysDeptId.filter(route=>{
|
|
|
+ // route = route - 0
|
|
|
+ // yhehg.push(route)
|
|
|
+ // })
|
|
|
+ // this.form.sysDeptId = yhehg
|
|
|
+ // }
|
|
|
+
|
|
|
+ if(this.form.sysDeptId !== undefined && this.form.sysDeptId !==null){
|
|
|
+ console.log(this.form.sysDeptId)
|
|
|
+ // if(this.form.sysDeptId !== []){
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+ // this.form.sysDeptId = this.form.sysDeptId
|
|
|
+ // this.form.sysDeptId = this.form.sysDeptId.split(',')
|
|
|
+ console.log(this.form.sysDeptId)
|
|
|
+ }else{
|
|
|
+ this.form.sysDeptId = []
|
|
|
+ }
|
|
|
+
|
|
|
console.log(this.form.url)
|
|
|
this.open = true;
|
|
|
this.title = "修改项目上报";
|
|
@@ -403,6 +431,11 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
+ // this.form.sysDeptId = this.form.sysDeptId.join(',')
|
|
|
+ // if(this.form.sysDeptId.length == 0){
|
|
|
+ // this.form.sysDeptId = undefined
|
|
|
+ // }
|
|
|
+ this.form.sysDeptId = JSON.stringify(this.form.sysDeptId)
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
@@ -412,6 +445,7 @@ export default {
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
+ // this.form.sysDeptId = this.form.sysDeptId.join(',')
|
|
|
addReport(this.form).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|