Commit 8f1d4460b9cd9e10560ece1ef322079c8b6392ce
1 parent
87e6927c
实现专项行动详情查看
Showing
7 changed files
with
78 additions
and
10 deletions
package.json
| ... | ... | @@ -40,6 +40,7 @@ |
| 40 | 40 | "screenfull": "^4.2.0", |
| 41 | 41 | "script-loader": "^0.7.2", |
| 42 | 42 | "serve-static": "^1.13.2", |
| 43 | + "sass": "^1.77.8", | |
| 43 | 44 | "style-loader": "^4.0.0", |
| 44 | 45 | "vue": "^2.6.14", |
| 45 | 46 | "vue-drag-resize": "^1.4.2", |
| ... | ... | @@ -58,7 +59,6 @@ |
| 58 | 59 | "@vue/cli-service": "~5.0.0", |
| 59 | 60 | "eslint": "^7.32.0", |
| 60 | 61 | "eslint-plugin-vue": "^8.0.3", |
| 61 | - "sass": "^1.77.8", | |
| 62 | 62 | "vue-template-compiler": "^2.6.14" |
| 63 | 63 | }, |
| 64 | 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 | 62 | \ No newline at end of file | ... | ... |
src/components/index.js
| ... | ... | @@ -16,6 +16,7 @@ import topOperation from '@/components/NCC-topOperation/index' |
| 16 | 16 | import tableOperation from '@/components/NCC-tableOperation' |
| 17 | 17 | import UserBox from '@/components/NCC-userBox' |
| 18 | 18 | import ColumnSettings from '@/components/ColumnSettings' |
| 19 | +import FormDialog from '@/components/FormDialog' | |
| 19 | 20 | import UserSelect from '@/components/NCC-userSelect' |
| 20 | 21 | import uploadBtn from '@/components/NCC-uploadBtn' |
| 21 | 22 | // 代码生成器专供 |
| ... | ... | @@ -72,6 +73,7 @@ export default { |
| 72 | 73 | Vue.component('NCCQuill', NCCQuill) |
| 73 | 74 | Vue.component('Screenfull', Screenfull) |
| 74 | 75 | Vue.component('ColumnSettings', ColumnSettings) |
| 76 | + Vue.component('FormDialog', FormDialog) | |
| 75 | 77 | |
| 76 | 78 | } |
| 77 | 79 | } |
| 78 | 80 | \ No newline at end of file | ... | ... |
src/views/baseSpecialAction/Form.vue
| ... | ... | @@ -274,7 +274,7 @@ export default { |
| 274 | 274 | this.$emit("refresh"); |
| 275 | 275 | }, |
| 276 | 276 | init(row, isDetail) { |
| 277 | - this.dataForm.id = row.id || 0; | |
| 277 | + this.dataForm.id = row ? row.id : ''; | |
| 278 | 278 | this.visible = true; |
| 279 | 279 | this.isDetail = isDetail || false; |
| 280 | 280 | this.$nextTick(() => { | ... | ... |
src/views/baseSpecialAction/dynamicModel/list/Form.vue
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <div> |
| 3 | 3 | |
| 4 | 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 | 6 | <parser :form-conf="formConf" @submit="sumbitForm" :key="key" ref="dynamicForm" :setFormData="setFormData" |
| 7 | 7 | :setShowOrHide="setShowOrHide" :setRequired="setRequired" :setDisabled="setDisabled" |
| 8 | 8 | :setFieldOptions="setFieldOptions" v-if="!loading"/> | ... | ... |
src/views/baseSpecialAction/index.vue
src/views/baseSpecialAction/infoForm.vue
| ... | ... | @@ -20,20 +20,19 @@ |
| 20 | 20 | </el-col> |
| 21 | 21 | </el-col> |
| 22 | 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 | 26 | <template slot-scope="scope"> |
| 28 | 27 | <el-tag :type="scope.row.state == '已填写' ? 'success' : 'warning'">{{scope.row.state}}</el-tag> |
| 29 | 28 | </template> |
| 30 | 29 | </el-table-column> |
| 31 | - <el-table-column label="操作" fixed="right" width="80" > | |
| 30 | + <el-table-column label="操作" fixed="right" > | |
| 32 | 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 | 33 | </template> |
| 35 | 34 | </el-table-column> |
| 36 | - </el-table> | |
| 35 | + </NCC-table> | |
| 37 | 36 | <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initList"/> |
| 38 | 37 | </el-col> |
| 39 | 38 | </el-row> |
| ... | ... | @@ -118,6 +117,10 @@ export default { |
| 118 | 117 | </script> |
| 119 | 118 | <style lang="scss" scoped> |
| 120 | 119 | .NCC-dialog { |
| 120 | + :deep(.el-table__body-wrapper.is-scrolling-none) { | |
| 121 | + height: calc(100% - 47px); | |
| 122 | + overflow-y: scroll; | |
| 123 | + } | |
| 121 | 124 | :deep(.el-pagination__total) { |
| 122 | 125 | color: #606266; |
| 123 | 126 | } | ... | ... |