Bladeren bron

bug修改

ysc 1 jaar geleden
bovenliggende
commit
3782cee7dd
2 gewijzigde bestanden met toevoegingen van 15 en 5 verwijderingen
  1. 9 4
      src/views/dashboard/index.vue
  2. 6 1
      src/views/system/user.vue

+ 9 - 4
src/views/dashboard/index.vue

@@ -88,7 +88,7 @@
             <span>{{ scope.row.beginDate + ' 至 ' + scope.row.endDate }}</span>
           </template>
         </el-table-column>
-        <el-table-column>
+        <el-table-column label="操作" width="80">
           <template slot-scope="scope">
             <el-button size="mini"
                        type="text"
@@ -105,7 +105,7 @@
     <el-dialog title="审核任务" :visible.sync="auditOpen" width="800px" class="add-dialog" append-to-body
                :close-on-click-modal="false">
       <task-detail :detail-form="detailForm"></task-detail>
-      <div v-if="detailTitle=='审核任务'" style="margin-top: 10px">
+      <div style="margin-top: 10px">
         <el-form ref="auditForm" :model="auditForm" :rules="auditRules" size="mini" label-width="100px">
           <el-form-item label="审核意见" prop="auditResult">
             <el-radio-group v-model="auditForm.auditResult">
@@ -164,7 +164,13 @@ export default {
       enforceRemindCount: 0,
 
       detailForm: false,
-      auditOpen: false
+      auditForm: {},
+      auditOpen: false,
+      auditRules:{
+        auditResult: [
+          {required: true, message: "审核意见不能为空", trigger: "change"}
+        ]
+      }
     }
   },
   mounted() {
@@ -247,7 +253,6 @@ export default {
           auditOpinion: undefined
         }
         this.detailOpen = true;
-        this.detailTitle = "审核任务";
       })
     },
 

+ 6 - 1
src/views/system/user.vue

@@ -292,7 +292,7 @@ export default {
       roleOptions: [],
       // 表单参数
       form: {},
-
+      selectDeptId: undefined,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -350,6 +350,9 @@ export default {
   methods: {
     /** 查询用户列表 */
     getList() {
+      if (this.selectDeptId) {
+        this.queryParams.deptId = this.selectDeptId
+      }
       listUser(this.queryParams).then(response => {
           this.userList = response.data.records;
           this.total = response.data.total;
@@ -364,6 +367,7 @@ export default {
     },
     // 节点单击事件
     deptSelect(data) {
+      this.selectDeptId = data
       this.queryParams.deptId = data;
       this.handleQuery();
     },
@@ -437,6 +441,7 @@ export default {
       this.reset();
       getUser('').then(response => {
         this.roleOptions = response.data.roles;
+        this.form.deptId = this.selectDeptId
         this.open = true;
         this.title = "添加用户";
         this.form.password = this.initPassword;