Commit 8f1d4460b9cd9e10560ece1ef322079c8b6392ce

Authored by monkeyhouyi
1 parent 87e6927c

实现专项行动详情查看

package.json
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
40 "screenfull": "^4.2.0", 40 "screenfull": "^4.2.0",
41 "script-loader": "^0.7.2", 41 "script-loader": "^0.7.2",
42 "serve-static": "^1.13.2", 42 "serve-static": "^1.13.2",
  43 + "sass": "^1.77.8",
43 "style-loader": "^4.0.0", 44 "style-loader": "^4.0.0",
44 "vue": "^2.6.14", 45 "vue": "^2.6.14",
45 "vue-drag-resize": "^1.4.2", 46 "vue-drag-resize": "^1.4.2",
@@ -58,7 +59,6 @@ @@ -58,7 +59,6 @@
58 "@vue/cli-service": "~5.0.0", 59 "@vue/cli-service": "~5.0.0",
59 "eslint": "^7.32.0", 60 "eslint": "^7.32.0",
60 "eslint-plugin-vue": "^8.0.3", 61 "eslint-plugin-vue": "^8.0.3",
61 - "sass": "^1.77.8",  
62 "vue-template-compiler": "^2.6.14" 62 "vue-template-compiler": "^2.6.14"
63 }, 63 },
64 "eslintConfig": { 64 "eslintConfig": {
src/components/FormDialog/index.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <div class="FormDialog" @click="openDialog">
  4 + <el-button type="text" :disabled="row.state != '已填写'" :loading="btnLoading">详情</el-button>
  5 + </div>
  6 + <NCCForm v-if="dialogVisible" ref="NCCForm" @refreshDataList="refresh"/>
  7 + </div>
  8 + </template>
  9 +
  10 + <script>
  11 + import NCCForm from '@/views/baseSpecialAction/dynamicModel/list/Form'
  12 + import request from "@/utils/request";
  13 + export default {
  14 + components: { NCCForm },
  15 + props: {
  16 + row: {
  17 + type: Object,
  18 + default: {},
  19 + },
  20 + isDetail: {
  21 + type: Boolean,
  22 + default: true,
  23 + },
  24 + },
  25 + data() {
  26 + return {
  27 + dialogVisible: false,
  28 + btnLoading: false,
  29 + }
  30 + },
  31 + methods: {
  32 + openDialog() {
  33 + console.log(11);
  34 + let row = this.row;
  35 + if(this.row.state != '已填写') return;
  36 + this.btnLoading = true;
  37 + this.dialogVisible = true;
  38 + var Itemid = row.itemId || '';//数据id,没有的话就是新增 ,有的话就是修改
  39 + var modelId = row.formId;//关联的表单id
  40 + var taskId = row.id; // 当前专项行动id
  41 + var isPreview = false;//固定死,值不变
  42 + var useFormPermission = false;//固定死,值不变
  43 + var formData = [];
  44 + request({
  45 + url: '/visualdev/OnlineDev/'+modelId+'/Config',
  46 + method: "GET",
  47 + params:null
  48 + }).then(res => {
  49 + formData = JSON.parse(res.data.formData);
  50 + formData.disabled = this.isDetail || false;
  51 + let form = JSON.stringify(formData);
  52 + this.$refs.NCCForm.init(form, modelId, Itemid, isPreview, useFormPermission, taskId, this.isDetail)
  53 + this.btnLoading = false;
  54 + }).catch(() => this.btnLoading = false);
  55 + },
  56 + refresh() {
  57 + this.dialogVisible = false;
  58 + },
  59 + }
  60 + }
  61 + </script>
0 \ No newline at end of file 62 \ No newline at end of file
src/components/index.js
@@ -16,6 +16,7 @@ import topOperation from &#39;@/components/NCC-topOperation/index&#39; @@ -16,6 +16,7 @@ import topOperation from &#39;@/components/NCC-topOperation/index&#39;
16 import tableOperation from '@/components/NCC-tableOperation' 16 import tableOperation from '@/components/NCC-tableOperation'
17 import UserBox from '@/components/NCC-userBox' 17 import UserBox from '@/components/NCC-userBox'
18 import ColumnSettings from '@/components/ColumnSettings' 18 import ColumnSettings from '@/components/ColumnSettings'
  19 +import FormDialog from '@/components/FormDialog'
19 import UserSelect from '@/components/NCC-userSelect' 20 import UserSelect from '@/components/NCC-userSelect'
20 import uploadBtn from '@/components/NCC-uploadBtn' 21 import uploadBtn from '@/components/NCC-uploadBtn'
21 // 代码生成器专供 22 // 代码生成器专供
@@ -72,6 +73,7 @@ export default { @@ -72,6 +73,7 @@ export default {
72 Vue.component('NCCQuill', NCCQuill) 73 Vue.component('NCCQuill', NCCQuill)
73 Vue.component('Screenfull', Screenfull) 74 Vue.component('Screenfull', Screenfull)
74 Vue.component('ColumnSettings', ColumnSettings) 75 Vue.component('ColumnSettings', ColumnSettings)
  76 + Vue.component('FormDialog', FormDialog)
75 77
76 } 78 }
77 } 79 }
78 \ No newline at end of file 80 \ No newline at end of file
src/views/baseSpecialAction/Form.vue
@@ -274,7 +274,7 @@ export default { @@ -274,7 +274,7 @@ export default {
274 this.$emit("refresh"); 274 this.$emit("refresh");
275 }, 275 },
276 init(row, isDetail) { 276 init(row, isDetail) {
277 - this.dataForm.id = row.id || 0; 277 + this.dataForm.id = row ? row.id : '';
278 this.visible = true; 278 this.visible = true;
279 this.isDetail = isDetail || false; 279 this.isDetail = isDetail || false;
280 this.$nextTick(() => { 280 this.$nextTick(() => {
src/views/baseSpecialAction/dynamicModel/list/Form.vue
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div> 2 <div>
3 3
4 <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" :close-on-click-modal="false" :visible.sync="visible" 4 <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" :close-on-click-modal="false" :visible.sync="visible"
5 - class="NCC-dialog NCC-dialog_center" lock-scroll :width="formConf.generalWidth"> 5 + class="NCC-dialog NCC-dialog_center" lock-scroll :width="formConf.generalWidth" :modal="false">
6 <parser :form-conf="formConf" @submit="sumbitForm" :key="key" ref="dynamicForm" :setFormData="setFormData" 6 <parser :form-conf="formConf" @submit="sumbitForm" :key="key" ref="dynamicForm" :setFormData="setFormData"
7 :setShowOrHide="setShowOrHide" :setRequired="setRequired" :setDisabled="setDisabled" 7 :setShowOrHide="setShowOrHide" :setRequired="setRequired" :setDisabled="setDisabled"
8 :setFieldOptions="setFieldOptions" v-if="!loading"/> 8 :setFieldOptions="setFieldOptions" v-if="!loading"/>
src/views/baseSpecialAction/index.vue
@@ -149,6 +149,8 @@ export default { @@ -149,6 +149,8 @@ export default {
149 // console.log(this.list, 'list'); 149 // console.log(this.list, 'list');
150 this.total = res.data.pagination.total; 150 this.total = res.data.pagination.total;
151 this.listLoading = false; 151 this.listLoading = false;
  152 + }).catch(() => {
  153 + this.listLoading = false;
152 }); 154 });
153 }, 155 },
154 156
src/views/baseSpecialAction/infoForm.vue
@@ -20,20 +20,19 @@ @@ -20,20 +20,19 @@
20 </el-col> 20 </el-col>
21 </el-col> 21 </el-col>
22 <el-col :span="24" style="height: calc(100% - 100px);"> 22 <el-col :span="24" style="height: calc(100% - 100px);">
23 - <el-table :data="tableData" style="width: 100%" v-loading="loading" stripe>  
24 - <el-table-column type="index" width="50" />  
25 - <el-table-column prop="originName" label="部门名称" />  
26 - <el-table-column prop="state" label="状态" > 23 + <NCC-table :data="tableData" style="width: 100%" v-loading="loading" stripe>
  24 + <el-table-column prop="originName" label="传达区县/外协" />
  25 + <el-table-column prop="state" label="状态">
27 <template slot-scope="scope"> 26 <template slot-scope="scope">
28 <el-tag :type="scope.row.state == '已填写' ? 'success' : 'warning'">{{scope.row.state}}</el-tag> 27 <el-tag :type="scope.row.state == '已填写' ? 'success' : 'warning'">{{scope.row.state}}</el-tag>
29 </template> 28 </template>
30 </el-table-column> 29 </el-table-column>
31 - <el-table-column label="操作" fixed="right" width="80" > 30 + <el-table-column label="操作" fixed="right" >
32 <template slot-scope="scope"> 31 <template slot-scope="scope">
33 - <el-button type="text" @click="toDetailForm(scope.row)" :disabled="scope.row.state != '已填写'">详情</el-button> 32 + <FormDialog :row="scope.row" :isDetail="true" />
34 </template> 33 </template>
35 </el-table-column> 34 </el-table-column>
36 - </el-table> 35 + </NCC-table>
37 <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initList"/> 36 <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initList"/>
38 </el-col> 37 </el-col>
39 </el-row> 38 </el-row>
@@ -118,6 +117,10 @@ export default { @@ -118,6 +117,10 @@ export default {
118 </script> 117 </script>
119 <style lang="scss" scoped> 118 <style lang="scss" scoped>
120 .NCC-dialog { 119 .NCC-dialog {
  120 + :deep(.el-table__body-wrapper.is-scrolling-none) {
  121 + height: calc(100% - 47px);
  122 + overflow-y: scroll;
  123 + }
121 :deep(.el-pagination__total) { 124 :deep(.el-pagination__total) {
122 color: #606266; 125 color: #606266;
123 } 126 }