فهرست منبع

修改履职计划页面,添加字典

luojun 2 سال پیش
والد
کامیت
64bce7e77d
3فایلهای تغییر یافته به همراه81 افزوده شده و 48 حذف شده
  1. 2 2
      src/api/resumption/plan.js
  2. 29 16
      src/views/resumption/plan/dialog.edit.vue
  3. 50 30
      src/views/resumption/plan/index.vue

+ 2 - 2
src/api/resumption/plan.js

@@ -36,7 +36,7 @@ export function update(data) {
 // 删除【请填写功能名称】
 export function delelte(id) {
   return request({
-    url: '/core/api/plan/' + id,
-    method: 'delete'
+    url: '/core/api/plan/delete/' + id,
+    method: 'get'
   })
 }

+ 29 - 16
src/views/resumption/plan/dialog.edit.vue

@@ -36,10 +36,10 @@
                   clearable
                 >
                   <el-option
-                    v-for="item in planType"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
+                    v-for="dict in dict.type.resumption_plan_type"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
                   >
                   </el-option>
                 </el-select>
@@ -55,7 +55,7 @@
                   clearable
                 >
                   <el-option
-                    v-for="item in planCycle"
+                    v-for="item in dict.type.resumption_plan_cycle"
                     :key="item.value"
                     :label="item.label"
                     :value="item.value"
@@ -74,7 +74,7 @@
                   clearable
                 >
                   <el-option
-                    v-for="item in statusOptions"
+                    v-for="item in dict.type.resumption_plan_status"
                     :key="item.value"
                     :label="item.label"
                     :value="item.value"
@@ -94,7 +94,7 @@
                   clearable
                 >
                   <el-option
-                    v-for="item in execOrgType"
+                    v-for="item in dict.type.sys_org_type"
                     :key="item.value"
                     :label="item.label"
                     :value="item.value"
@@ -122,16 +122,15 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item prop="count" label="履职次数:">
+              <el-form-item prop="planExec" label="履职时间:">
                 <el-select
-                  prop="count"
-                  label="履职次数"
-                  v-model="formData.count"
-                  placeholder="请选择履职次数"
+                  label="履职时间"
+                  v-model="formData.planExec"
+                  placeholder="请选择履职时间"
                   clearable
                 >
                   <el-option
-                    v-for="item in orgTypeOptions"
+                    v-for="item in dict.type.resumption_plan_exec"
                     :key="item.value"
                     :label="item.label"
                     :value="item.value"
@@ -140,6 +139,19 @@
                 </el-select>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item prop="count" label="履职次数:">
+                <el-input-number
+            style="margin-left: 10px"
+            v-model="count"
+            controls-position="right"
+            @change="handleChange"
+            :min="1"
+            :max="10"
+          ></el-input-number>
+                
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-form-item prop="description" label="备注">
             <el-input
@@ -187,7 +199,7 @@ import * as api from "@/api/resumption/plan";
 import { statusOptions } from "./../../commonOption";
 
 export default {
-  dicts: ['resumption_plan_type'],
+  dicts: ['resumption_plan_type',"resumption_plan_cycle","resumption_org_type","resumption_plan_status","sys_org_type","resumption_plan_exec"],
   data() {
     // const params = this.$route.params;
     // let o1=options;
@@ -200,7 +212,7 @@ export default {
         planStatus: null,
         execOrgType: null,
         roleNames: null,
-
+        planExec:null,
         count: null,
         description: null,
       propItem: "",
@@ -275,9 +287,10 @@ export default {
         description: null,
         tableData:null,
         itemList:null,
+        planExec:null,
       };
     },
-    
+    handleChange(value) {},
     async refresh(id, other) {
       this.formData = id ? (await api.get(id)).data : this.reset(other);
     },

+ 50 - 30
src/views/resumption/plan/index.vue

@@ -26,7 +26,7 @@
               prop="planType"
               label="计划类型"
               v-model="queryParams.planType"
-              placeholder="请选择22计划类型"
+              placeholder="请选择计划类型"
               clearable
             >
               <el-option
@@ -63,7 +63,7 @@
               clearable
             >
               <el-option
-                v-for="item in dict.type.planCycle"
+                v-for="item in dict.type.resumption_plan_cycle"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
@@ -80,7 +80,7 @@
               clearable
             >
               <el-option
-                v-for="item in dict.type.planStatus"
+                v-for="item in dict.type.resumption_plan_status"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
@@ -89,21 +89,14 @@
             </el-select>
           </el-form-item>
           <el-form-item prop="planName" label="计划名称">
-            <el-select
-              prop="planName"
-              label="计划名称"
-              v-model="queryParams.planName"
-              placeholder="请输入计划名称"
-              clearable
-            >
-              <el-option
-                v-for="item in dict.type.planName"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
+            <el-input
+                  v-model="queryParams.planName"
+                  :maxlength="50"
+                  name="planName"
+                  placeholder="请输入"
+                  clearable
+                />
+             
           </el-form-item>
           <el-form-item>
             <el-button
@@ -184,9 +177,9 @@
             label="计划类型"
             v-if="columns[2].visible"
           >
-            <!-- <template slot-scope="r"
-              >{{ getLabel(dict.type.rule_type, r.row.type) }}
-            </template> -->
+            <template slot-scope="r"
+              >{{ getLabel(dict.type.resumption_plan_type, `${r.row.planType}`) }}
+            </template>
           </el-table-column>
           <el-table-column
             prop="planCreateOrgName"
@@ -207,7 +200,11 @@
             prop="execOrgType"
             label="履职机构类型"
             v-if="columns[6].visible"
-          ></el-table-column>
+          >
+          <template slot-scope="r"
+              >{{ getLabel(dict.type.sys_org_type, `${r.row.execOrgType}`) }}
+            </template>
+        </el-table-column>
 
           <el-table-column
             prop="roleNames"
@@ -218,7 +215,12 @@
             prop="planCycle"
             label="履职周期"
             v-if="columns[6].visible"
-          ></el-table-column>
+          >
+        
+          <template slot-scope="r"
+              >{{ getLabel(dict.type.resumption_plan_cycle, `${r.row.planCycle}`) }}
+            </template>
+        </el-table-column>
 
 
           <el-table-column
@@ -231,7 +233,12 @@
             prop="planExec"
             label="履职时间"
             v-if="columns[6].visible"
-          ></el-table-column>
+          >
+          <template slot-scope="r"
+              >{{ getLabel(dict.type.resumption_plan_exec, `${r.row.planExec}`) }}
+            </template>
+        
+        </el-table-column>
 
 
           <el-table-column
@@ -245,7 +252,14 @@
             prop="planStatus"
             label="计划状态"
             v-if="columns[6].visible"
-          ></el-table-column>
+          >
+        
+          <template slot-scope="r"
+              >{{ getLabel(dict.type.resumption_plan_status, `${r.row.planStatus}`) }}
+            </template>
+        
+        
+        </el-table-column>
 
           <el-table-column label="操作">
             <template slot-scope="r">
@@ -260,7 +274,7 @@
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
-                @click="onDel(r.row.id)"
+                @click="onDel(r.row.id,r.row.planName)"
                 v-hasPermi="['system:user:remove']"
               >删除</el-button>              
             </template>
@@ -294,7 +308,7 @@ import { statusOptions, getLabel } from "./../../commonOption";
 
 export default {
   name: "resumptionplan",
-  dicts: ["sys_org_type", "rule_type","resumption_plan_type"],
+  dicts: ["sys_org_type", "rule_type","resumption_plan_type","resumption_plan_cycle","resumption_plan_status","resumption_plan_exec"],
   components: {
     DialogEdit,
     OrgTree,
@@ -372,9 +386,15 @@ export default {
     onEdit(id, other = {}) {
       this.$refs.editDialog.show(id, other);
     },
-    async onDel(id) {
-      await api.delRule(id);
-      this.getList();
+    async onDel(id,name) {
+      this.$modal.confirm('是否确认删除名称为"' + name + '"的数据项?').then(function() {
+        return  api.delelte(id);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+      // await api.delelte(id);
+      // this.getList();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {