Browse Source

调取详情页

lzw 4 years ago
parent
commit
05d342d3a2
2 changed files with 55 additions and 54 deletions
  1. 26 33
      src/views/system/files/column.vue
  2. 29 21
      src/views/system/files/file.vue

+ 26 - 33
src/views/system/files/column.vue

@@ -1,26 +1,26 @@
 <template>
   <div class="app-container">
-    <el-form :inline="true">
-      <el-form-item label="部门名称">
-        <el-input
-          v-model="queryParams.deptName"
-          placeholder="请输入文档名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+<!--    <el-form :inline="true">-->
+<!--      <el-form-item label="部门名称">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.deptName"-->
+<!--          placeholder="请输入部门名称"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
 
-      <el-form-item>
-        <el-button
-          class="filter-item"
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-        >搜索</el-button>
-      </el-form-item>
-    </el-form>
+<!--      <el-form-item>-->
+<!--        <el-button-->
+<!--          class="filter-item"-->
+<!--          type="primary"-->
+<!--          icon="el-icon-search"-->
+<!--          size="mini"-->
+<!--          @click="handleQuery"-->
+<!--        >搜索</el-button>-->
+<!--      </el-form-item>-->
+<!--    </el-form>-->
 
     <el-table
       v-loading="loading"
@@ -79,11 +79,11 @@
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
-          <el-col :span="24" v-if="form.parentId !== 0">
-            <el-form-item label="上级" prop="parentId">
-              <treeselect v-model="form.parentId" :disabled="false"  :options="docmenuOptions" :normalizer="normalizer" :show-count="true" placeholder="选择上级" />
-            </el-form-item>
-          </el-col>
+<!--          <el-col :span="24" v-if="form.parentId !== 0">-->
+<!--            <el-form-item label="上级" prop="parentId">-->
+<!--              <treeselect v-model="form.parentId" :disabled="false"  :options="docmenuOptions" :normalizer="normalizer" :show-count="true" placeholder="选择上级" />-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
           <el-col :span="12">
             <el-form-item label="文档名称" prop="deptName">
               <el-input v-model="form.deptName" placeholder="请输入文档名称" />
@@ -150,9 +150,6 @@
         },
         created() {
             this.getList();
-            // this.getDicts("sys_normal_disable").then(response => {
-            //     this.statusOptions = response.data;
-            // });
         },
         methods: {
             /** 查询文档列表 */
@@ -176,11 +173,7 @@
                     children: node.children
                 };
             },
-            // 字典状态字典翻译
-            // statusFormat(row, column) {
-            //     return this.selectDictLabel(this.statusOptions, row.status);
-            // },
-            // 取消按钮
+              // 取消按钮
             cancel() {
                 this.open = false;
                 this.reset();

+ 29 - 21
src/views/system/files/file.vue

@@ -94,7 +94,7 @@
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
-                @click="openactform(scope.row.actkey,scope.row.id)"
+                @click="openactform(scope.row.actkey,scope.row.id,scope.row.taskId)"
               >详情</el-button>
               <el-button
                 size="mini"
@@ -127,18 +127,17 @@
 </template>
 
 <script>
-  import { getListright,listArchives, getArchives, delArchives, addArchives, updateArchives, exportArchives } from "@/api/system/archives/archives.js";
+  import { getListright,listArchives, getArchives, delArchives, addArchives, updateArchives, exportArchives } from "@/api/system/archives/archives";
   import { getToken } from "@/utils/auth";
   // import { treeselect } from "@/api/system/dept";
   import Editor from '@/components/Editor';
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-  import { listDept } from "@/api/system/archives/column.js";
+  import { listDept } from "@/api/system/archives/column";
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-  import {getStartFormKey } from '@/api/activiti/process/startprocess'
-
+  import {getStartFormKey,getCurrentFlowFormKey } from '@/api/activiti/process/startprocess'
   import log from '../../monitor/job/log'
   export default {
     name: "Archives",
@@ -212,18 +211,17 @@
     },
     methods: {
 
-      openactform(actkey,id) {
+      openactform(actkey,id,taskId) {
         this.open = true
         let vue = this
         actkey=actkey.split(":")[0];
         this.details.getactkey = actkey//动态传参到下面的页面
-        this.details.formId = id//动态传参到下面的页面
+        this.details.formId = taskId//动态传参到下面的页面
+        //this.details.formId = id//动态传参到下面的页面
         getStartFormKey(actkey).then(response => {
           var path = response.msg
           this.actForm = () => Promise.resolve().then(() => require(`@/views/${path}`))
         })
-
-
         return vue.actForm = this.actForm
       },
 
@@ -250,12 +248,19 @@
       // },
 
       getListtable(){
-        // alert(this.queryParams.actkey)
+
         getListright(this.queryParams).then(response => {
           console.log(response.rows)
           this.archivesList = response.rows;
           this.total = response.total;
         })
+        // this.loading = true;
+        // havedInfo(this.queryParams).then(response => {
+        //   this.infoList = response.rows;
+        //   this.total = response.total;
+        //   this.loading = false;
+        //   this.actOpen=false;
+        // });
       },
       /** 查询文档列表 */
       getList() {
@@ -332,16 +337,16 @@
         this.title = "添加档案";
       },
       /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        this.open = true;
-        const id = row.id || this.ids
-        getArchives(id).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "档案详情";
-        });
-      },
+      // handleUpdate(row) {
+      //   this.reset();
+      //   this.open = true;
+      //   const id = row.id || this.ids
+      //   getArchives(id).then(response => {
+      //     this.form = response.data;
+      //     this.open = true;
+      //     this.title = "档案详情";
+      //   });
+      // },
       /** 提交按钮 */
       submitForm: function() {
         this.$refs["form"].validate(valid => {
@@ -368,7 +373,9 @@
       },
       /** 删除按钮操作 */
       handleDelete(row) {
-        const ids = row.archivesNum || this.ids;
+        console.log(row)
+        console.log("aaaaa")
+        const ids = row.id || this.ids;
         this.$confirm('是否确认删除档案编号为"' + ids + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
@@ -377,6 +384,7 @@
           return delArchives(ids);
         }).then(() => {
           this.getList();
+          this.getListtable();
           this.msgSuccess("删除成功");
         }).catch(function() {});
       },