Ver código fonte

下发管理模板管理

daiqisheng 3 anos atrás
pai
commit
23919e80a7

+ 26 - 27
src/pages/main/performance/department.vue

@@ -53,17 +53,18 @@
                 >审批</el-button
               >
             </template>
-            <el-button type="primary" @click="handleTrack">流程跟踪</el-button>
-            <el-button type="primary">导出</el-button>
+            <!-- <el-button type="primary" @click="handleTrack">流程跟踪</el-button>
+            <el-button type="primary">导出</el-button> -->
           </div>
-          <div>
+          <!-- <div>
             <el-button @click="handleCancel('visible')" type="primary"
               >返回</el-button
             >
-          </div>
+          </div> -->
         </div>
         <!-- 主体部分 -->
-        <sheet />
+        <simple-sheet v-if="isCheck" :id="edit_form.id" />
+        <simple-sheet v-else :id="edit_form.id" :type="edit" />
         <!-- <analysis
           :edit="edit_form.department_status === '待处理' && edit_visible"
         /> -->
@@ -107,7 +108,7 @@
         </div>
       </template>
     </simple-dialog>
-    <simple-dialog
+    <!-- <simple-dialog
       title="流程跟踪"
       :visible="track_visible"
       :reload="reload"
@@ -134,7 +135,7 @@
         <el-table-column prop="explain" label="审批说明" align="center">
         </el-table-column>
       </el-table>
-    </simple-dialog>
+    </simple-dialog> -->
   </div>
 </template>
 
@@ -144,21 +145,23 @@ import simpleTable from "./components/table.vue";
 import simplePagination from "./components/pagination.vue";
 import simpleDialog from "./components/dialog.vue";
 // import analysis from "./analysis.vue";
-import sheet from "./components/sheet.vue";
+import simpleSheet from "./components/sheet.vue";
 export default {
   components: {
     simpleForm,
     simpleTable,
     simplePagination,
     simpleDialog,
-    // analysis,
-    sheet,
+    simpleSheet,
   },
   data() {
     return {
       page: 1,
       rows: 10,
-      total: 5,
+      total: 0,
+      isCheck:false,
+      // 职位判断转派用
+      duty: "",
       //   搜索参数
       table_search: {},
       //   dialog 参数
@@ -166,7 +169,9 @@ export default {
       edit_visible: false,
       approve_visible: false,
       track_visible: false,
-      edit_form: {},
+      edit_form: {
+        id:12
+      },
       reload: 0,
       // 判断类型
       type: "3",
@@ -274,30 +279,23 @@ export default {
       page: this.page,
       pagesize: this.rows,
     });
+    // 职位
+    this.duty = JSON.parse(sessionStorage.userInfo).duty;
+    console.log(this.duty, "duty");
   },
   methods: {
     //   初始化
     handleInit(data) {
       this.$http({
-        url: "/CMKIssued/CMKIssuedListByUser",
+        url: "/market/CMKIssued/CMKIssuedListByUser",
         method: "post",
         headers: {
           "Content-Type": "application/json",
         },
         data: data,
-      }).then((res) => {
-        console.log(res);
-        res.data = this.table_list;
-        this.table_list.push({
-          templateName: "模板名称",
-          status: "0",
-          reason: "填报事由",
-          precautions: "填报注意事项",
-          endTime: new Date(),
-          loginNameStr: "发起人",
-          id:23,
-          templateContent:'templateContent'
-        });
+      }).then(({ data: { data } }) => {
+        console.log(data);
+        this.table_list = data;
       });
     },
     handleChange(page) {
@@ -321,6 +319,7 @@ export default {
       this.edit_visible = true;
       this.edit_form = row;
     },
+    // 查看按钮
     handleCheck(row) {
       console.log(row, "row");
       this.visible = true;
@@ -417,7 +416,7 @@ export default {
         id: this.edit_form.id,
         templateContent: this.edit_form.templateContent,
       };
-      console.log(reqdata,'reqdata')
+      console.log(reqdata, "reqdata");
       // 提交好了
       // this.$http({
       //   url: "/CMKIssued/CMKIssuedSubmit",

+ 6 - 5
src/pages/main/performance/issue.vue

@@ -24,14 +24,15 @@
       @cancel="handleVisible('template')"
       @confirm="handleVisible('template')"
       :visible="template_visible"
-      ><div class="flex-justify-align-end padding-right-20 padding-left-20">
+      >
+      <!-- <div class="flex-justify-align-end padding-right-20 padding-left-20">
         <div>
           <el-button type="primary">导出</el-button>
           <el-button @click="handleVisible('template')" type="primary"
             >返回</el-button
           >
         </div>
-      </div>
+      </div> -->
       <simpleSheet v-if="isCheck" :id="edit_rows.id" />
       <simpleSheet v-else :id="edit_rows.id" type="edit" />
       <template v-slot:footer><div></div></template>
@@ -171,8 +172,8 @@ export default {
           "Content-Type": "application/json",
         },
         data: data,
-      }).then(({ data: { data } }) => {
-        console.log(data, "res");
+      }).then(({ data:{data,count}}) => {
+        this.total = count
         this.table_list = data;
       });
       // this.table_loading = true;
@@ -218,6 +219,7 @@ export default {
           break;
         case "edit":
           if (params) {
+            this.isCheck = false;
             this.edit_rows = params;
             this.template_visible = true;
           } else {
@@ -241,7 +243,6 @@ export default {
       this.page = 1;
     },
     handleWithdraw({ id }) {
-      console.log({ id });
       this.$http({
         url: "/market/CMKIssued/CMKDelIssuedById",
         method: "post",