Commit ff36c85d27e37589b090d748dec6edbf61aac3b8
1 parent
fbae19a1
1
Showing
15 changed files
with
394 additions
and
451 deletions
src/store/modules/meta.js
| @@ -70,8 +70,16 @@ const meta = { | @@ -70,8 +70,16 @@ const meta = { | ||
| 70 | break; | 70 | break; |
| 71 | case 'stateType': | 71 | case 'stateType': |
| 72 | getState().then(res => { | 72 | getState().then(res => { |
| 73 | - console.log(res.data, 'list'); | ||
| 74 | - | 73 | + let tagType = [ |
| 74 | + { name: '1', type: 'danger' }, // 未上报 | ||
| 75 | + { name: '2', type: 'danger' }, // 未下发 | ||
| 76 | + { name: '3', type: 'warning' }, // 待处理 | ||
| 77 | + { name: '4', type: 'success' }, // 已处理 | ||
| 78 | + { name: '5', type: 'info' }, // 仅保存 | ||
| 79 | + ]; | ||
| 80 | + res.data.forEach(v => { | ||
| 81 | + v.tagType = tagType.find(item => v.EnCode == item.name).type || ''; | ||
| 82 | + }); | ||
| 75 | commit('SET_STATETYPE_LIST', res.data) | 83 | commit('SET_STATETYPE_LIST', res.data) |
| 76 | resolve(res.data) | 84 | resolve(res.data) |
| 77 | }).catch(error => { reject(error) }) | 85 | }).catch(error => { reject(error) }) |
src/utils/ncc.js
| @@ -248,6 +248,10 @@ const ncc = { | @@ -248,6 +248,10 @@ const ncc = { | ||
| 248 | return '' | 248 | return '' |
| 249 | } | 249 | } |
| 250 | }, | 250 | }, |
| 251 | + getStateTagType(val, list) { | ||
| 252 | + if(!list.length || !val) return ''; | ||
| 253 | + return list.find(v => v.Id == val).tagType || ''; | ||
| 254 | + }, | ||
| 251 | storageSet(obj) { | 255 | storageSet(obj) { |
| 252 | for (let i in obj) { | 256 | for (let i in obj) { |
| 253 | cacheItem(i, obj[i]) | 257 | cacheItem(i, obj[i]) |
| @@ -352,6 +356,6 @@ const ncc = { | @@ -352,6 +356,6 @@ const ncc = { | ||
| 352 | const hasPermission = btnList.some(btn => btn.enCode === enCode) | 356 | const hasPermission = btnList.some(btn => btn.enCode === enCode) |
| 353 | if (hasPermission) return true | 357 | if (hasPermission) return true |
| 354 | return false | 358 | return false |
| 355 | - } | 359 | + }, |
| 356 | } | 360 | } |
| 357 | export default ncc | 361 | export default ncc |
| 358 | \ No newline at end of file | 362 | \ No newline at end of file |
src/views/DisposalSuggestions/Form.vue
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog | 2 | <el-dialog |
| 3 | - title="判研建议" | 3 | + title="研判建议" |
| 4 | :close-on-click-modal="false" | 4 | :close-on-click-modal="false" |
| 5 | :visible.sync="visible" | 5 | :visible.sync="visible" |
| 6 | class="NCC-dialog NCC-dialog_center" | 6 | class="NCC-dialog NCC-dialog_center" |
| @@ -20,13 +20,13 @@ | @@ -20,13 +20,13 @@ | ||
| 20 | </el-col> | 20 | </el-col> |
| 21 | <el-col :span="24"> | 21 | <el-col :span="24"> |
| 22 | <div class="form-item"> | 22 | <div class="form-item"> |
| 23 | - <div class="label w-100">平台名称</div> | 23 | + <div class="label w-100">系统名称</div> |
| 24 | {{ dataForm.platformName || "--" }} | 24 | {{ dataForm.platformName || "--" }} |
| 25 | </div> | 25 | </div> |
| 26 | </el-col> | 26 | </el-col> |
| 27 | <el-col :span="24"> | 27 | <el-col :span="24"> |
| 28 | <div class="form-item"> | 28 | <div class="form-item"> |
| 29 | - <div class="label w-100">平台类型</div> | 29 | + <div class="label w-100">系统类型</div> |
| 30 | {{ dataForm.platformType || "--" }} | 30 | {{ dataForm.platformType || "--" }} |
| 31 | </div> | 31 | </div> |
| 32 | </el-col> | 32 | </el-col> |
| @@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
| 77 | </el-col> | 77 | </el-col> |
| 78 | <el-col :span="14"> | 78 | <el-col :span="14"> |
| 79 | <el-row> | 79 | <el-row> |
| 80 | - <el-col :span="24" class="form_title"> 判研建议 </el-col> | 80 | + <el-col :span="24" class="form_title"> 研判建议 </el-col> |
| 81 | <el-form | 81 | <el-form |
| 82 | ref="suggestionForm" | 82 | ref="suggestionForm" |
| 83 | :rules="rules" | 83 | :rules="rules" |
| @@ -265,7 +265,7 @@ export default { | @@ -265,7 +265,7 @@ export default { | ||
| 265 | !this.suggestionForm.reviewType | 265 | !this.suggestionForm.reviewType |
| 266 | ) { | 266 | ) { |
| 267 | this.$message({ | 267 | this.$message({ |
| 268 | - message: "判研建议不能为空!", | 268 | + message: "研判建议不能为空!", |
| 269 | type: "danger", | 269 | type: "danger", |
| 270 | }); | 270 | }); |
| 271 | } | 271 | } |
src/views/DisposalSuggestions/index.vue
| @@ -37,8 +37,8 @@ | @@ -37,8 +37,8 @@ | ||
| 37 | </el-row> | 37 | </el-row> |
| 38 | <div class="NCC-common-layout-main NCC-flex-main"> | 38 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 39 | <NCC-table v-loading="listLoading" :data="list"> | 39 | <NCC-table v-loading="listLoading" :data="list"> |
| 40 | - <el-table-column show-overflow-tooltip prop="platformName" label="平台名称" align="left" /> | ||
| 41 | - <el-table-column show-overflow-tooltip label="平台类型" prop="platformType" align="left"> | 40 | + <el-table-column show-overflow-tooltip prop="platformName" label="系统名称" align="left" /> |
| 41 | + <el-table-column show-overflow-tooltip label="系统类型" prop="platformType" align="left"> | ||
| 42 | <template slot-scope="scope">{{ scope.row.platformType | dynamicTextUP(systemTypeOptions) }}</template> | 42 | <template slot-scope="scope">{{ scope.row.platformType | dynamicTextUP(systemTypeOptions) }}</template> |
| 43 | </el-table-column> | 43 | </el-table-column> |
| 44 | <el-table-column show-overflow-tooltip label="问题类型" prop="questionType" align="left"> | 44 | <el-table-column show-overflow-tooltip label="问题类型" prop="questionType" align="left"> |
| @@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
| 57 | </el-table-column> --> | 57 | </el-table-column> --> |
| 58 | <el-table-column label="操作" fixed="right" width="100"> | 58 | <el-table-column label="操作" fixed="right" width="100"> |
| 59 | <template slot-scope="scope"> | 59 | <template slot-scope="scope"> |
| 60 | - <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >判研</el-button> | 60 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >研判</el-button> |
| 61 | </template> | 61 | </template> |
| 62 | </el-table-column> | 62 | </el-table-column> |
| 63 | </NCC-table> | 63 | </NCC-table> |
src/views/Login.vue
| @@ -56,8 +56,8 @@ export default { | @@ -56,8 +56,8 @@ export default { | ||
| 56 | data() { | 56 | data() { |
| 57 | return { | 57 | return { |
| 58 | form: { | 58 | form: { |
| 59 | - account: "", // cdoffice | ||
| 60 | - password: "", // 123456 | 59 | + account: "wd", // cdoffice |
| 60 | + password: "123456", // 123456 | ||
| 61 | }, | 61 | }, |
| 62 | rules: { | 62 | rules: { |
| 63 | account: { required: true, message: "用户名不能为空", trigger: "blur" }, | 63 | account: { required: true, message: "用户名不能为空", trigger: "blur" }, |
src/views/baseCaseHandling/Form.vue
| @@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
| 45 | </el-form-item> | 45 | </el-form-item> |
| 46 | </el-col> | 46 | </el-col> |
| 47 | <el-col :span="24"> | 47 | <el-col :span="24"> |
| 48 | - <el-form-item label="注册主体" prop="registeredEntity"> | 48 | + <el-form-item label="主体企业" prop="registeredEntity"> |
| 49 | <el-input v-model="dataForm.registeredEntity" placeholder="选择系统自动带出" clearable disabled/> | 49 | <el-input v-model="dataForm.registeredEntity" placeholder="选择系统自动带出" clearable disabled/> |
| 50 | </el-form-item> | 50 | </el-form-item> |
| 51 | </el-col> | 51 | </el-col> |
src/views/baseCaseHandling/index.vue
| @@ -8,14 +8,10 @@ | @@ -8,14 +8,10 @@ | ||
| 8 | <el-form @submit.native.prevent size="mini"> | 8 | <el-form @submit.native.prevent size="mini"> |
| 9 | <el-col :span="4"> | 9 | <el-col :span="4"> |
| 10 | <el-form-item label=""> | 10 | <el-form-item label=""> |
| 11 | - <el-input | ||
| 12 | - v-model="query.number" | ||
| 13 | - placeholder="档案号" | ||
| 14 | - clearable | ||
| 15 | - /> | 11 | + <el-input v-model="query.number" placeholder="请输入档案号" clearable/> |
| 16 | </el-form-item> | 12 | </el-form-item> |
| 17 | </el-col> | 13 | </el-col> |
| 18 | - <el-col :span="4"> | 14 | + <!-- <el-col :span="4"> |
| 19 | <el-form-item label=""> | 15 | <el-form-item label=""> |
| 20 | <el-date-picker | 16 | <el-date-picker |
| 21 | v-model="query.registrationTime" | 17 | v-model="query.registrationTime" |
| @@ -27,23 +23,15 @@ | @@ -27,23 +23,15 @@ | ||
| 27 | > | 23 | > |
| 28 | </el-date-picker> | 24 | </el-date-picker> |
| 29 | </el-form-item> | 25 | </el-form-item> |
| 30 | - </el-col> | 26 | + </el-col> --> |
| 31 | <el-col :span="4"> | 27 | <el-col :span="4"> |
| 32 | <el-form-item label=""> | 28 | <el-form-item label=""> |
| 33 | - <el-input | ||
| 34 | - v-model="query.systemName" | ||
| 35 | - placeholder="网站/APP名称" | ||
| 36 | - clearable | ||
| 37 | - /> | 29 | + <el-input v-model="query.systemName" placeholder="请输入系统名称" clearable/> |
| 38 | </el-form-item> | 30 | </el-form-item> |
| 39 | </el-col> | 31 | </el-col> |
| 40 | <el-col :span="4"> | 32 | <el-col :span="4"> |
| 41 | <el-form-item label=""> | 33 | <el-form-item label=""> |
| 42 | - <el-select | ||
| 43 | - v-model="query.category" | ||
| 44 | - placeholder="类别" | ||
| 45 | - clearable | ||
| 46 | - > | 34 | + <el-select v-model="query.category" placeholder="系统类别" clearable> |
| 47 | <el-option | 35 | <el-option |
| 48 | v-for="(item, index) in systemTypeOptions" | 36 | v-for="(item, index) in systemTypeOptions" |
| 49 | :key="index" | 37 | :key="index" |
| @@ -55,28 +43,15 @@ | @@ -55,28 +43,15 @@ | ||
| 55 | </el-col> | 43 | </el-col> |
| 56 | <el-col :span="3"> | 44 | <el-col :span="3"> |
| 57 | <el-form-item> | 45 | <el-form-item> |
| 58 | - <el-button | ||
| 59 | - type="primary" | ||
| 60 | - icon="el-icon-search" | ||
| 61 | - @click="search()" | ||
| 62 | - >查询</el-button | ||
| 63 | - > | 46 | + <el-button type="primary" icon="el-icon-search" @click="search()" >查询</el-button> |
| 64 | </el-form-item> | 47 | </el-form-item> |
| 48 | + <div class="NCC-common-search-box-right"> | ||
| 49 | + <el-button type="success" icon="el-icon-plus" size="mini" @click="addOrUpdateHandle()">新增</el-button> | ||
| 50 | + </div> | ||
| 65 | </el-col> | 51 | </el-col> |
| 66 | </el-form> | 52 | </el-form> |
| 67 | </el-row> | 53 | </el-row> |
| 68 | <div class="NCC-common-layout-main NCC-flex-main"> | 54 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 69 | - <div class="NCC-common-head"> | ||
| 70 | - <div> | ||
| 71 | - <el-button | ||
| 72 | - type="primary" | ||
| 73 | - icon="el-icon-plus" | ||
| 74 | - size="mini" | ||
| 75 | - @click="addOrUpdateHandle()" | ||
| 76 | - >新增</el-button | ||
| 77 | - > | ||
| 78 | - </div> | ||
| 79 | - </div> | ||
| 80 | <NCC-table | 55 | <NCC-table |
| 81 | v-loading="listLoading" | 56 | v-loading="listLoading" |
| 82 | :data="list" | 57 | :data="list" |
| @@ -85,8 +60,8 @@ | @@ -85,8 +60,8 @@ | ||
| 85 | <!-- <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> --> | 60 | <!-- <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> --> |
| 86 | <el-table-column prop="number" label="档案号" align="left" show-overflow-tooltip/> | 61 | <el-table-column prop="number" label="档案号" align="left" show-overflow-tooltip/> |
| 87 | <el-table-column prop="registrationTime" label="登记时间" :formatter="ncc.tableDateFormat" align="left" show-overflow-tooltip/> | 62 | <el-table-column prop="registrationTime" label="登记时间" :formatter="ncc.tableDateFormat" align="left" show-overflow-tooltip/> |
| 88 | - <el-table-column prop="systemName" label="网站/APP名称" align="left" width="150" show-overflow-tooltip/> | ||
| 89 | - <el-table-column prop="registeredEntity" label="注册主体" align="left" show-overflow-tooltip/> | 63 | + <el-table-column prop="systemName" label="系统名称" align="left" width="150" show-overflow-tooltip/> |
| 64 | + <el-table-column prop="registeredEntity" label="主体企业" align="left" show-overflow-tooltip/> | ||
| 90 | <el-table-column label="类别" prop="category" align="left"> | 65 | <el-table-column label="类别" prop="category" align="left"> |
| 91 | <template slot-scope="scope">{{ scope.row.category | dynamicTextUP(systemTypeOptions) }}</template> | 66 | <template slot-scope="scope">{{ scope.row.category | dynamicTextUP(systemTypeOptions) }}</template> |
| 92 | </el-table-column> | 67 | </el-table-column> |
| @@ -98,7 +73,9 @@ | @@ -98,7 +73,9 @@ | ||
| 98 | <el-table-column prop="punishmentRequirements" label="处罚要求" align="left" show-overflow-tooltip/> | 73 | <el-table-column prop="punishmentRequirements" label="处罚要求" align="left" show-overflow-tooltip/> |
| 99 | <el-table-column prop="punishmentContent" label="处罚内容" align="left" show-overflow-tooltip/> | 74 | <el-table-column prop="punishmentContent" label="处罚内容" align="left" show-overflow-tooltip/> |
| 100 | <el-table-column label="状态" prop="state" align="left" > | 75 | <el-table-column label="状态" prop="state" align="left" > |
| 101 | - <template slot-scope="scope">{{ scope.row.state | dynamicTextUP(stateOptions) }}</template> | 76 | + <template slot-scope="scope"> |
| 77 | + <el-tag :type="ncc.getStateTagType(scope.row.state, stateOptions)">{{ scope.row.state | dynamicTextUP(stateOptions) }}</el-tag> | ||
| 78 | + </template> | ||
| 102 | </el-table-column> | 79 | </el-table-column> |
| 103 | <el-table-column label="操作" fixed="right" width="180"> | 80 | <el-table-column label="操作" fixed="right" width="180"> |
| 104 | <template slot-scope="scope"> | 81 | <template slot-scope="scope"> |
| @@ -172,10 +149,7 @@ export default { | @@ -172,10 +149,7 @@ export default { | ||
| 172 | { fullName: "选项一", id: "选项一" }, | 149 | { fullName: "选项一", id: "选项一" }, |
| 173 | { fullName: "", id: "选项二" }, | 150 | { fullName: "", id: "选项二" }, |
| 174 | ], | 151 | ], |
| 175 | - stateOptions: [ | ||
| 176 | - { fullName: "选项一", id: "1" }, | ||
| 177 | - { fullName: "选项二", id: "2" }, | ||
| 178 | - ], | 152 | + stateOptions: [], |
| 179 | areaOptions: [], | 153 | areaOptions: [], |
| 180 | }; | 154 | }; |
| 181 | }, | 155 | }, |
src/views/baseInspectionReport/Form.vue
| @@ -3,9 +3,9 @@ | @@ -3,9 +3,9 @@ | ||
| 3 | :title="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" | 3 | :title="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" |
| 4 | :close-on-click-modal="false" | 4 | :close-on-click-modal="false" |
| 5 | :visible.sync="visible" | 5 | :visible.sync="visible" |
| 6 | - class="NCC-dialog NCC-dialog_center" | 6 | + class="NCC-dialog NCC-dialog_center baseInspectionReportForm" |
| 7 | lock-scroll | 7 | lock-scroll |
| 8 | - width="60%" | 8 | + width="50%" |
| 9 | > | 9 | > |
| 10 | <el-row :gutter="15" class="NCC-dialog-content"> | 10 | <el-row :gutter="15" class="NCC-dialog-content"> |
| 11 | <el-form | 11 | <el-form |
| @@ -19,161 +19,93 @@ | @@ -19,161 +19,93 @@ | ||
| 19 | > | 19 | > |
| 20 | <el-col :span="23" v-if="false"> | 20 | <el-col :span="23" v-if="false"> |
| 21 | <el-form-item label="主键" prop="id"> | 21 | <el-form-item label="主键" prop="id"> |
| 22 | - <el-input | ||
| 23 | - v-model="dataForm.id" | ||
| 24 | - placeholder="请输入" | ||
| 25 | - clearable | ||
| 26 | - :style="{ width: '100%' }" | ||
| 27 | - > | ||
| 28 | - </el-input> | 22 | + <el-input v-model="dataForm.id" placeholder="请输入" clearable :style="{ width: '100%' }"></el-input> |
| 29 | </el-form-item> | 23 | </el-form-item> |
| 30 | </el-col> | 24 | </el-col> |
| 31 | <el-col :span="23"> | 25 | <el-col :span="23"> |
| 32 | <el-form-item label="问题来源" prop="source"> | 26 | <el-form-item label="问题来源" prop="source"> |
| 33 | <el-radio-group v-model="dataForm.source"> | 27 | <el-radio-group v-model="dataForm.source"> |
| 34 | - <el-radio | ||
| 35 | - v-for="(item, index) in sourceOptions" | ||
| 36 | - :key="index" | ||
| 37 | - :label="item.Id" | ||
| 38 | - >{{ item.FullName }}</el-radio | ||
| 39 | - > | 28 | + <el-radio v-for="(item, index) in sourceOptions" :key="index" :label="item.Id">{{ item.FullName }}</el-radio> |
| 40 | </el-radio-group> | 29 | </el-radio-group> |
| 41 | </el-form-item> | 30 | </el-form-item> |
| 42 | </el-col> | 31 | </el-col> |
| 43 | <el-col :span="23"> | 32 | <el-col :span="23"> |
| 44 | - <el-form-item label="平台名称" prop="platformName"> | 33 | + <el-form-item label="系统名称" prop="platformName"> |
| 45 | <el-select | 34 | <el-select |
| 35 | + ref="select" | ||
| 46 | v-model="dataForm.platformName" | 36 | v-model="dataForm.platformName" |
| 47 | filterable | 37 | filterable |
| 48 | remote | 38 | remote |
| 49 | reserve-keyword | 39 | reserve-keyword |
| 50 | - placeholder="请输入平台名称" | ||
| 51 | - :remote-method="loadList" | ||
| 52 | - :loading="name_loading"> | ||
| 53 | - <el-option | ||
| 54 | - v-for="item in nameOptions" | ||
| 55 | - :key="item.value" | ||
| 56 | - :label="item.label" | ||
| 57 | - :value="item.value"> | ||
| 58 | - </el-option> | 40 | + placeholder="请输入系统名称" |
| 41 | + @blur.native.capture="selectBlur" | ||
| 42 | + @visible-change="visibleNameChange" | ||
| 43 | + @change="(val) => platformNameChange(val, 'change')" | ||
| 44 | + :loading="name_loading" | ||
| 45 | + :disabled="!!this.dataForm.id"> | ||
| 46 | + <el-option v-for="item in nameOptions" :key="item.id" :label="item.systemName" :value="item.id"></el-option> | ||
| 59 | </el-select> | 47 | </el-select> |
| 60 | </el-form-item> | 48 | </el-form-item> |
| 61 | </el-col> | 49 | </el-col> |
| 62 | <el-col :span="23"> | 50 | <el-col :span="23"> |
| 63 | - <el-form-item label="平台类型" prop="platformType"> | ||
| 64 | - <el-radio-group v-model="dataForm.platformType" :style="{}"> | ||
| 65 | - <el-radio | ||
| 66 | - v-for="(item, index) in platformTypeOptions" | ||
| 67 | - :key="index" | ||
| 68 | - :label="item.Id" | ||
| 69 | - >{{ item.FullName }}</el-radio | ||
| 70 | - > | 51 | + <el-form-item label="系统类型" prop="platformType"> |
| 52 | + <el-radio-group v-model="dataForm.platformType" :disabled='isDisabledTypeByName || !!this.dataForm.id'> | ||
| 53 | + <el-radio v-for="(item, index) in platformTypeOptions" :key="index" :label="item.Id">{{ item.FullName }}</el-radio> | ||
| 71 | </el-radio-group> | 54 | </el-radio-group> |
| 72 | </el-form-item> | 55 | </el-form-item> |
| 73 | </el-col> | 56 | </el-col> |
| 74 | - <el-col :span="18"> | 57 | + <el-col :span="23" v-show="dataForm.platformType == '580634746028033285' && !isDisabledTypeByName"> |
| 58 | + <el-form-item label="归属平台" prop="selfMediaPlatformType"> | ||
| 59 | + <el-input v-model="dataForm.selfMediaPlatformType" placeholder="请输入归属平台" clearable :style="{ width: '100%' }" :disabled="!!this.dataForm.id"/> | ||
| 60 | + </el-form-item> | ||
| 61 | + </el-col> | ||
| 62 | + <el-col :span="23"> | ||
| 75 | <el-form-item label="问题类型" prop="questionType"> | 63 | <el-form-item label="问题类型" prop="questionType"> |
| 76 | - <el-radio-group v-model="dataForm.questionType" @change="questionTypeChange"> | ||
| 77 | - <el-radio | ||
| 78 | - v-for="(item, index) in questionTypeOptions" | ||
| 79 | - :key="index" | ||
| 80 | - :label="item.fullName" | ||
| 81 | - >{{ item.fullName }}</el-radio | ||
| 82 | - > | ||
| 83 | - <el-radio label="其他">其他</el-radio> | 64 | + <el-radio-group v-model="dataForm.questionType"> |
| 65 | + <el-radio v-for="(item, index) in questionTypeOptions" :key="index" :label="item.fullName" >{{ item.fullName }}</el-radio> | ||
| 84 | </el-radio-group> | 66 | </el-radio-group> |
| 85 | </el-form-item> | 67 | </el-form-item> |
| 86 | </el-col> | 68 | </el-col> |
| 87 | - <template v-if="otherQuestion"> | ||
| 88 | - <el-col :span="5"> | ||
| 89 | - <el-input | ||
| 90 | - v-model="dataForm.otherQuestionType" | ||
| 91 | - placeholder="请输入问题类型" | ||
| 92 | - clearable | ||
| 93 | - :style="{ width: '100%' }" | ||
| 94 | - > | ||
| 95 | - </el-input> | ||
| 96 | - </el-col> | ||
| 97 | - </template> | ||
| 98 | - <template v-if="showErrflag"> | ||
| 99 | - <el-col :span="12"> | ||
| 100 | - <el-form-item label="正确描述" prop="accurateDescription"> | ||
| 101 | - <el-input | ||
| 102 | - v-model="dataForm.accurateDescription" | ||
| 103 | - placeholder="请输入正确描述" | ||
| 104 | - clearable | ||
| 105 | - :style="{ width: '100%' }" | ||
| 106 | - > | ||
| 107 | - </el-input> | ||
| 108 | - </el-form-item> | ||
| 109 | - </el-col> | ||
| 110 | - <el-col :span="11"> | ||
| 111 | - <el-form-item label="错误描述" prop="incorrectDescription"> | ||
| 112 | - <el-input | ||
| 113 | - v-model="dataForm.incorrectDescription" | ||
| 114 | - placeholder="请输入错误描述" | ||
| 115 | - clearable | ||
| 116 | - :style="{ width: '100%' }" | ||
| 117 | - > | ||
| 118 | - </el-input> | ||
| 119 | - </el-form-item> | ||
| 120 | - </el-col> | ||
| 121 | - </template> | ||
| 122 | - | 69 | + <el-col :span="23" v-show="dataForm.questionType == '其他'"> |
| 70 | + <el-form-item label="其他问题类型" prop="otherQuestionType"> | ||
| 71 | + <el-input v-model="dataForm.otherQuestionType" placeholder="请输入其他问题类型" clearable :style="{ width: '100%' }" /> | ||
| 72 | + </el-form-item> | ||
| 73 | + </el-col> | ||
| 74 | + <el-col :span="23" v-show="dataForm.questionType == '错误表述'"> | ||
| 75 | + <el-form-item label="正确描述" prop="accurateDescription"> | ||
| 76 | + <el-input v-model="dataForm.accurateDescription" placeholder="请输入正确描述" clearable :style="{ width: '100%' }"></el-input> | ||
| 77 | + </el-form-item> | ||
| 78 | + </el-col> | ||
| 79 | + <el-col :span="23" v-show="dataForm.questionType == '错误表述'"> | ||
| 80 | + <el-form-item label="错误描述" prop="incorrectDescription"> | ||
| 81 | + <el-input v-model="dataForm.incorrectDescription" placeholder="请输入错误描述" clearable :style="{ width: '100%' }"></el-input> | ||
| 82 | + </el-form-item> | ||
| 83 | + </el-col> | ||
| 123 | <el-col :span="23"> | 84 | <el-col :span="23"> |
| 124 | <el-form-item label="问题内容" prop="questionContent"> | 85 | <el-form-item label="问题内容" prop="questionContent"> |
| 125 | - <el-input | ||
| 126 | - v-model="dataForm.questionContent" | ||
| 127 | - placeholder="请输入" | ||
| 128 | - show-word-limit | ||
| 129 | - :style="{ width: '100%' }" | ||
| 130 | - type="textarea" | ||
| 131 | - :autosize="{ minRows: 4, maxRows: 4 }" | ||
| 132 | - > | ||
| 133 | - </el-input> | 86 | + <el-input v-model="dataForm.questionContent" placeholder="请输入" show-word-limit :style="{ width: '100%' }" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }" /> |
| 134 | </el-form-item> | 87 | </el-form-item> |
| 135 | </el-col> | 88 | </el-col> |
| 136 | <el-col :span="23"> | 89 | <el-col :span="23"> |
| 137 | - <el-form-item label="有害链接" prop="link"> | ||
| 138 | - <el-input | ||
| 139 | - v-model="dataForm.link" | ||
| 140 | - placeholder="请输入" | ||
| 141 | - clearable | ||
| 142 | - :style="{ width: '100%' }" | ||
| 143 | - > | ||
| 144 | - </el-input> | 90 | + <el-form-item label="链接" prop="link"> |
| 91 | + <el-input v-model="dataForm.link" placeholder="请输入链接" clearable :style="{ width: '100%' }"></el-input> | ||
| 145 | </el-form-item> | 92 | </el-form-item> |
| 146 | </el-col> | 93 | </el-col> |
| 147 | <el-col :span="23"> | 94 | <el-col :span="23"> |
| 148 | <el-form-item label="关键词" prop="questionClass"> | 95 | <el-form-item label="关键词" prop="questionClass"> |
| 149 | - <el-input | ||
| 150 | - v-model="dataForm.questionClass" | ||
| 151 | - placeholder="请输入关键词" | ||
| 152 | - clearable | ||
| 153 | - :style="{ width: '100%' }" | ||
| 154 | - > | ||
| 155 | - </el-input> | 96 | + <el-input v-model="dataForm.questionClass" placeholder="请输入关键词" clearable :style="{ width: '100%' }"></el-input> |
| 156 | </el-form-item> | 97 | </el-form-item> |
| 157 | </el-col> | 98 | </el-col> |
| 158 | <el-col :span="23"> | 99 | <el-col :span="23"> |
| 159 | <el-form-item label="附件" prop="obtainEvidence"> | 100 | <el-form-item label="附件" prop="obtainEvidence"> |
| 160 | - <NCC-UploadFz | ||
| 161 | - v-model="dataForm.obtainEvidence" | ||
| 162 | - :fileSize="5" | ||
| 163 | - sizeUnit="MB" | ||
| 164 | - :limit="9" | ||
| 165 | - buttonText="点击上传" | ||
| 166 | - > | ||
| 167 | - </NCC-UploadFz> | 101 | + <NCC-UploadFz v-model="dataForm.obtainEvidence" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" /> |
| 168 | </el-form-item> | 102 | </el-form-item> |
| 169 | </el-col> | 103 | </el-col> |
| 170 | </el-form> | 104 | </el-form> |
| 171 | </el-row> | 105 | </el-row> |
| 172 | <span slot="footer" class="dialog-footer"> | 106 | <span slot="footer" class="dialog-footer"> |
| 173 | <el-button @click="visible = false">取 消</el-button> | 107 | <el-button @click="visible = false">取 消</el-button> |
| 174 | - <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" | ||
| 175 | - >确 定</el-button | ||
| 176 | - > | 108 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> |
| 177 | </span> | 109 | </span> |
| 178 | </el-dialog> | 110 | </el-dialog> |
| 179 | </template> | 111 | </template> |
| @@ -194,7 +126,8 @@ export default { | @@ -194,7 +126,8 @@ export default { | ||
| 194 | dataForm: { | 126 | dataForm: { |
| 195 | id: undefined, | 127 | id: undefined, |
| 196 | source: undefined, | 128 | source: undefined, |
| 197 | - platformName: undefined, | 129 | + platformName: '', |
| 130 | + selfMediaPlatformType: '', | ||
| 198 | platformType: undefined, | 131 | platformType: undefined, |
| 199 | questionType: undefined, | 132 | questionType: undefined, |
| 200 | questionClass: undefined, | 133 | questionClass: undefined, |
| @@ -207,33 +140,32 @@ export default { | @@ -207,33 +140,32 @@ export default { | ||
| 207 | otherQuestionType: undefined | 140 | otherQuestionType: undefined |
| 208 | }, | 141 | }, |
| 209 | rules: { | 142 | rules: { |
| 143 | + platformName: [ | ||
| 144 | + { required: true, message: "请选择系统名称", trigger: "blur" }, | ||
| 145 | + ], | ||
| 210 | platformType: [ | 146 | platformType: [ |
| 211 | - { required: true, message: "请选择平台类型", trigger: "change" }, | 147 | + { required: true, message: "请选择系统类型", trigger: "blur" }, |
| 212 | ], | 148 | ], |
| 213 | questionType: [ | 149 | questionType: [ |
| 214 | - { required: true, message: "请选择问题类型", trigger: "change" }, | 150 | + { required: true, message: "请选择问题类型", trigger: "blur" }, |
| 215 | ], | 151 | ], |
| 152 | + // otherQuestionType: [ | ||
| 153 | + // { required: true, message: "请输入其他问题类型", trigger: "blur" }, | ||
| 154 | + // ], | ||
| 216 | }, | 155 | }, |
| 217 | - sourceOptions: [ | ||
| 218 | - { fullName: "市网信办线索", id: "市网信办线索" }, | ||
| 219 | - { fullName: "自主巡查发现", id: "自主巡查发现" }, | ||
| 220 | - ], | 156 | + sourceOptions: [], |
| 221 | platformTypeOptions: [], | 157 | platformTypeOptions: [], |
| 222 | questionTypeOptions: [], | 158 | questionTypeOptions: [], |
| 223 | - questionClassOptions: [ | ||
| 224 | - { fullName: "选项一", id: "1" }, | ||
| 225 | - { fullName: "选项二", id: "2" }, | ||
| 226 | - ], | ||
| 227 | - stageOptions: [ | ||
| 228 | - { fullName: "选项一", id: "1" }, | ||
| 229 | - { fullName: "选项二", id: "2" }, | ||
| 230 | - ], | ||
| 231 | - showErrflag: false, | ||
| 232 | - otherQuestion: false, | ||
| 233 | nameOptions: [], | 159 | nameOptions: [], |
| 234 | }; | 160 | }; |
| 235 | }, | 161 | }, |
| 236 | - computed: {}, | 162 | + computed: { |
| 163 | + isDisabledTypeByName() { | ||
| 164 | + if(!this.nameOptions.length) return false; | ||
| 165 | + let index = this.nameOptions.findIndex(v => v.id == this.dataForm.platformName); | ||
| 166 | + return index != -1; | ||
| 167 | + } | ||
| 168 | + }, | ||
| 237 | watch: {}, | 169 | watch: {}, |
| 238 | created() { | 170 | created() { |
| 239 | this.loadList(); | 171 | this.loadList(); |
| @@ -243,29 +175,36 @@ export default { | @@ -243,29 +175,36 @@ export default { | ||
| 243 | }, | 175 | }, |
| 244 | mounted() {}, | 176 | mounted() {}, |
| 245 | methods: { | 177 | methods: { |
| 246 | - loadList(query) { | 178 | + selectBlur(e) { |
| 179 | + let value = e.target.value; | ||
| 180 | + if(!value) return; | ||
| 181 | + this.dataForm.platformName = e.target.value; | ||
| 182 | + this.platformNameChange(value, 'blur'); | ||
| 183 | + }, | ||
| 184 | + platformNameChange(val, type) { | ||
| 185 | + let obj = this.nameOptions.find(v => type == 'blur' ? val == v.fullName : val == v.id); | ||
| 186 | + this.dataForm.platformName = obj ? obj.id : val; | ||
| 187 | + this.dataForm.platformType = obj ? obj.systemType : ''; | ||
| 188 | + this.dataForm.selfMediaPlatformType = obj ? obj.platform : ''; | ||
| 189 | + }, | ||
| 190 | + visibleNameChange(val) { | ||
| 191 | + if (val) return | ||
| 192 | + let input = this.$refs.select.$children[0].$refs.input; | ||
| 193 | + input.blur(); | ||
| 194 | + }, | ||
| 195 | + loadList() { | ||
| 247 | this.name_loading = true; | 196 | this.name_loading = true; |
| 248 | - getInfoList({pageIndex: 1, pageSize: 100, keyword: query }).then(({ data }) => { | ||
| 249 | - let list = []; | ||
| 250 | - data.list.length && | ||
| 251 | - data.list.forEach((item) => { | ||
| 252 | - list.push({ | ||
| 253 | - label: item.SysytemInfo.SystemName, | ||
| 254 | - value: item.SysytemInfo.Id, | ||
| 255 | - }); | ||
| 256 | - }); | ||
| 257 | - this.nameOptions = list; | 197 | + request({ |
| 198 | + url: `/Extend/basesysteminfo/GetNoPagingList`, | ||
| 199 | + method: "GET", | ||
| 200 | + }).then(({data}) => { | ||
| 201 | + this.nameOptions = data; | ||
| 258 | this.name_loading = false; | 202 | this.name_loading = false; |
| 259 | - }); | ||
| 260 | - }, | ||
| 261 | - questionTypeChange(v) { | ||
| 262 | - this.showErrflag = Boolean(v == '错误表述'); | ||
| 263 | - this.otherQuestion = Boolean(v == '其他'); | 203 | + }) |
| 264 | }, | 204 | }, |
| 265 | async getplatformTypeOptions() { | 205 | async getplatformTypeOptions() { |
| 266 | let list = this.$store.state.meta.system; | 206 | let list = this.$store.state.meta.system; |
| 267 | - !list && | ||
| 268 | - (list = await this.$store.dispatch("getTypeListByCode", "system")); | 207 | + !list && (list = await this.$store.dispatch("getTypeListByCode", "system")); |
| 269 | this.platformTypeOptions = list; | 208 | this.platformTypeOptions = list; |
| 270 | }, | 209 | }, |
| 271 | async getSourceOptions() { | 210 | async getSourceOptions() { |
| @@ -278,17 +217,15 @@ export default { | @@ -278,17 +217,15 @@ export default { | ||
| 278 | }, | 217 | }, |
| 279 | getquestionTypeOptions() { | 218 | getquestionTypeOptions() { |
| 280 | getDictionaryDataSelector("577006814432855301").then((res) => { | 219 | getDictionaryDataSelector("577006814432855301").then((res) => { |
| 281 | - this.questionTypeOptions = res.data.list; | 220 | + this.questionTypeOptions = [...res.data.list, {Id: '0', fullName: '其他'}]; |
| 282 | }); | 221 | }); |
| 283 | }, | 222 | }, |
| 284 | goBack() { | 223 | goBack() { |
| 285 | this.$emit("refresh"); | 224 | this.$emit("refresh"); |
| 286 | }, | 225 | }, |
| 287 | init(id, isDetail) { | 226 | init(id, isDetail) { |
| 288 | - this.dataForm.id = id || 0; | 227 | + this.dataForm.id = id || ''; |
| 289 | this.visible = true; | 228 | this.visible = true; |
| 290 | - this.otherQuestion = false; | ||
| 291 | - this.showErrflag = false; | ||
| 292 | this.isDetail = isDetail || false; | 229 | this.isDetail = isDetail || false; |
| 293 | this.$nextTick(async () => { | 230 | this.$nextTick(async () => { |
| 294 | this.$refs["elForm"].resetFields(); | 231 | this.$refs["elForm"].resetFields(); |
| @@ -299,28 +236,20 @@ export default { | @@ -299,28 +236,20 @@ export default { | ||
| 299 | this.dataForm.otherQuestionType = res.data.questionType; | 236 | this.dataForm.otherQuestionType = res.data.questionType; |
| 300 | this.dataForm.questionType = '其他'; | 237 | this.dataForm.questionType = '其他'; |
| 301 | } | 238 | } |
| 239 | + this.dataForm.selfMediaPlatformType = res.data.selfMediaPlatformType || '--'; | ||
| 302 | if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = []; | 240 | if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = []; |
| 303 | if (!this.dataForm.annex) this.dataForm.annex = []; | 241 | if (!this.dataForm.annex) this.dataForm.annex = []; |
| 304 | - this.$nextTick(() => { | ||
| 305 | - this.questionTypeChange(this.dataForm.questionType); | ||
| 306 | - }) | ||
| 307 | } | 242 | } |
| 308 | }); | 243 | }); |
| 309 | }, | 244 | }, |
| 310 | - getQuestionTypeName() { | ||
| 311 | - if(this.dataForm.questionType == '其他') { | ||
| 312 | - return this.dataForm.otherQuestionType; | ||
| 313 | - } else { | ||
| 314 | - return this.dataForm.questionType; | ||
| 315 | - } | ||
| 316 | - }, | ||
| 317 | dataFormSubmit() { | 245 | dataFormSubmit() { |
| 318 | this.$refs["elForm"].validate(async (valid) => { | 246 | this.$refs["elForm"].validate(async (valid) => { |
| 319 | if (valid) { | 247 | if (valid) { |
| 320 | - this.dataForm.questionType = this.getQuestionTypeName(); | ||
| 321 | - let res = !this.dataForm.id | ||
| 322 | - ? await addForm(this.dataForm) | ||
| 323 | - : await updataForm(this.dataForm); | 248 | + let obj = { |
| 249 | + ...this.dataForm, | ||
| 250 | + questionType: this.dataForm.questionType == '其他' ? this.dataForm.otherQuestionType : this.dataForm.questionType, | ||
| 251 | + } | ||
| 252 | + let res = !this.dataForm.id ? await addForm(obj) : await updataForm(obj); | ||
| 324 | this.$message({ | 253 | this.$message({ |
| 325 | message: res.msg, | 254 | message: res.msg, |
| 326 | type: "success", | 255 | type: "success", |
| @@ -335,3 +264,10 @@ export default { | @@ -335,3 +264,10 @@ export default { | ||
| 335 | }, | 264 | }, |
| 336 | }; | 265 | }; |
| 337 | </script> | 266 | </script> |
| 267 | +<style lang="scss" scoped> | ||
| 268 | +.baseInspectionReportForm { | ||
| 269 | + :deep(.el-radio) { | ||
| 270 | + margin: 0 30px 8px 0; | ||
| 271 | + } | ||
| 272 | +} | ||
| 273 | +</style> |
src/views/baseInspectionReport/index.vue
| @@ -28,23 +28,22 @@ | @@ -28,23 +28,22 @@ | ||
| 28 | <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | 28 | <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> |
| 29 | </el-form-item> | 29 | </el-form-item> |
| 30 | </el-col> | 30 | </el-col> |
| 31 | + <div class="NCC-common-search-box-right"> | ||
| 32 | + <el-button type="success" icon="el-icon-plus" @click="addOrUpdateHandle()" size="mini" >新增</el-button> | ||
| 33 | + <!-- <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> --> | ||
| 34 | + </div> | ||
| 31 | </el-form> | 35 | </el-form> |
| 32 | </el-row> | 36 | </el-row> |
| 33 | <div class="NCC-common-layout-main NCC-flex-main"> | 37 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 34 | - <div class="NCC-common-head"> | ||
| 35 | - <div> | ||
| 36 | - <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()" size="mini">新增</el-button> | ||
| 37 | - </div> | ||
| 38 | - </div> | ||
| 39 | <NCC-table v-loading="listLoading" :data="list"> | 38 | <NCC-table v-loading="listLoading" :data="list"> |
| 40 | - <el-table-column show-overflow-tooltip prop="platformName" label="平台名称" align="left" /> | ||
| 41 | - <el-table-column show-overflow-tooltip label="平台类型" prop="platformType" align="left"> | 39 | + <el-table-column show-overflow-tooltip prop="platformName" label="系统名称" align="left" /> |
| 40 | + <el-table-column show-overflow-tooltip label="系统类型" prop="platformType" align="left"> | ||
| 42 | <template slot-scope="scope">{{ scope.row.platformType | dynamicTextUP(systemTypeOptions) }}</template> | 41 | <template slot-scope="scope">{{ scope.row.platformType | dynamicTextUP(systemTypeOptions) }}</template> |
| 43 | </el-table-column> | 42 | </el-table-column> |
| 44 | <el-table-column show-overflow-tooltip label="问题类型" prop="questionType" align="left"> | 43 | <el-table-column show-overflow-tooltip label="问题类型" prop="questionType" align="left"> |
| 45 | <template slot-scope="scope">{{ scope.row.questionType | dynamicText(questionTypeOptions) }}</template> | 44 | <template slot-scope="scope">{{ scope.row.questionType | dynamicText(questionTypeOptions) }}</template> |
| 46 | </el-table-column> | 45 | </el-table-column> |
| 47 | - <el-table-column show-overflow-tooltip prop="link" label="有害链接" align="left" /> | 46 | + <!-- <el-table-column show-overflow-tooltip prop="link" label="有害链接" align="left" /> --> |
| 48 | <el-table-column show-overflow-tooltip prop="questionClass" label="关键词" align="left" /> | 47 | <el-table-column show-overflow-tooltip prop="questionClass" label="关键词" align="left" /> |
| 49 | <!-- <el-table-column show-overflow-tooltip prop="department" label="部门" align="left" /> --> | 48 | <!-- <el-table-column show-overflow-tooltip prop="department" label="部门" align="left" /> --> |
| 50 | <!-- <el-table-column show-overflow-tooltip label="问题分类" prop="questionClass" align="left"> | 49 | <!-- <el-table-column show-overflow-tooltip label="问题分类" prop="questionClass" align="left"> |
src/views/baseListHazardousSamples/index.vue
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | <div class="NCC-common-layout-center"> | 6 | <div class="NCC-common-layout-center"> |
| 7 | <el-row class="NCC-common-search-box" :gutter="16"> | 7 | <el-row class="NCC-common-search-box" :gutter="16"> |
| 8 | <el-form @submit.native.prevent size="mini"> | 8 | <el-form @submit.native.prevent size="mini"> |
| 9 | - <el-col :span="4"> | 9 | + <!-- <el-col :span="4"> |
| 10 | <el-form-item label=""> | 10 | <el-form-item label=""> |
| 11 | <el-date-picker | 11 | <el-date-picker |
| 12 | v-model="query.inputTime" | 12 | v-model="query.inputTime" |
| @@ -18,15 +18,15 @@ | @@ -18,15 +18,15 @@ | ||
| 18 | > | 18 | > |
| 19 | </el-date-picker> | 19 | </el-date-picker> |
| 20 | </el-form-item> | 20 | </el-form-item> |
| 21 | - </el-col> | ||
| 22 | - <el-col :span="4"> | 21 | + </el-col> --> |
| 22 | + <el-col :span="6"> | ||
| 23 | <el-form-item label=""> | 23 | <el-form-item label=""> |
| 24 | - <el-input v-model="query.content" placeholder="具体内容" /> | 24 | + <el-input v-model="query.content" placeholder="请输入具体内容" /> |
| 25 | </el-form-item> | 25 | </el-form-item> |
| 26 | </el-col> | 26 | </el-col> |
| 27 | <el-col :span="4"> | 27 | <el-col :span="4"> |
| 28 | <el-form-item label=""> | 28 | <el-form-item label=""> |
| 29 | - <el-select v-model="query.level" placeholder="级别" clearable> | 29 | + <el-select v-model="query.harmfulInformationTypes" placeholder="请选择有害类型" clearable> |
| 30 | <el-option | 30 | <el-option |
| 31 | v-for="(item, index) in levelOptions" | 31 | v-for="(item, index) in levelOptions" |
| 32 | :key="index" | 32 | :key="index" |
| @@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
| 40 | <el-form-item label=""> | 40 | <el-form-item label=""> |
| 41 | <el-select | 41 | <el-select |
| 42 | v-model="query.company" | 42 | v-model="query.company" |
| 43 | - placeholder="涉及的企业" | 43 | + placeholder="请选择主体企业" |
| 44 | clearable | 44 | clearable |
| 45 | > | 45 | > |
| 46 | <el-option | 46 | <el-option |
| @@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
| 56 | <el-form-item label=""> | 56 | <el-form-item label=""> |
| 57 | <el-select | 57 | <el-select |
| 58 | v-model="query.websitePlatform" | 58 | v-model="query.websitePlatform" |
| 59 | - placeholder="网站平台" | 59 | + placeholder="请选择系统" |
| 60 | clearable | 60 | clearable |
| 61 | > | 61 | > |
| 62 | <el-option | 62 | <el-option |
| @@ -70,30 +70,29 @@ | @@ -70,30 +70,29 @@ | ||
| 70 | </el-col> | 70 | </el-col> |
| 71 | <el-col :span="3"> | 71 | <el-col :span="3"> |
| 72 | <el-form-item> | 72 | <el-form-item> |
| 73 | - <el-button | ||
| 74 | - type="primary" | ||
| 75 | - icon="el-icon-search" | ||
| 76 | - @click="search()" | ||
| 77 | - >查询</el-button | ||
| 78 | - > | 73 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> |
| 79 | </el-form-item> | 74 | </el-form-item> |
| 75 | + <div class="NCC-common-search-box-right"> | ||
| 76 | + <el-button type="primary" icon="el-icon-download" size="mini" @click="toExport" :loading="exportBtnLoading">导出</el-button> | ||
| 77 | + </div> | ||
| 80 | </el-col> | 78 | </el-col> |
| 81 | </el-form> | 79 | </el-form> |
| 82 | </el-row> | 80 | </el-row> |
| 83 | <div class="NCC-common-layout-main NCC-flex-main"> | 81 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 84 | <NCC-table v-loading="listLoading" :data="list"> | 82 | <NCC-table v-loading="listLoading" :data="list"> |
| 85 | - <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> | 83 | + <!-- <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> --> |
| 86 | <el-table-column prop="inputTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> | 84 | <el-table-column prop="inputTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> |
| 87 | - <el-table-column prop="content" label="具体内容" align="left" show-overflow-tooltip/> | ||
| 88 | - <el-table-column label="有害信息类型" prop="harmfulInformationTypes" align="left" show-overflow-tooltip /> | ||
| 89 | - <el-table-column label="涉及的企业" prop="companyStr" align="left" show-overflow-tooltip/> | ||
| 90 | - <el-table-column label="网站平台" prop="websitePlatform" align="left" show-overflow-tooltip> | ||
| 91 | - <template slot-scope="scope">{{ scope.row.websitePlatform | dynamicText(websitePlatformOptions) }}</template> | ||
| 92 | - </el-table-column> | ||
| 93 | - <el-table-column prop="creatorUserId" label="创建用户" show-overflow-tooltip align="left"/> | ||
| 94 | - <el-table-column prop="creatorTime" label="创建时间" align="left" show-overflow-tooltip :formatter="ncc.tableDateFormat"/> | ||
| 95 | - <el-table-column prop="lastModifyUserId" label="修改用户" align="left" show-overflow-tooltip/> | ||
| 96 | - <el-table-column prop="lastModifyTime" label="修改时间" :formatter="ncc.tableDateFormat" show-overflow-tooltip align="left"/> | 85 | + <el-table-column label="运营主体" prop="websitePlatformStr" align="left" show-overflow-tooltip /> |
| 86 | + <el-table-column label="网站平台" prop="websitePlatformStr" align="left" show-overflow-tooltip /> | ||
| 87 | + <el-table-column label="来源" prop="harmfulInformationTypes" align="left" show-overflow-tooltip /> | ||
| 88 | + <el-table-column label="问题类型" prop="websitePlatformStr" align="left" show-overflow-tooltip /> | ||
| 89 | + <el-table-column label="问题内容" prop="websitePlatformStr" align="left" show-overflow-tooltip /> | ||
| 90 | + <el-table-column label="违法原因" prop="websitePlatformStr" align="left" show-overflow-tooltip /> | ||
| 91 | + <el-table-column label="处罚内容" prop="content" align="left" show-overflow-tooltip/> | ||
| 92 | + <!-- <el-table-column prop="creatorUserId" label="创建用户" show-overflow-tooltip align="left"/> --> | ||
| 93 | + <!-- <el-table-column prop="creatorTime" label="创建时间" align="left" show-overflow-tooltip :formatter="ncc.tableDateFormat"/> --> | ||
| 94 | + <!-- <el-table-column prop="lastModifyUserId" label="修改用户" align="left" show-overflow-tooltip/> --> | ||
| 95 | + <!-- <el-table-column prop="lastModifyTime" label="修改时间" :formatter="ncc.tableDateFormat" show-overflow-tooltip align="left"/> --> | ||
| 97 | <!-- <el-table-column label="操作" fixed="right" width="100"> | 96 | <!-- <el-table-column label="操作" fixed="right" width="100"> |
| 98 | <template slot-scope="scope"> | 97 | <template slot-scope="scope"> |
| 99 | <el-button type="text" @click="addOrUpdateHandle(scope.row, ture)">详情</el-button> | 98 | <el-button type="text" @click="addOrUpdateHandle(scope.row, ture)">详情</el-button> |
| @@ -132,7 +131,7 @@ export default { | @@ -132,7 +131,7 @@ export default { | ||
| 132 | query: { | 131 | query: { |
| 133 | inputTime: undefined, | 132 | inputTime: undefined, |
| 134 | content: undefined, | 133 | content: undefined, |
| 135 | - level: undefined, | 134 | + harmfulInformationTypes: undefined, // 有害类型 |
| 136 | company: undefined, | 135 | company: undefined, |
| 137 | websitePlatform: undefined, | 136 | websitePlatform: undefined, |
| 138 | }, | 137 | }, |
| @@ -164,11 +163,14 @@ export default { | @@ -164,11 +163,14 @@ export default { | ||
| 164 | ], | 163 | ], |
| 165 | harmfulInformationTypesOptions: [], | 164 | harmfulInformationTypesOptions: [], |
| 166 | levelOptions: [ | 165 | levelOptions: [ |
| 167 | - { fullName: "选项一", id: "1" }, | ||
| 168 | - { fullName: "选项二", id: "2" }, | 166 | + { fullName: "巡查上报", id: "巡查上报" }, |
| 167 | + { fullName: "案件处理", id: "案件处理" }, | ||
| 169 | ], | 168 | ], |
| 170 | companyOptions: [], | 169 | companyOptions: [], |
| 171 | websitePlatformOptions: [], | 170 | websitePlatformOptions: [], |
| 171 | + | ||
| 172 | + // 导出 | ||
| 173 | + exportBtnLoading: false, | ||
| 172 | }; | 174 | }; |
| 173 | }, | 175 | }, |
| 174 | computed: {}, | 176 | computed: {}, |
| @@ -176,7 +178,7 @@ export default { | @@ -176,7 +178,7 @@ export default { | ||
| 176 | this.initData(); | 178 | this.initData(); |
| 177 | this.getharmfulInformationTypesOptions(); | 179 | this.getharmfulInformationTypesOptions(); |
| 178 | this.getcompanyOptions(); | 180 | this.getcompanyOptions(); |
| 179 | - this.getwebsitePlatformOptions(); | 181 | + // this.getwebsitePlatformOptions(); |
| 180 | }, | 182 | }, |
| 181 | methods: { | 183 | methods: { |
| 182 | getharmfulInformationTypesOptions() { | 184 | getharmfulInformationTypesOptions() { |
| @@ -218,6 +220,33 @@ export default { | @@ -218,6 +220,33 @@ export default { | ||
| 218 | this.listLoading = false; | 220 | this.listLoading = false; |
| 219 | }); | 221 | }); |
| 220 | }, | 222 | }, |
| 223 | + // 导出 | ||
| 224 | + toExport() { | ||
| 225 | + let _query = { | ||
| 226 | + ...this.query, | ||
| 227 | + }; | ||
| 228 | + let query = {}; | ||
| 229 | + for (let key in _query) { | ||
| 230 | + if (Array.isArray(_query[key])) { | ||
| 231 | + query[key] = _query[key].join(); | ||
| 232 | + } else { | ||
| 233 | + query[key] = _query[key]; | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | + this.exportBtnLoading = true; | ||
| 237 | + request({ | ||
| 238 | + url: `/extend/BaseListHazardousSamples/Actions/Export`, | ||
| 239 | + method: "POST", | ||
| 240 | + data: query, | ||
| 241 | + }).then((res) => { | ||
| 242 | + const url = process.env.VUE_APP_BASE_API + res.data.url; | ||
| 243 | + const link = document.createElement("a"); | ||
| 244 | + link.href = url; | ||
| 245 | + link.download = res.data.name; | ||
| 246 | + link.click(); | ||
| 247 | + this.exportBtnLoading = false; | ||
| 248 | + }).catch(() => this.exportBtnLoading = false); | ||
| 249 | + }, | ||
| 221 | handleDel(id) { | 250 | handleDel(id) { |
| 222 | this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { | 251 | this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { |
| 223 | type: "warning", | 252 | type: "warning", |
src/views/basePrincipalResponsibility/Form.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="50%"> | 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center basePrincipalResponsibilityForm" lock-scroll width="40%" v-loading="dialogLoading"> |
| 3 | <el-row :gutter="15" class="NCC-dialog-content" > | 3 | <el-row :gutter="15" class="NCC-dialog-content" > |
| 4 | - <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="110px" label-position="right" :disabled="!!isDetail" :rules="rules"> |
| 5 | <el-col :span="24" v-if="false" > | 5 | <el-col :span="24" v-if="false" > |
| 6 | <el-form-item label="主键" prop="id"> | 6 | <el-form-item label="主键" prop="id"> |
| 7 | <el-input v-model="dataForm.id" placeholder="请输入" clearable :style='{"width":"100%"}' > | 7 | <el-input v-model="dataForm.id" placeholder="请输入" clearable :style='{"width":"100%"}' > |
| @@ -10,17 +10,21 @@ | @@ -10,17 +10,21 @@ | ||
| 10 | </el-col> | 10 | </el-col> |
| 11 | <el-col :span="24" v-if="ncc.hasFormP('fileName')"> | 11 | <el-col :span="24" v-if="ncc.hasFormP('fileName')"> |
| 12 | <el-form-item label="文件名" prop="fileName"> | 12 | <el-form-item label="文件名" prop="fileName"> |
| 13 | - <el-input v-model="dataForm.fileName" placeholder="请输入" clearable :style='{"width":"100%"}' > | ||
| 14 | - </el-input> | 13 | + <el-input v-model="dataForm.fileName" placeholder="请输入文件名" clearable :style='{"width":"100%"}' /> |
| 15 | </el-form-item> | 14 | </el-form-item> |
| 16 | </el-col> | 15 | </el-col> |
| 17 | <el-col :span="24" v-if="ncc.hasFormP('fileType')"> | 16 | <el-col :span="24" v-if="ncc.hasFormP('fileType')"> |
| 18 | <el-form-item label="文件类型" prop="fileType"> | 17 | <el-form-item label="文件类型" prop="fileType"> |
| 19 | - <el-radio-group v-model="dataForm.fileType" :style='{}' > | 18 | + <el-radio-group v-model="dataForm.fileType"> |
| 20 | <el-radio v-for="(item, index) in fileTypeOptions" :key="index" :label="item.id" >{{item.fullName}}</el-radio> | 19 | <el-radio v-for="(item, index) in fileTypeOptions" :key="index" :label="item.id" >{{item.fullName}}</el-radio> |
| 21 | </el-radio-group> | 20 | </el-radio-group> |
| 22 | </el-form-item> | 21 | </el-form-item> |
| 23 | </el-col> | 22 | </el-col> |
| 23 | + <el-col :span="24" v-if="ncc.hasFormP('otherFileType')" v-show="dataForm.fileType == '0'"> | ||
| 24 | + <el-form-item label="其他文件类型" prop="otherFileType"> | ||
| 25 | + <el-input v-model="dataForm.otherFileType" placeholder="请输入其他文件类型" clearable :style='{"width":"100%"}' /> | ||
| 26 | + </el-form-item> | ||
| 27 | + </el-col> | ||
| 24 | <el-col :span="24" v-if="ncc.hasFormP('timeTakingEffect')"> | 28 | <el-col :span="24" v-if="ncc.hasFormP('timeTakingEffect')"> |
| 25 | <el-form-item label="生效时间" prop="timeTakingEffect"> | 29 | <el-form-item label="生效时间" prop="timeTakingEffect"> |
| 26 | <el-date-picker v-model="dataForm.timeTakingEffect" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | 30 | <el-date-picker v-model="dataForm.timeTakingEffect" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > |
| @@ -79,10 +83,18 @@ | @@ -79,10 +83,18 @@ | ||
| 79 | components: {}, | 83 | components: {}, |
| 80 | props: [], | 84 | props: [], |
| 81 | data() { | 85 | data() { |
| 86 | + var validateOtherFileType = (rule, value, callback) => { | ||
| 87 | + if (this.dataForm.fileType == '0' && !value) { | ||
| 88 | + callback(new Error('请输入其他文件类型')); | ||
| 89 | + } else { | ||
| 90 | + callback(); | ||
| 91 | + } | ||
| 92 | + } | ||
| 82 | return { | 93 | return { |
| 83 | loading: false, | 94 | loading: false, |
| 84 | visible: false, | 95 | visible: false, |
| 85 | isDetail: false, | 96 | isDetail: false, |
| 97 | + dialogLoading: false, | ||
| 86 | dataForm: { | 98 | dataForm: { |
| 87 | id:'', | 99 | id:'', |
| 88 | id:undefined, | 100 | id:undefined, |
| @@ -95,8 +107,12 @@ | @@ -95,8 +107,12 @@ | ||
| 95 | creatorTime:undefined, | 107 | creatorTime:undefined, |
| 96 | lastModifyUserId:undefined, | 108 | lastModifyUserId:undefined, |
| 97 | lastModifyTime:undefined, | 109 | lastModifyTime:undefined, |
| 110 | + otherFileType: undefined, | ||
| 98 | }, | 111 | }, |
| 99 | rules: { | 112 | rules: { |
| 113 | + fileName: [{ required: true, message: '请输入文件名称', trigger: 'blur' }], | ||
| 114 | + fileType: [{ required: true, message: '请选择文件类型', trigger: 'blur' }], | ||
| 115 | + otherFileType: [{ validator: validateOtherFileType, trigger: 'blur' }], | ||
| 100 | }, | 116 | }, |
| 101 | fileTypeOptions : [], | 117 | fileTypeOptions : [], |
| 102 | btnLoading: false, | 118 | btnLoading: false, |
| @@ -112,7 +128,7 @@ | @@ -112,7 +128,7 @@ | ||
| 112 | methods: { | 128 | methods: { |
| 113 | getfileTypeOptions(){ | 129 | getfileTypeOptions(){ |
| 114 | getDictionaryDataSelector('577087166203561221').then(res => { | 130 | getDictionaryDataSelector('577087166203561221').then(res => { |
| 115 | - this.fileTypeOptions = res.data.list | 131 | + this.fileTypeOptions = [...res.data.list, { fullName: '其他', id: '0' }] |
| 116 | }); | 132 | }); |
| 117 | }, | 133 | }, |
| 118 | goBack() { | 134 | goBack() { |
| @@ -125,19 +141,34 @@ | @@ -125,19 +141,34 @@ | ||
| 125 | this.$nextTick(() => { | 141 | this.$nextTick(() => { |
| 126 | this.$refs['elForm'].resetFields(); | 142 | this.$refs['elForm'].resetFields(); |
| 127 | if (this.dataForm.id) { | 143 | if (this.dataForm.id) { |
| 144 | + this.dialogLoading = true; | ||
| 128 | request({ | 145 | request({ |
| 129 | url: '/Extend/BasePrincipalResponsibility/' + this.dataForm.id, | 146 | url: '/Extend/BasePrincipalResponsibility/' + this.dataForm.id, |
| 130 | method: 'get' | 147 | method: 'get' |
| 131 | }).then(res =>{ | 148 | }).then(res =>{ |
| 132 | this.dataForm = res.data; | 149 | this.dataForm = res.data; |
| 150 | + this.setTileType(res.data.fileType); | ||
| 133 | if(!this.dataForm.fileUrl)this.dataForm.fileUrl=[]; | 151 | if(!this.dataForm.fileUrl)this.dataForm.fileUrl=[]; |
| 134 | - }) | 152 | + this.dialogLoading = false; |
| 153 | + }).catch(() => this.dialogLoading = false) | ||
| 135 | } | 154 | } |
| 136 | }) | 155 | }) |
| 137 | }, | 156 | }, |
| 157 | + setTileType(val) { | ||
| 158 | + let index = this.fileTypeOptions.findIndex(v => v.id == val); | ||
| 159 | + if(index == -1 || index == (this.fileTypeOptions.length - 1)) { | ||
| 160 | + this.dataForm.fileType = '0'; | ||
| 161 | + this.dataForm.otherFileType = val; | ||
| 162 | + } else { | ||
| 163 | + this.dataForm.fileType = val; | ||
| 164 | + this.dataForm.otherFileType = ''; | ||
| 165 | + } | ||
| 166 | + }, | ||
| 138 | dataFormSubmit() { | 167 | dataFormSubmit() { |
| 139 | this.$refs['elForm'].validate((valid) => { | 168 | this.$refs['elForm'].validate((valid) => { |
| 169 | + console.log(valid); | ||
| 140 | if (valid) { | 170 | if (valid) { |
| 171 | + this.dataForm.fileType = this.dataForm.fileType == '0' ? this.dataForm.otherFileType : this.dataForm.fileType; | ||
| 141 | this.btnLoading = true; | 172 | this.btnLoading = true; |
| 142 | if (!this.dataForm.id) { | 173 | if (!this.dataForm.id) { |
| 143 | request({ | 174 | request({ |
| @@ -149,12 +180,9 @@ | @@ -149,12 +180,9 @@ | ||
| 149 | message: res.msg, | 180 | message: res.msg, |
| 150 | type: 'success', | 181 | type: 'success', |
| 151 | duration: 1000, | 182 | duration: 1000, |
| 152 | - onClose: () => { | ||
| 153 | - this.btnLoading = false, | ||
| 154 | - this.visible = false, | ||
| 155 | - this.$emit('refresh', true) | ||
| 156 | - } | ||
| 157 | }) | 183 | }) |
| 184 | + this.visible = false; | ||
| 185 | + this.$emit('refresh', true); | ||
| 158 | }).catch(() => this.btnLoading = false); | 186 | }).catch(() => this.btnLoading = false); |
| 159 | } else { | 187 | } else { |
| 160 | request({ | 188 | request({ |
| @@ -166,12 +194,9 @@ | @@ -166,12 +194,9 @@ | ||
| 166 | message: res.msg, | 194 | message: res.msg, |
| 167 | type: 'success', | 195 | type: 'success', |
| 168 | duration: 1000, | 196 | duration: 1000, |
| 169 | - onClose: () => { | ||
| 170 | - this.btnLoading = false, | ||
| 171 | - this.visible = false | ||
| 172 | - this.$emit('refresh', true) | ||
| 173 | - } | ||
| 174 | }) | 197 | }) |
| 198 | + this.visible = false; | ||
| 199 | + this.$emit('refresh', true); | ||
| 175 | }).catch(() => this.btnLoading = false); | 200 | }).catch(() => this.btnLoading = false); |
| 176 | } | 201 | } |
| 177 | } | 202 | } |
| @@ -180,3 +205,10 @@ | @@ -180,3 +205,10 @@ | ||
| 180 | } | 205 | } |
| 181 | } | 206 | } |
| 182 | </script> | 207 | </script> |
| 208 | +<style lang="scss" scoped> | ||
| 209 | +.basePrincipalResponsibilityForm { | ||
| 210 | + :deep(.el-radio) { | ||
| 211 | + margin: 0 30px 8px 0; | ||
| 212 | + } | ||
| 213 | +} | ||
| 214 | +</style> |
src/views/basePrincipalResponsibility/index.vue
| @@ -6,108 +6,44 @@ | @@ -6,108 +6,44 @@ | ||
| 6 | <div class="NCC-common-layout-center"> | 6 | <div class="NCC-common-layout-center"> |
| 7 | <el-row class="NCC-common-search-box" :gutter="16"> | 7 | <el-row class="NCC-common-search-box" :gutter="16"> |
| 8 | <el-form @submit.native.prevent size="mini"> | 8 | <el-form @submit.native.prevent size="mini"> |
| 9 | - <el-col :span="4"> | 9 | + <el-col :span="6"> |
| 10 | <el-form-item label=""> | 10 | <el-form-item label=""> |
| 11 | - <el-input | ||
| 12 | - v-model="query.fileName" | ||
| 13 | - placeholder="文件名" | ||
| 14 | - clearable | ||
| 15 | - /> | 11 | + <el-input v-model="query.fileName" placeholder="请输入文件名" clearable/> |
| 16 | </el-form-item> | 12 | </el-form-item> |
| 17 | </el-col> | 13 | </el-col> |
| 18 | - <el-col :span="4"> | 14 | + <el-col :span="6"> |
| 19 | <el-form-item label=""> | 15 | <el-form-item label=""> |
| 20 | - <el-select v-model="query.fileType" placeholder="文件类型"> | ||
| 21 | - <el-option | ||
| 22 | - v-for="(item, index) in fileTypeOptions" | ||
| 23 | - :key="index" | ||
| 24 | - :label="item.fullName" | ||
| 25 | - :value="item.id" | ||
| 26 | - /> | ||
| 27 | - </el-select> | 16 | + <el-input v-model="query.fileType" placeholder="请输入文件类型" clearable/> |
| 28 | </el-form-item> | 17 | </el-form-item> |
| 29 | </el-col> | 18 | </el-col> |
| 30 | <el-col :span="4"> | 19 | <el-col :span="4"> |
| 31 | <el-form-item> | 20 | <el-form-item> |
| 32 | - <el-button | ||
| 33 | - type="primary" | ||
| 34 | - icon="el-icon-search" | ||
| 35 | - @click="search()" | ||
| 36 | - >查询</el-button | ||
| 37 | - > | 21 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> |
| 38 | </el-form-item> | 22 | </el-form-item> |
| 39 | </el-col> | 23 | </el-col> |
| 40 | </el-form> | 24 | </el-form> |
| 41 | <div class="NCC-common-search-box-right"> | 25 | <div class="NCC-common-search-box-right"> |
| 42 | - <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> | 26 | + <el-button type="success" icon="el-icon-plus" @click="addOrUpdateHandle()" size="mini" >新增</el-button> |
| 27 | + <!-- <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> --> | ||
| 43 | </div> | 28 | </div> |
| 44 | </el-row> | 29 | </el-row> |
| 45 | <div class="NCC-common-layout-main NCC-flex-main"> | 30 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 46 | - <div class="NCC-common-head"> | ||
| 47 | - <div> | ||
| 48 | - <el-button | ||
| 49 | - type="primary" | ||
| 50 | - icon="el-icon-plus" | ||
| 51 | - @click="addOrUpdateHandle()" | ||
| 52 | - size="mini" | ||
| 53 | - >新增</el-button | ||
| 54 | - > | ||
| 55 | - </div> | ||
| 56 | - </div> | ||
| 57 | <NCC-table v-loading="listLoading" :data="list"> | 31 | <NCC-table v-loading="listLoading" :data="list"> |
| 58 | - <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> | 32 | + <!-- <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> --> |
| 59 | <el-table-column prop="fileName" label="文件名" align="left" show-overflow-tooltip/> | 33 | <el-table-column prop="fileName" label="文件名" align="left" show-overflow-tooltip/> |
| 60 | <el-table-column label="文件类型" prop="fileType" align="left" show-overflow-tooltip> | 34 | <el-table-column label="文件类型" prop="fileType" align="left" show-overflow-tooltip> |
| 61 | - <template slot-scope="scope">{{ | ||
| 62 | - scope.row.fileType | dynamicText(fileTypeOptions) | ||
| 63 | - }}</template> | 35 | + <template slot-scope="scope">{{ scope.row.fileType | dynamicText(fileTypeOptions) }}</template> |
| 64 | </el-table-column> | 36 | </el-table-column> |
| 65 | - <el-table-column | ||
| 66 | - prop="timeTakingEffect" | ||
| 67 | - label="生效时间" | ||
| 68 | - align="left" | ||
| 69 | - show-overflow-tooltip | ||
| 70 | - /> | 37 | + <el-table-column prop="timeTakingEffect" label="生效时间" align="left" show-overflow-tooltip :formatter="ncc.tableDateFormat"/> |
| 71 | <el-table-column prop="content" label="具体内容" align="left" /> | 38 | <el-table-column prop="content" label="具体内容" align="left" /> |
| 72 | - <el-table-column | ||
| 73 | - prop="creatorUserId" | ||
| 74 | - label="创建用户" | ||
| 75 | - align="left" | ||
| 76 | - show-overflow-tooltip | ||
| 77 | - /> | ||
| 78 | - <el-table-column | ||
| 79 | - prop="creatorTime" | ||
| 80 | - label="创建时间" | ||
| 81 | - :formatter="ncc.tableDateFormat" | ||
| 82 | - align="left" | ||
| 83 | - show-overflow-tooltip | ||
| 84 | - /> | ||
| 85 | - <el-table-column | ||
| 86 | - prop="lastModifyUserId" | ||
| 87 | - label="修改用户" | ||
| 88 | - show-overflow-tooltip | ||
| 89 | - align="left" | ||
| 90 | - /> | ||
| 91 | - <el-table-column | ||
| 92 | - prop="lastModifyTime" | ||
| 93 | - :formatter="ncc.tableDateFormat" | ||
| 94 | - label="修改时间" | ||
| 95 | - align="left" | ||
| 96 | - show-overflow-tooltip | ||
| 97 | - /> | 39 | + <!-- <el-table-column prop="creatorUserId" label="创建用户" align="left" show-overflow-tooltip/> --> |
| 40 | + <el-table-column prop="creatorTime" label="创建时间" :formatter="ncc.tableDateFormat" align="left" show-overflow-tooltip/> | ||
| 41 | + <!-- <el-table-column prop="lastModifyUserId" label="修改用户" show-overflow-tooltip align="left"/> --> | ||
| 42 | + <!-- <el-table-column prop="lastModifyTime" :formatter="ncc.tableDateFormat" label="修改时间" align="left" show-overflow-tooltip/> --> | ||
| 98 | <el-table-column label="操作" fixed="right" width="100"> | 43 | <el-table-column label="操作" fixed="right" width="100"> |
| 99 | <template slot-scope="scope"> | 44 | <template slot-scope="scope"> |
| 100 | - <el-button | ||
| 101 | - type="text" | ||
| 102 | - @click="addOrUpdateHandle(scope.row.id)" | ||
| 103 | - >编辑</el-button | ||
| 104 | - > | ||
| 105 | - <el-button | ||
| 106 | - type="text" | ||
| 107 | - @click="handleDel(scope.row.id)" | ||
| 108 | - class="NCC-table-delBtn" | ||
| 109 | - >删除</el-button | ||
| 110 | - > | 45 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> |
| 46 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | ||
| 111 | </template> | 47 | </template> |
| 112 | </el-table-column> | 48 | </el-table-column> |
| 113 | </NCC-table> | 49 | </NCC-table> |
src/views/baseSpecialAction/Form.vue
| @@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
| 29 | </el-input> | 29 | </el-input> |
| 30 | </el-form-item> | 30 | </el-form-item> |
| 31 | </el-col> | 31 | </el-col> |
| 32 | - <el-col :span="23" v-if="ncc.hasFormP('title') && !dataForm.id"> | 32 | + <el-col :span="23" v-if="ncc.hasFormP('title')"> |
| 33 | <el-form-item label="标题" prop="title"> | 33 | <el-form-item label="标题" prop="title"> |
| 34 | <el-input | 34 | <el-input |
| 35 | v-model="dataForm.title" | 35 | v-model="dataForm.title" |
| @@ -41,14 +41,14 @@ | @@ -41,14 +41,14 @@ | ||
| 41 | </el-input> | 41 | </el-input> |
| 42 | </el-form-item> | 42 | </el-form-item> |
| 43 | </el-col> | 43 | </el-col> |
| 44 | - <el-col :span="23" v-if="ncc.hasFormP('content') && !dataForm.id"> | 44 | + <el-col :span="23" v-if="ncc.hasFormP('content')"> |
| 45 | <el-form-item label="内容" prop="content"> | 45 | <el-form-item label="内容" prop="content"> |
| 46 | <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style="{ width: '100%' }" | 46 | <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style="{ width: '100%' }" |
| 47 | type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"> | 47 | type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"> |
| 48 | </el-input> | 48 | </el-input> |
| 49 | </el-form-item> | 49 | </el-form-item> |
| 50 | </el-col> | 50 | </el-col> |
| 51 | - <el-col :span="23" v-if="ncc.hasFormP('annex') && !dataForm.id"> | 51 | + <el-col :span="23" v-if="ncc.hasFormP('annex')"> |
| 52 | <el-form-item label="附件" prop="annex"> | 52 | <el-form-item label="附件" prop="annex"> |
| 53 | <NCC-UploadFz | 53 | <NCC-UploadFz |
| 54 | v-model="dataForm.annex" | 54 | v-model="dataForm.annex" |
| @@ -67,10 +67,11 @@ | @@ -67,10 +67,11 @@ | ||
| 67 | v-for="(item, index) in areaOptions" | 67 | v-for="(item, index) in areaOptions" |
| 68 | :key="index" | 68 | :key="index" |
| 69 | :label="item.id" | 69 | :label="item.id" |
| 70 | + :disabled="editType == '已发布并部署' || editType == '已发布'" | ||
| 70 | >{{ item.fullName }}</el-checkbox | 71 | >{{ item.fullName }}</el-checkbox |
| 71 | > | 72 | > |
| 72 | </el-checkbox-group> | 73 | </el-checkbox-group> |
| 73 | - <div style="margin-top: 10px"> | 74 | + <div style="margin-top: 10px" v-if="!editType || editType == '已存档'"> |
| 74 | <el-button size="mini" @click="selectAreaAll('area')">全选</el-button> | 75 | <el-button size="mini" @click="selectAreaAll('area')">全选</el-button> |
| 75 | <el-button size="mini" @click="closeAreaAll('area')">反选</el-button> | 76 | <el-button size="mini" @click="closeAreaAll('area')">反选</el-button> |
| 76 | </div> | 77 | </div> |
| @@ -83,29 +84,31 @@ | @@ -83,29 +84,31 @@ | ||
| 83 | v-for="(item, index) in communicationOutOptions" | 84 | v-for="(item, index) in communicationOutOptions" |
| 84 | :key="index" | 85 | :key="index" |
| 85 | :label="item.id" | 86 | :label="item.id" |
| 87 | + :disabled="editType == '已发布并部署' || editType == '已发布'" | ||
| 86 | >{{ item.fullName }}</el-checkbox | 88 | >{{ item.fullName }}</el-checkbox |
| 87 | > | 89 | > |
| 88 | </el-checkbox-group> | 90 | </el-checkbox-group> |
| 89 | - <div style="margin-top: 10px"> | 91 | + <div style="margin-top: 10px" v-if="!editType || editType == '已存档'"> |
| 90 | <el-button size="mini" @click="selectAreaAll">全选</el-button> | 92 | <el-button size="mini" @click="selectAreaAll">全选</el-button> |
| 91 | <el-button size="mini" @click="closeAreaAll">反选</el-button> | 93 | <el-button size="mini" @click="closeAreaAll">反选</el-button> |
| 92 | </div> | 94 | </div> |
| 93 | </el-form-item> | 95 | </el-form-item> |
| 94 | </el-col> | 96 | </el-col> |
| 95 | - <el-col :span="23" v-if="ncc.hasFormP('relationId') && dataForm.id"> | 97 | + <el-col :span="23" v-if="ncc.hasFormP('relationId')"> |
| 96 | <el-form-item label="填报表单" prop="relationId"> | 98 | <el-form-item label="填报表单" prop="relationId"> |
| 97 | - <el-select v-model="dataForm.relationId" placeholder="请选择专项行动填报表单" style="margin-right: 10px;width: 300px;"> | 99 | + <el-select v-model="dataForm.relationId" placeholder="请选择专项行动填报表单" style="margin-right: 10px;width: 300px;" :disabled="editType == '已发布并部署'"> |
| 98 | <el-option v-for="item in BaseList" :key="item.id" :label="item.fullName" :value="item.id"> | 100 | <el-option v-for="item in BaseList" :key="item.id" :label="item.fullName" :value="item.id"> |
| 99 | </el-option> | 101 | </el-option> |
| 100 | </el-select> | 102 | </el-select> |
| 101 | <el-button size="mini" type="text" @click="dialogVisible = true">没有找到表单?点击设计表单</el-button> | 103 | <el-button size="mini" type="text" @click="dialogVisible = true">没有找到表单?点击设计表单</el-button> |
| 102 | </el-form-item> | 104 | </el-form-item> |
| 103 | </el-col> | 105 | </el-col> |
| 104 | - <el-col :span="23" v-if="ncc.hasFormP('deadline') && dataForm.id"> | 106 | + <el-col :span="23" v-if="ncc.hasFormP('deadline')"> |
| 105 | <el-form-item label="截止日期" prop="deadline"> | 107 | <el-form-item label="截止日期" prop="deadline"> |
| 106 | <el-date-picker | 108 | <el-date-picker |
| 107 | v-model="dataForm.deadline" | 109 | v-model="dataForm.deadline" |
| 108 | type="date" | 110 | type="date" |
| 111 | + :disabled="editType == '已发布并部署'" | ||
| 109 | placeholder="选择截止日期"> | 112 | placeholder="选择截止日期"> |
| 110 | </el-date-picker> | 113 | </el-date-picker> |
| 111 | </el-form-item> | 114 | </el-form-item> |
| @@ -113,8 +116,10 @@ | @@ -113,8 +116,10 @@ | ||
| 113 | </el-form> | 116 | </el-form> |
| 114 | </el-row> | 117 | </el-row> |
| 115 | <span slot="footer" class="dialog-footer"> | 118 | <span slot="footer" class="dialog-footer"> |
| 116 | - <el-button @click="visible = false">取 消</el-button> | ||
| 117 | - <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :loading="btnLoading">确 定</el-button> | 119 | + <el-button type="primary" @click="visible = false">取 消</el-button> |
| 120 | + <el-button type="primary" @click="dataFormSubmit(0)" v-if="!isDetail" :loading="btnLoading">保 存</el-button> | ||
| 121 | + <el-button type="primary" @click="dataFormSubmit(1)" v-if="!isDetail" :loading="btnLoading">发 布</el-button> | ||
| 122 | + <el-button type="primary" @click="dataFormSubmit(2)" v-if="!isDetail" :loading="btnLoading">发布并反馈</el-button> | ||
| 118 | </span> | 123 | </span> |
| 119 | <el-dialog class="zxDialog" title="专项行动表单设计" :visible.sync="dialogVisible" fullscreen @close="handleClose" :modal="false"> | 124 | <el-dialog class="zxDialog" title="专项行动表单设计" :visible.sync="dialogVisible" fullscreen @close="handleClose" :modal="false"> |
| 120 | <iframe | 125 | <iframe |
| @@ -135,14 +140,28 @@ export default { | @@ -135,14 +140,28 @@ export default { | ||
| 135 | components: {}, | 140 | components: {}, |
| 136 | props: [], | 141 | props: [], |
| 137 | data() { | 142 | data() { |
| 143 | + var validatecommunicationArea = (rule, value, callback) => { | ||
| 144 | + if (!this.dataForm.communicationOut.length && !value.length) { | ||
| 145 | + callback(new Error('传输区域和传输外协不能同时为空!')); | ||
| 146 | + } else { | ||
| 147 | + callback(); | ||
| 148 | + } | ||
| 149 | + }; | ||
| 150 | + var validatecommunicationOut = (rule, value, callback) => { | ||
| 151 | + if (!this.dataForm.communicationArea.length && !value.length) { | ||
| 152 | + callback(new Error('传输区域和传输外协不能同时为空!')); | ||
| 153 | + } else { | ||
| 154 | + callback(); | ||
| 155 | + } | ||
| 156 | + }; | ||
| 138 | return { | 157 | return { |
| 139 | loading: false, | 158 | loading: false, |
| 140 | visible: false, | 159 | visible: false, |
| 141 | isDetail: false, | 160 | isDetail: false, |
| 161 | + editType: '', // 修改类型 | ||
| 142 | dataForm: { | 162 | dataForm: { |
| 143 | id: "", | 163 | id: "", |
| 144 | id: undefined, | 164 | id: undefined, |
| 145 | - specialActionType: undefined, | ||
| 146 | title: undefined, | 165 | title: undefined, |
| 147 | content: undefined, | 166 | content: undefined, |
| 148 | releaseTime: undefined, | 167 | releaseTime: undefined, |
| @@ -158,34 +177,12 @@ export default { | @@ -158,34 +177,12 @@ export default { | ||
| 158 | relationId: undefined, | 177 | relationId: undefined, |
| 159 | }, | 178 | }, |
| 160 | rules: { | 179 | rules: { |
| 161 | - specialActionType: [ | ||
| 162 | - { | ||
| 163 | - required: true, | ||
| 164 | - message: "请输入类型", | ||
| 165 | - trigger: "change", | ||
| 166 | - }, | ||
| 167 | - ], | ||
| 168 | - title: [ | ||
| 169 | - { | ||
| 170 | - required: true, | ||
| 171 | - message: "请输入标题", | ||
| 172 | - trigger: "blur", | ||
| 173 | - }, | ||
| 174 | - ], | ||
| 175 | - deadline: [ | ||
| 176 | - { | ||
| 177 | - required: true, | ||
| 178 | - message: "请输入截止日期", | ||
| 179 | - trigger: "change", | ||
| 180 | - } | ||
| 181 | - ], | ||
| 182 | - relationId: [ | ||
| 183 | - { | ||
| 184 | - required: true, | ||
| 185 | - message: "请选择关联表单", | ||
| 186 | - trigger: "change", | ||
| 187 | - } | ||
| 188 | - ] | 180 | + title: [{ required: true, message: "请输入标题", trigger: "blur" }], |
| 181 | + content: [{ required: true, message: "请输入内容", trigger: "blur" }], | ||
| 182 | + communicationArea: [{validator: validatecommunicationArea, trigger: 'blur'}], | ||
| 183 | + communicationOut: [{validator: validatecommunicationOut, trigger: 'blur'}], | ||
| 184 | + relationId: [{ required: true, message: "请选择专项行动填报表单", trigger: "blur"}], | ||
| 185 | + deadline: [{ required: true, message: "请选择截止日期", trigger: "blur" }], | ||
| 189 | }, | 186 | }, |
| 190 | areaOptions: [], | 187 | areaOptions: [], |
| 191 | communicationOutOptions: [], | 188 | communicationOutOptions: [], |
| @@ -228,7 +225,6 @@ export default { | @@ -228,7 +225,6 @@ export default { | ||
| 228 | method: "get", | 225 | method: "get", |
| 229 | }).then((res) => { | 226 | }).then((res) => { |
| 230 | this.BaseList = res.data.list[0].children; | 227 | this.BaseList = res.data.list[0].children; |
| 231 | - console.log(this.BaseList) | ||
| 232 | }); | 228 | }); |
| 233 | }, | 229 | }, |
| 234 | async initAreaTypeList() { | 230 | async initAreaTypeList() { |
| @@ -277,60 +273,78 @@ export default { | @@ -277,60 +273,78 @@ export default { | ||
| 277 | this.dataForm.id = row ? row.id : ''; | 273 | this.dataForm.id = row ? row.id : ''; |
| 278 | this.visible = true; | 274 | this.visible = true; |
| 279 | this.isDetail = isDetail || false; | 275 | this.isDetail = isDetail || false; |
| 276 | + this.editType = row ? row.state : ''; | ||
| 280 | this.$nextTick(() => { | 277 | this.$nextTick(() => { |
| 281 | this.$refs["elForm"].resetFields(); | 278 | this.$refs["elForm"].resetFields(); |
| 282 | if(this.dataForm.id) { | 279 | if(this.dataForm.id) { |
| 283 | - this.dataForm.communicationArea = JSON.parse(row.communicationArea); | ||
| 284 | - this.dataForm.communicationOut = JSON.parse(row.communicationOut); | 280 | + request({ |
| 281 | + url: `/Extend/BaseSpecialAction/${this.dataForm.id} `, | ||
| 282 | + method: "GET", | ||
| 283 | + }).then((res) => { | ||
| 284 | + this.dataForm = res.data; | ||
| 285 | + this.dataForm.annex = res.data.annex == null ? [] : res.data.annex; | ||
| 286 | + }) | ||
| 285 | } | 287 | } |
| 286 | }); | 288 | }); |
| 287 | }, | 289 | }, |
| 288 | - dataFormSubmit() { | ||
| 289 | - this.$refs["elForm"].validate((valid) => { | ||
| 290 | - if (valid) { | ||
| 291 | - this.btnLoading = true; | ||
| 292 | - if (!this.dataForm.id) { | ||
| 293 | - let {title, content, annex, communicationArea, communicationOut} = this.dataForm; | ||
| 294 | - // 新增 | ||
| 295 | - request({ | ||
| 296 | - url: `/Extend/BaseSpecialAction`, | ||
| 297 | - method: "post", | ||
| 298 | - data: { title, content, annex, communicationArea, communicationOut }, | ||
| 299 | - }).then((res) => { | ||
| 300 | - this.$message({ | ||
| 301 | - message: res.msg, | ||
| 302 | - type: "success", | ||
| 303 | - duration: 1000, | ||
| 304 | - onClose: () => { | ||
| 305 | - this.btnLoading = false; | ||
| 306 | - (this.visible = false), this.$emit("refresh", true); | ||
| 307 | - }, | ||
| 308 | - }); | ||
| 309 | - }).catch(() => this.btnLoading = false); | ||
| 310 | - } else { | ||
| 311 | - // 发布任务 | ||
| 312 | - request({ | ||
| 313 | - url: "/Extend/BaseSpecialAction/Release", | ||
| 314 | - method: "PUT", | ||
| 315 | - data: this.dataForm, | ||
| 316 | - }).then((res) => { | ||
| 317 | - this.$message({ | ||
| 318 | - message: res.msg, | ||
| 319 | - type: "success", | ||
| 320 | - duration: 1000, | ||
| 321 | - onClose: () => { | ||
| 322 | - this.btnLoading = false; | ||
| 323 | - this.visible = false; | ||
| 324 | - this.$emit("refresh", true); | ||
| 325 | - }, | ||
| 326 | - }); | ||
| 327 | - }).catch(() => this.btnLoading = false); | ||
| 328 | - } | 290 | + dataFormSubmit(type) { |
| 291 | + this.validateForm(type, () => { | ||
| 292 | + let obj = { | ||
| 293 | + ...this.dataForm, | ||
| 294 | + state: type | ||
| 329 | } | 295 | } |
| 296 | + let url = !this.dataForm.id ? '/Extend/BaseSpecialAction/Release' : '/Extend/BaseSpecialAction/Update'; | ||
| 297 | + let method = !this.dataForm.id ? 'PUT' : 'POST'; | ||
| 298 | + this.toPostForm(url, method, obj); | ||
| 330 | }); | 299 | }); |
| 331 | }, | 300 | }, |
| 301 | + validateForm(type, callback) { | ||
| 302 | + let list = ['title', 'content']; | ||
| 303 | + switch (type) { | ||
| 304 | + case 0: | ||
| 305 | + list = ['title', 'content']; | ||
| 306 | + break; | ||
| 307 | + case 1: | ||
| 308 | + list = ['title', 'content', 'communicationArea', 'communicationOut']; | ||
| 309 | + break; | ||
| 310 | + case 2: | ||
| 311 | + list = ['title', 'content', 'communicationArea', 'communicationOut', 'relationId', 'deadline']; | ||
| 312 | + break; | ||
| 313 | + | ||
| 314 | + default: | ||
| 315 | + break; | ||
| 316 | + } | ||
| 317 | + let Promises = list.map(v => new Promise((resolve, reject) => this.$refs["elForm"].validateField(v, err => resolve(err)))); | ||
| 318 | + Promise.all(Promises).then(values => { | ||
| 319 | + if(values.filter(item =>item).length) { | ||
| 320 | + return | ||
| 321 | + } else { | ||
| 322 | + callback && callback(values); | ||
| 323 | + } | ||
| 324 | + }); | ||
| 325 | + }, | ||
| 326 | + toPostForm(url, method, obj, callback) { | ||
| 327 | + this.btnLoading = true; | ||
| 328 | + request({ | ||
| 329 | + url, | ||
| 330 | + method, | ||
| 331 | + data: obj, | ||
| 332 | + }).then((res) => { | ||
| 333 | + this.$message({ | ||
| 334 | + message: res.msg, | ||
| 335 | + type: "success", | ||
| 336 | + duration: 1000, | ||
| 337 | + onClose: () => { | ||
| 338 | + callback && callback(); | ||
| 339 | + this.btnLoading = false; | ||
| 340 | + (this.visible = false), this.$emit("refresh", true); | ||
| 341 | + }, | ||
| 342 | + }); | ||
| 343 | + }).catch(() => this.btnLoading = false); | ||
| 344 | + } | ||
| 332 | }, | 345 | }, |
| 333 | }; | 346 | }; |
| 347 | + | ||
| 334 | </script> | 348 | </script> |
| 335 | <style lang="scss" scoped> | 349 | <style lang="scss" scoped> |
| 336 | </style> | 350 | </style> |
src/views/baseSpecialAction/index.vue
| @@ -37,13 +37,9 @@ | @@ -37,13 +37,9 @@ | ||
| 37 | </div> | 37 | </div> |
| 38 | </div> | 38 | </div> |
| 39 | <NCC-table v-loading="listLoading" :data="list"> | 39 | <NCC-table v-loading="listLoading" :data="list"> |
| 40 | - <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> | 40 | + <!-- <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> --> |
| 41 | <el-table-column prop="title" label="标题" align="left" show-overflow-tooltip/> | 41 | <el-table-column prop="title" label="标题" align="left" show-overflow-tooltip/> |
| 42 | - <el-table-column prop="state" label="状态" align="left" show-overflow-tooltip width="80"> | ||
| 43 | - <template slot-scope="scope"> | ||
| 44 | - <el-tag :type="scope.row.state == '已发布' ? 'success' : 'warning'">{{scope.row.state}}</el-tag> | ||
| 45 | - </template> | ||
| 46 | - </el-table-column> | 42 | + |
| 47 | <el-table-column prop="creatorTime" label="发布时间" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> | 43 | <el-table-column prop="creatorTime" label="发布时间" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> |
| 48 | <el-table-column label="传达区域" prop="communicationArea" align="left" show-overflow-tooltip> | 44 | <el-table-column label="传达区域" prop="communicationArea" align="left" show-overflow-tooltip> |
| 49 | <template slot-scope="scope">{{ JSON.parse(scope.row.communicationArea) | dynamicText(communicationAreaOptions) }}</template> | 45 | <template slot-scope="scope">{{ JSON.parse(scope.row.communicationArea) | dynamicText(communicationAreaOptions) }}</template> |
| @@ -51,16 +47,21 @@ | @@ -51,16 +47,21 @@ | ||
| 51 | <el-table-column label="传达外协" prop="communicationOut" align="left" show-overflow-tooltip> | 47 | <el-table-column label="传达外协" prop="communicationOut" align="left" show-overflow-tooltip> |
| 52 | <template slot-scope="scope">{{ JSON.parse(scope.row.communicationOut) | dynamicText(communicationOutOptions) }}</template> | 48 | <template slot-scope="scope">{{ JSON.parse(scope.row.communicationOut) | dynamicText(communicationOutOptions) }}</template> |
| 53 | </el-table-column> | 49 | </el-table-column> |
| 54 | - <el-table-column prop="deadline" label="截止日期" show-overflow-tooltip :formatter="ncc.tableDateFormat" width="175"> | 50 | + <el-table-column prop="state" label="状态" align="left" show-overflow-tooltip width="100"> |
| 51 | + <template slot-scope="scope"> | ||
| 52 | + <el-tag :type="stateColor[`${scope.row.state}`]">{{scope.row.state}}</el-tag> | ||
| 53 | + </template> | ||
| 54 | + </el-table-column> | ||
| 55 | + <el-table-column prop="deadline" label="截止日期" show-overflow-tooltip :formatter="ncc.tableDateFormat" width="200" align="left"> | ||
| 55 | <template slot-scope="scope"> | 56 | <template slot-scope="scope"> |
| 56 | <el-tag v-if="scope.row.deadline" :type="`${ncc.timeDeadLine(scope.row.deadline)}`">{{ncc.stateDeadLine(scope.row.deadline)}}{{ ncc.tableDateFormat(scope.row, 'deadline', scope.row.deadline) }}</el-tag> | 57 | <el-tag v-if="scope.row.deadline" :type="`${ncc.timeDeadLine(scope.row.deadline)}`">{{ncc.stateDeadLine(scope.row.deadline)}}{{ ncc.tableDateFormat(scope.row, 'deadline', scope.row.deadline) }}</el-tag> |
| 57 | </template> | 58 | </template> |
| 58 | </el-table-column> | 59 | </el-table-column> |
| 59 | - <el-table-column prop="creatorUserId" show-overflow-tooltip label="创建用户" align="left"/> | ||
| 60 | - <el-table-column label="操作" fixed="right" width="100"> | 60 | + <!-- <el-table-column prop="creatorUserId" show-overflow-tooltip label="创建用户" align="left"/> --> |
| 61 | + <el-table-column label="操作" fixed="right" width="150"> | ||
| 61 | <template slot-scope="scope"> | 62 | <template slot-scope="scope"> |
| 62 | - <el-button type="text" @click="addOrUpdateHandle(scope.row)" v-if="scope.row.state == '未发布'">发布任务</el-button> | ||
| 63 | - <el-button type="text" @click="toDetail(scope.row)" v-else>处理情况</el-button> | 63 | + <el-button type="text" @click="addOrUpdateHandle(scope.row)">修改</el-button> |
| 64 | + <el-button type="text" @click="toDetail(scope.row)" v-if="scope.row.state == '已发布并部署'">处理情况</el-button> | ||
| 64 | </template> | 65 | </template> |
| 65 | </el-table-column> | 66 | </el-table-column> |
| 66 | </NCC-table> | 67 | </NCC-table> |
| @@ -101,6 +102,12 @@ export default { | @@ -101,6 +102,12 @@ export default { | ||
| 101 | InfoFormVisible: false, | 102 | InfoFormVisible: false, |
| 102 | communicationAreaOptions: [], | 103 | communicationAreaOptions: [], |
| 103 | communicationOutOptions: [], | 104 | communicationOutOptions: [], |
| 105 | + stateColor: { | ||
| 106 | + '已存档': "info", | ||
| 107 | + '已发布': "warning", | ||
| 108 | + '已发布并部署': "success", | ||
| 109 | + '未发布': "", | ||
| 110 | + }, | ||
| 104 | }; | 111 | }; |
| 105 | }, | 112 | }, |
| 106 | async created() { | 113 | async created() { |
src/views/overView/Overview.vue
| @@ -18,9 +18,13 @@ | @@ -18,9 +18,13 @@ | ||
| 18 | <el-table-column type="index" width="40"> </el-table-column> | 18 | <el-table-column type="index" width="40"> </el-table-column> |
| 19 | <el-table-column prop="taskTitle" label="任务名称" show-overflow-tooltip/> | 19 | <el-table-column prop="taskTitle" label="任务名称" show-overflow-tooltip/> |
| 20 | <el-table-column prop="taskType" label="任务类型" show-overflow-tooltip width="100"/> | 20 | <el-table-column prop="taskType" label="任务类型" show-overflow-tooltip width="100"/> |
| 21 | - <el-table-column prop="taskState" label="状态" show-overflow-tooltip width="80"/> | ||
| 22 | <el-table-column prop="taskContent" label="任务内容" show-overflow-tooltip /> | 21 | <el-table-column prop="taskContent" label="任务内容" show-overflow-tooltip /> |
| 23 | - <el-table-column prop="deadLine" label="任务期限" show-overflow-tooltip :formatter="ncc.tableDateFormat" width="170"> | 22 | + <el-table-column prop="taskState" label="状态" show-overflow-tooltip width="80"> |
| 23 | + <template slot-scope="scope"> | ||
| 24 | + <el-tag type="success">{{ scope.row.taskState }}</el-tag> | ||
| 25 | + </template> | ||
| 26 | + </el-table-column> | ||
| 27 | + <el-table-column prop="deadLine" label="任务期限" show-overflow-tooltip :formatter="ncc.tableDateFormat" width="200"> | ||
| 24 | <template slot-scope="scope"> | 28 | <template slot-scope="scope"> |
| 25 | <el-tag :type="`${ncc.timeDeadLine(scope.row.deadLine)}`">{{ncc.stateDeadLine(scope.row.deadLine)}}{{ ncc.tableDateFormat(scope.row, 'deadLine', scope.row.deadLine) }}</el-tag> | 29 | <el-tag :type="`${ncc.timeDeadLine(scope.row.deadLine)}`">{{ncc.stateDeadLine(scope.row.deadLine)}}{{ ncc.tableDateFormat(scope.row, 'deadLine', scope.row.deadLine) }}</el-tag> |
| 26 | </template> | 30 | </template> |