Commit 06c7a82f053f5b4a07f4ef1e8cda022814315cc9
1 parent
62cf4146
最新代码
Showing
83 changed files
with
10152 additions
and
70 deletions
.env.development
| 1 | 1 | NODE_ENV='development' |
| 2 | 2 | VUE_APP_TITLE='开发环境地址' |
| 3 | -VUE_APP_BASE_API="http://8.130.38.56:8043" | |
| 4 | -VUE_APP_BASE_WSS="ws://8.130.38.56:8043/api/message/websocket" | |
| 5 | 3 | \ No newline at end of file |
| 4 | +# VUE_APP_BASE_API="http://8.130.38.56:8043" | |
| 5 | +VUE_APP_BASE_API="http://10.0.0.208:5000" | |
| 6 | +VUE_APP_BASE_WSS="ws://8.130.38.56:8043/api/message/websocket" | ... | ... |
.env.production
| 1 | 1 | |
| 2 | 2 | NODE_ENV='development' |
| 3 | 3 | VUE_APP_TITLE='生产环境' |
| 4 | -VUE_APP_BASE_API="http://8.130.38.56:8043" | |
| 4 | +# VUE_APP_BASE_API="http://8.130.38.56:8043" | |
| 5 | +VUE_APP_BASE_API="http://10.0.0.208:5000" | |
| 5 | 6 | VUE_APP_BASE_WSS="ws://8.130.38.56:8043/api/message/websocket" |
| 6 | 7 | \ No newline at end of file | ... | ... |
package.json
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | "scripts": { |
| 6 | 6 | "serve": "vue-cli-service serve", |
| 7 | 7 | "build": "vue-cli-service build", |
| 8 | + "builddevtool": "vue-cli-service build --no-source-map", | |
| 8 | 9 | "build:stage": "vue-cli-service build --mode development", |
| 9 | 10 | "build:prod": "vue-cli-service build --mode production", |
| 10 | 11 | "lint": "vue-cli-service lint" | ... | ... |
src/assets/images/meun/工作存档.png
0 → 100644
1.6 KB
src/components/InfoForm/index.vue
| ... | ... | @@ -320,7 +320,16 @@ |
| 320 | 320 | <el-input type="textarea" v-model="infoForm.remark" placeholder="请输入备注" clearable maxlength="500"/> |
| 321 | 321 | </el-form-item> |
| 322 | 322 | </el-col> |
| 323 | - | |
| 323 | + <el-col :span="24" > | |
| 324 | + <el-form-item label="状态" prop="status"> | |
| 325 | + <el-select v-model="infoForm.status" placeholder="请选择" style="width: 100%;"> | |
| 326 | + <el-option label="--" value="0"></el-option> | |
| 327 | + <el-option label="在用" value="1"></el-option> | |
| 328 | + <el-option label="停用" value="2"></el-option> | |
| 329 | + <el-option label="注销" value="3"></el-option> | |
| 330 | + </el-select> | |
| 331 | + </el-form-item> | |
| 332 | + </el-col> | |
| 324 | 333 | <!-- <el-col :span="24"> |
| 325 | 334 | <el-form-item label="所属外协" prop="externalAssistanceId"> |
| 326 | 335 | <el-radio-group |
| ... | ... | @@ -394,6 +403,7 @@ export default { |
| 394 | 403 | MAU: '', |
| 395 | 404 | followerCount: 0, |
| 396 | 405 | externalAssistanceId: '', |
| 406 | + status:'' | |
| 397 | 407 | }, |
| 398 | 408 | infoRules: { |
| 399 | 409 | systemName: { |
| ... | ... | @@ -567,6 +577,7 @@ export default { |
| 567 | 577 | async initForm() { |
| 568 | 578 | let { data } = await getSystemDetail(this.systemId); |
| 569 | 579 | this.infoForm = data; |
| 580 | + this.infoForm.status = this.infoForm.status+'' | |
| 570 | 581 | this.handleSystemTypeChange(data.systemType, data.systemClass); |
| 571 | 582 | data.companyId && await this.companyChange(data.companyId); |
| 572 | 583 | this.$forceUpdate(); |
| ... | ... | @@ -581,6 +592,7 @@ export default { |
| 581 | 592 | }, |
| 582 | 593 | async confirm() { |
| 583 | 594 | console.log(this.infoForm); |
| 595 | + // return | |
| 584 | 596 | this.$refs["infoForm"].validate((valid) => { |
| 585 | 597 | if (valid) { |
| 586 | 598 | this.btnLoading = true; | ... | ... |
src/store/modules/user.js
| ... | ... | @@ -4,7 +4,8 @@ import { resetRouter } from '@/router' |
| 4 | 4 | import md5 from "js-md5"; // 密码加密 |
| 5 | 5 | import CryptoJS from 'crypto-js'; // 引入 crypto-js |
| 6 | 6 | const define = require('@/utils/define') |
| 7 | - | |
| 7 | +import Cookies from 'js-cookie' | |
| 8 | +import request from "@/utils/request"; | |
| 8 | 9 | const user = { |
| 9 | 10 | state: { |
| 10 | 11 | token: getToken(), |
| ... | ... | @@ -64,19 +65,26 @@ const user = { |
| 64 | 65 | // 登录 |
| 65 | 66 | Login({ commit }, data) { |
| 66 | 67 | return new Promise((resolve, reject) => { |
| 67 | - // 定义 key 和 iv | |
| 68 | - const key = CryptoJS.enc.Base64.parse("ztfVbQf/+c73xP8d92yq1A=="); | |
| 69 | - const iv = CryptoJS.enc.Base64.parse("btfVbQf/+c73xP8d92yq1A=="); // 截取前16字节 | |
| 70 | - // 对账号和密码进行 AES 加密 | |
| 71 | - const account = CryptoJS.AES.encrypt(data.account, key, { iv: iv }).toString(); | |
| 72 | - const password = CryptoJS.AES.encrypt(md5(data.password), key, { iv: iv }).toString(); | |
| 73 | - login({ account, password }).then(res => { | |
| 74 | - setToken(res.data.token) | |
| 75 | - commit('SET_TOKEN', res.data.token) | |
| 76 | - resolve() | |
| 77 | - }).catch(error => { | |
| 78 | - reject(error) | |
| 79 | - }) | |
| 68 | + request({ | |
| 69 | + url: `oauth/GetKeyAndIv`, | |
| 70 | + method: "GET", | |
| 71 | + }).then((res) => { | |
| 72 | + console.error(res.data); | |
| 73 | + // 定义 key 和 iv | |
| 74 | + const key = CryptoJS.enc.Base64.parse(res.data.Key); | |
| 75 | + const iv = CryptoJS.enc.Base64.parse(res.data.Iv); // 截取前16字节 | |
| 76 | + // 对账号和密码进行 AES 加密 | |
| 77 | + const account = CryptoJS.AES.encrypt(data.account, key, { iv: iv }).toString(); | |
| 78 | + const password = CryptoJS.AES.encrypt(md5(data.password), key, { iv: iv }).toString(); | |
| 79 | + login({ account, password }).then(res => { | |
| 80 | + setToken(res.data.token) | |
| 81 | + commit('SET_TOKEN', res.data.token) | |
| 82 | + resolve() | |
| 83 | + }).catch(error => { | |
| 84 | + reject(error) | |
| 85 | + }) | |
| 86 | + }); | |
| 87 | + | |
| 80 | 88 | }) |
| 81 | 89 | }, |
| 82 | 90 | |
| ... | ... | @@ -216,14 +224,23 @@ const user = { |
| 216 | 224 | // 退出系统 |
| 217 | 225 | LogOut({ commit, state }) { |
| 218 | 226 | return new Promise((resolve, reject) => { |
| 219 | - logout().then(() => { | |
| 220 | - commit('SET_TOKEN', '') | |
| 221 | - commit('SET_ROLES', []) | |
| 222 | - removeToken() | |
| 223 | - resolve() | |
| 224 | - }).catch(error => { | |
| 225 | - reject(error) | |
| 226 | - }) | |
| 227 | + request({ | |
| 228 | + url: `oauth/ClearLogin`, | |
| 229 | + method: "POST", | |
| 230 | + }).then((res) => { | |
| 231 | + console.error(res); | |
| 232 | + logout().then(() => { | |
| 233 | + commit('SET_TOKEN', '') | |
| 234 | + commit('SET_ROLES', []) | |
| 235 | + removeToken() | |
| 236 | + Cookies.remove('Hm_lvt_e8002ef3d9e0d8274b5b74cc4a027d08') | |
| 237 | + window.localStorage.clear(); | |
| 238 | + resolve() | |
| 239 | + }).catch(error => { | |
| 240 | + reject(error) | |
| 241 | + }) | |
| 242 | + }); | |
| 243 | + | |
| 227 | 244 | }) |
| 228 | 245 | }, |
| 229 | 246 | // 前端退出 | ... | ... |
src/utils/define.js
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | // const APIURl = 'http://10.0.0.70:8999' |
| 7 | 7 | // const APIURl = 'http://8.130.38.56:8043' |
| 8 | 8 | // const APIURl = 'http://192.168.31.131:80' |
| 9 | -const APIURl = 'http://118.122.147.194:5000' | |
| 9 | +const APIURl = 'http://10.0.0.208:5000' | |
| 10 | 10 | |
| 11 | 11 | module.exports = { |
| 12 | 12 | APIURl: APIURl, | ... | ... |
src/views/DisposalSuggestions/index.vue
| ... | ... | @@ -17,6 +17,13 @@ |
| 17 | 17 | </el-form-item> |
| 18 | 18 | </el-col> |
| 19 | 19 | <el-col :span="3"> |
| 20 | + <el-form-item label=""> | |
| 21 | + <el-select v-model="query.department" placeholder="区县" > | |
| 22 | + <el-option v-for="item in areaOptions" :key="item.id" :label="item.fullName" :value="item.id"/> | |
| 23 | + </el-select> | |
| 24 | + </el-form-item> | |
| 25 | + </el-col> | |
| 26 | + <el-col :span="3"> | |
| 20 | 27 | <el-form-item label=""> |
| 21 | 28 | <el-select v-model="query.platformType" placeholder="请选择应用类型" clearable> |
| 22 | 29 | <el-option v-for="(item, index) in systemTypeOptions" :key="index" :label="item.FullName" :value="item.Id"/> |
| ... | ... | @@ -45,7 +52,7 @@ |
| 45 | 52 | </el-select> |
| 46 | 53 | </el-form-item> |
| 47 | 54 | </el-col> |
| 48 | - <el-col :span="3"> | |
| 55 | + <el-col :span="6"> | |
| 49 | 56 | <el-form-item> |
| 50 | 57 | <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> |
| 51 | 58 | <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> |
| ... | ... | @@ -100,7 +107,8 @@ |
| 100 | 107 | <el-table-column show-overflow-tooltip label="线索编号" prop="leadNumber" align="left" width="180"/> |
| 101 | 108 | <!-- <el-table-column show-overflow-tooltip prop="link" label="有害链接" align="left" /> --> |
| 102 | 109 | <!-- <el-table-column show-overflow-tooltip prop="questionClass" label="关键词" align="left" /> --> |
| 103 | - <el-table-column show-overflow-tooltip prop="creatorTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 110 | + <!-- <el-table-column show-overflow-tooltip prop="creatorTime" label="录入时间" align="left" :formatter="ncc.tableDateFormat"/> --> | |
| 111 | + <el-table-column show-overflow-tooltip prop="areaId" label="区县" align="left"/> | |
| 104 | 112 | <el-table-column show-overflow-tooltip prop="state" label="状态" align="left"/> |
| 105 | 113 | <!-- <el-table-column show-overflow-tooltip prop="disposalSuggestions" label="处置建议" align="left" /> |
| 106 | 114 | <el-table-column show-overflow-tooltip prop="id" label="主键" align="left" /> |
| ... | ... | @@ -157,6 +165,7 @@ export default { |
| 157 | 165 | mixins: [infoMixin], |
| 158 | 166 | data() { |
| 159 | 167 | return { |
| 168 | + areaOptions: [], | |
| 160 | 169 | showAll: false, |
| 161 | 170 | query: { |
| 162 | 171 | platformName: undefined, |
| ... | ... | @@ -167,6 +176,7 @@ export default { |
| 167 | 176 | questionClass: undefined, |
| 168 | 177 | creatorTime: [], |
| 169 | 178 | state: undefined, |
| 179 | + department:'' | |
| 170 | 180 | }, |
| 171 | 181 | list: [], |
| 172 | 182 | listLoading: true, |
| ... | ... | @@ -233,6 +243,7 @@ export default { |
| 233 | 243 | } |
| 234 | 244 | }, |
| 235 | 245 | created() { |
| 246 | + this.initAreaTypeList(); | |
| 236 | 247 | this.initSystemTypeList(); |
| 237 | 248 | this.getSourceOptions(); |
| 238 | 249 | this.initData(); | ... | ... |
src/views/Login.vue
| ... | ... | @@ -56,8 +56,8 @@ export default { |
| 56 | 56 | data() { |
| 57 | 57 | return { |
| 58 | 58 | form: { |
| 59 | - account: "", // cdoffice, xin | |
| 60 | - password: "", // WxB@2024!User | |
| 59 | + account: "", | |
| 60 | + password: "", | |
| 61 | 61 | }, |
| 62 | 62 | rules: { |
| 63 | 63 | account: { required: true, message: "用户名不能为空", trigger: "blur" }, |
| ... | ... | @@ -72,6 +72,7 @@ export default { |
| 72 | 72 | }, |
| 73 | 73 | }, |
| 74 | 74 | created() { |
| 75 | + console.log('-------------1') | |
| 75 | 76 | }, |
| 76 | 77 | mounted() {}, |
| 77 | 78 | methods: { | ... | ... |
src/views/baseCaseHandling/Form.vue
| ... | ... | @@ -25,8 +25,17 @@ |
| 25 | 25 | </el-form-item> |
| 26 | 26 | </el-col> |
| 27 | 27 | <el-col :span="24"> |
| 28 | + <el-form-item label="取证编号" prop="evidenceNumber"> | |
| 29 | + <el-input v-model="dataForm.evidenceNumber" placeholder="请输入取证编号" clearable /> | |
| 30 | + | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + <el-col :span="24"> | |
| 28 | 34 | <el-form-item label="来源登记" prop="sourceRegistration"> |
| 29 | - <el-input v-model="dataForm.sourceRegistration" placeholder="请输入来源登记" clearable /> | |
| 35 | + <!-- <el-input v-model="dataForm.sourceRegistration" placeholder="请输入来源登记" clearable /> --> | |
| 36 | + <el-radio-group v-model="dataForm.sourceRegistration"> | |
| 37 | + <el-radio v-for="(item, index) in sourceRegistrationlist" :key="index" :label="item.label">{{ item.label }}</el-radio> | |
| 38 | + </el-radio-group> | |
| 30 | 39 | </el-form-item> |
| 31 | 40 | </el-col> |
| 32 | 41 | <!-- <el-col :span="24"> |
| ... | ... | @@ -95,6 +104,34 @@ |
| 95 | 104 | <el-input v-model="dataForm.recordNumber" placeholder="请输入备案号" clearable /> |
| 96 | 105 | </el-form-item> |
| 97 | 106 | </el-col> |
| 107 | + <el-col :span="24"> | |
| 108 | + <el-form-item label="案件名称" prop="caseName"> | |
| 109 | + <el-input v-model="dataForm.caseName" placeholder="请输入备案号" clearable /> | |
| 110 | + </el-form-item> | |
| 111 | + </el-col> | |
| 112 | + <el-col :span="24" > | |
| 113 | + <el-form-item label="是否重点" prop="isImportant"> | |
| 114 | + <el-select v-model="dataForm.isImportant" placeholder="请选择" style="width: 100%;"> | |
| 115 | + <el-option label="否" value="0"></el-option> | |
| 116 | + <el-option label="是" value="1"></el-option> | |
| 117 | + </el-select> | |
| 118 | + </el-form-item> | |
| 119 | + </el-col> | |
| 120 | + <el-col :span="24" > | |
| 121 | + <el-form-item label="执法主体" prop="enforcement"> | |
| 122 | + <el-radio-group | |
| 123 | + v-model="dataForm.enforcement" | |
| 124 | + placeholder="请选择所属区县" | |
| 125 | + style="line-height: 22px" | |
| 126 | + :disabled="formType == 2" | |
| 127 | + > | |
| 128 | + <el-radio v-for="v in areaOptions" :key="v.id" :label="v.id">{{ | |
| 129 | + v.fullName | |
| 130 | + }}</el-radio> | |
| 131 | + <el-radio :label="'成都市'">成都市</el-radio> | |
| 132 | + </el-radio-group> | |
| 133 | + </el-form-item> | |
| 134 | + </el-col> | |
| 98 | 135 | <el-col :span="24" v-if="isSHILevel"> |
| 99 | 136 | <el-form-item label="所属区县" prop="districtCounty"> |
| 100 | 137 | <el-radio-group |
| ... | ... | @@ -224,6 +261,10 @@ |
| 224 | 261 | </el-row> |
| 225 | 262 | <el-row v-show="!!isDetail"> |
| 226 | 263 | <el-col class="form-item"> |
| 264 | + <div class="label w-180">取证编号</div> | |
| 265 | + <div class="text">{{ dataForm.evidenceNumber || '--' }}</div> | |
| 266 | + </el-col> | |
| 267 | + <el-col class="form-item"> | |
| 227 | 268 | <div class="label w-180">来源登记:</div> |
| 228 | 269 | <div class="text">{{ dataForm.sourceRegistration || '--' }}</div> |
| 229 | 270 | </el-col> |
| ... | ... | @@ -244,6 +285,18 @@ |
| 244 | 285 | <div class="text">{{ dataForm.recordNumber || '--' }}</div> |
| 245 | 286 | </el-col> |
| 246 | 287 | <el-col class="form-item"> |
| 288 | + <div class="label w-180">案件名称:</div> | |
| 289 | + <div class="text">{{ dataForm.caseName || '--' }}</div> | |
| 290 | + </el-col> | |
| 291 | + <el-col class="form-item"> | |
| 292 | + <div class="label w-180">是否重点:</div> | |
| 293 | + <div class="text">{{ dataForm.isImportant == '0'?'否':dataForm.isImportant == '1'?'是':'--' }}</div> | |
| 294 | + </el-col> | |
| 295 | + <el-col class="form-item"> | |
| 296 | + <div class="label w-180">执法主体:</div> | |
| 297 | + <div class="text">{{dataForm.enforcement?dataForm.enforcement=='成都市'?dataForm.enforcement:dataForm.enforcementname:'--'}}</div> | |
| 298 | + </el-col> | |
| 299 | + <el-col class="form-item"> | |
| 247 | 300 | <div class="label w-180">所属区县:</div> |
| 248 | 301 | <div class="text">{{ dataForm.districtCountyName }}</div> |
| 249 | 302 | </el-col> |
| ... | ... | @@ -379,6 +432,7 @@ export default { |
| 379 | 432 | isDetail: false, |
| 380 | 433 | formType: false, // 0 新增 1 编辑 2 处理 |
| 381 | 434 | dataForm: { |
| 435 | + evidenceNumber: undefined, | |
| 382 | 436 | id: undefined, |
| 383 | 437 | sourceRegistration: undefined, |
| 384 | 438 | registrationTime: undefined, |
| ... | ... | @@ -412,6 +466,9 @@ export default { |
| 412 | 466 | closingReportFileModel: [], |
| 413 | 467 | other: undefined, |
| 414 | 468 | otherFileModel: [], |
| 469 | + caseName: undefined, | |
| 470 | + isImportant: undefined, | |
| 471 | + enforcement: undefined, | |
| 415 | 472 | }, |
| 416 | 473 | rules: { |
| 417 | 474 | sourceRegistration: [ |
| ... | ... | @@ -442,6 +499,24 @@ export default { |
| 442 | 499 | company_currentPage: 20, |
| 443 | 500 | name_loading: false, |
| 444 | 501 | system_currentPage: 20, |
| 502 | + sourceRegistrationlist: [ | |
| 503 | + { | |
| 504 | + id:'巡查发现', | |
| 505 | + label:'巡查发现' | |
| 506 | + }, | |
| 507 | + { | |
| 508 | + id:'上级交办', | |
| 509 | + label:'上级交办' | |
| 510 | + }, | |
| 511 | + { | |
| 512 | + id:'同级转办', | |
| 513 | + label:'同级转办' | |
| 514 | + }, | |
| 515 | + { | |
| 516 | + id:'其他', | |
| 517 | + label:'其他' | |
| 518 | + }, | |
| 519 | + ], | |
| 445 | 520 | }; |
| 446 | 521 | }, |
| 447 | 522 | computed: { |
| ... | ... | @@ -599,6 +674,9 @@ export default { |
| 599 | 674 | url: `/Extend/BaseCaseHandling/${this.dataForm.id}`, |
| 600 | 675 | method: "GET", |
| 601 | 676 | }).then(async (res) => { |
| 677 | + if(res.data.enforcement) { | |
| 678 | + res.data.enforcementname = this.areaOptions.find(item => item.id == res.data.enforcement).fullName; | |
| 679 | + } | |
| 602 | 680 | res.data.districtCountyName = this.areaOptions.find(item => item.id == res.data.districtCounty).fullName; |
| 603 | 681 | res.data.categoryName = this.platformTypeOptions.find(v => v.Id == res.data.category || v.FullName == res.data.category).FullName; |
| 604 | 682 | this.isEmpty(res.data.registerApproval) && (res.data.registerApproval = ''); |
| ... | ... | @@ -640,7 +718,8 @@ export default { |
| 640 | 718 | ...this.dataForm, |
| 641 | 719 | isReport: type, |
| 642 | 720 | } |
| 643 | - | |
| 721 | + console.log(obj); | |
| 722 | + // return | |
| 644 | 723 | this.$refs['elForm'].validate((valid) => { |
| 645 | 724 | if(valid) { |
| 646 | 725 | !this.dataForm.id ? this.toRequest('/Extend/BaseCaseHandling', 'POST', obj) : this.toRequest(`/Extend/BaseCaseHandling/${this.dataForm.id}`, 'PUT', obj); |
| ... | ... | @@ -649,6 +728,8 @@ export default { |
| 649 | 728 | }, |
| 650 | 729 | // 处理 |
| 651 | 730 | handle(status) { |
| 731 | + console.error(this.dataForm) | |
| 732 | + // return | |
| 652 | 733 | this.$refs['elForm'].validate((valid) => { |
| 653 | 734 | if(valid) { |
| 654 | 735 | this.btnLoading = true; | ... | ... |
src/views/baseComapnyInfo/index.vue
| ... | ... | @@ -94,6 +94,7 @@ import ExportBox from "./ExportBox"; |
| 94 | 94 | import request from "@/utils/request"; |
| 95 | 95 | import infoMixin from "@/mixins/info"; |
| 96 | 96 | import define from '@/utils/define' |
| 97 | + | |
| 97 | 98 | export default { |
| 98 | 99 | mixins: [infoMixin], |
| 99 | 100 | components: { NCCForm, ExportBox }, | ... | ... |
src/views/baseInspectionReport/Form.vue
| ... | ... | @@ -26,6 +26,12 @@ |
| 26 | 26 | </el-form-item> |
| 27 | 27 | </el-col> |
| 28 | 28 | <el-col :span="24"> |
| 29 | + <el-form-item label="取证编号" prop="evidenceNumber"> | |
| 30 | + <el-input v-model="dataForm.evidenceNumber" placeholder="请输入取证编号" clearable /> | |
| 31 | + | |
| 32 | + </el-form-item> | |
| 33 | + </el-col> | |
| 34 | + <el-col :span="24"> | |
| 29 | 35 | <el-form-item label="问题来源" prop="reportSource"> |
| 30 | 36 | <el-radio-group v-model="dataForm.reportSource"> |
| 31 | 37 | <el-radio v-for="(item, index) in sourceOptions" :key="index" :label="item.Id">{{ item.FullName }}</el-radio> |
| ... | ... | @@ -184,6 +190,10 @@ |
| 184 | 190 | </el-row> |
| 185 | 191 | <el-row v-else> |
| 186 | 192 | <el-col class="form-item"> |
| 193 | + <div class="label w-120">取证编号:</div> | |
| 194 | + <div class="text">{{ dataForm.evidenceNumber || '--' }}</div> | |
| 195 | + </el-col> | |
| 196 | + <el-col class="form-item"> | |
| 187 | 197 | <div class="label w-120">问题来源:</div> |
| 188 | 198 | <div class="text">{{ dataForm.reportSourceName || '--' }}</div> |
| 189 | 199 | </el-col> |
| ... | ... | @@ -316,6 +326,7 @@ export default { |
| 316 | 326 | isDetail: false, |
| 317 | 327 | form_loading: true, |
| 318 | 328 | dataForm: { |
| 329 | + evidenceNumber:undefined, | |
| 319 | 330 | id: undefined, |
| 320 | 331 | reportSource: undefined, |
| 321 | 332 | platformNameStr: undefined, |
| ... | ... | @@ -589,6 +600,8 @@ export default { |
| 589 | 600 | }); |
| 590 | 601 | }, |
| 591 | 602 | dataFormSubmit() { |
| 603 | + console.error(this.dataForm) | |
| 604 | + // return | |
| 592 | 605 | this.$refs["elForm"].validate(async (valid) => { |
| 593 | 606 | if (valid) { |
| 594 | 607 | let obj = { | ... | ... |
src/views/baseSpecialAction/ExportBox copy.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/baseSpecialAction/ExportBox.vue
| ... | ... | @@ -2,21 +2,11 @@ |
| 2 | 2 | <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" |
| 3 | 3 | class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> |
| 4 | 4 | <el-form label-position="top" label-width="80px"> |
| 5 | - <el-form-item label="数据选择"> | |
| 6 | - <el-radio-group v-model="type"> | |
| 7 | - <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | - <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | - </el-radio-group> | |
| 10 | - </el-form-item> | |
| 11 | - <el-form-item label="导出字段"> | |
| 12 | - <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | - @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | - <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | - <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | - {{item.label}} | |
| 17 | - </el-checkbox> | |
| 18 | - </el-checkbox-group> | |
| 19 | - </el-form-item> | |
| 5 | + <el-col :span="4"> | |
| 6 | + <el-form-item label=""> | |
| 7 | + <el-date-picker v-model="releaseTime" type="datetimerange" value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"/> | |
| 8 | + </el-form-item> | |
| 9 | + </el-col> | |
| 20 | 10 | </el-form> |
| 21 | 11 | <span slot="footer" class="dialog-footer"> |
| 22 | 12 | <el-button @click="visible=false">取 消</el-button> |
| ... | ... | @@ -29,6 +19,7 @@ |
| 29 | 19 | export default { |
| 30 | 20 | data() { |
| 31 | 21 | return { |
| 22 | + releaseTime:'', | |
| 32 | 23 | visible: false, |
| 33 | 24 | btnLoading: false, |
| 34 | 25 | type: 0, |
| ... | ... | @@ -54,7 +45,12 @@ export default { |
| 54 | 45 | this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; |
| 55 | 46 | }, |
| 56 | 47 | downLoad() { |
| 57 | - this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 48 | + if(this.releaseTime){ | |
| 49 | + this.$emit('download',this.releaseTime.join(',')) | |
| 50 | + } else{ | |
| 51 | + this.$message.error('请选择日期') | |
| 52 | + } | |
| 53 | + | |
| 58 | 54 | } |
| 59 | 55 | } |
| 60 | 56 | } | ... | ... |
src/views/baseSpecialAction/Form.vue
| ... | ... | @@ -117,6 +117,30 @@ |
| 117 | 117 | </el-date-picker> |
| 118 | 118 | </el-form-item> |
| 119 | 119 | </el-col> |
| 120 | + <el-col :span="23" v-if="ncc.hasFormP('creatorTime')"> | |
| 121 | + <el-form-item label="发布时间" prop="creatorTime"> | |
| 122 | + <el-date-picker | |
| 123 | + v-model="dataForm.creatorTime" | |
| 124 | + type="date" | |
| 125 | + placeholder="选择日期" | |
| 126 | + format="yyyy-MM-dd" | |
| 127 | + value-format="yyyy-MM-dd" | |
| 128 | + > | |
| 129 | + </el-date-picker> | |
| 130 | + </el-form-item> | |
| 131 | + </el-col> | |
| 132 | + <el-col :span="23" v-if="ncc.hasFormP('cleanedDataCount')"> | |
| 133 | + <el-form-item label="清理数据条数" prop="cleanedDataCount"> | |
| 134 | + <el-input-number v-model="dataForm.cleanedDataCount" placeholder="数字文本" :step="1" > | |
| 135 | + </el-input-number> | |
| 136 | + </el-form-item> | |
| 137 | + </el-col> | |
| 138 | + <el-col :span="23" v-if="ncc.hasFormP('purgedRecordsCount')"> | |
| 139 | + <el-form-item label="处置账号个数" prop="purgedRecordsCount"> | |
| 140 | + <el-input-number v-model="dataForm.purgedRecordsCount" placeholder="数字文本" :step="1" > | |
| 141 | + </el-input-number> | |
| 142 | + </el-form-item> | |
| 143 | + </el-col> | |
| 120 | 144 | </el-form> |
| 121 | 145 | </el-row> |
| 122 | 146 | <span slot="footer" class="dialog-footer"> |
| ... | ... | @@ -180,6 +204,9 @@ export default { |
| 180 | 204 | lastModifyTime: undefined, |
| 181 | 205 | deadline: undefined, |
| 182 | 206 | relationId: undefined, |
| 207 | + cleanedDataCount:0, | |
| 208 | + purgedRecordsCount:0 | |
| 209 | + | |
| 183 | 210 | }, |
| 184 | 211 | rules: { |
| 185 | 212 | title: [{ required: true, message: "请输入标题", trigger: "blur" }], |
| ... | ... | @@ -194,7 +221,7 @@ export default { |
| 194 | 221 | BaseList:[], |
| 195 | 222 | viewportHeight: 0, |
| 196 | 223 | // nestedPageUrl:"http://8.130.38.56:8043/old/#/onlineDev/webDesign/indexNew", |
| 197 | - nestedPageUrl:"http://118.122.147.194:5000/old/#/onlineDev/webDesign/indexNew", | |
| 224 | + nestedPageUrl:"http://10.0.0.208:5000/old/#/onlineDev/webDesign/indexNew", | |
| 198 | 225 | dialogVisible: false, |
| 199 | 226 | btnLoading: false |
| 200 | 227 | }; |
| ... | ... | @@ -285,12 +312,15 @@ export default { |
| 285 | 312 | }).then((res) => { |
| 286 | 313 | this.dataForm = res.data; |
| 287 | 314 | this.dataForm.deadline = new Date(ncc.dateFormat(res.data.deadline, 'YYYY-MM-DD HH:mm:ss')); |
| 315 | + this.dataForm.creatorTime = new Date(ncc.dateFormat(res.data.creatorTime, 'YYYY-MM-DD HH:mm:ss')); | |
| 288 | 316 | this.dataForm.annex = res.data.annex == null ? [] : res.data.annex; |
| 289 | 317 | }) |
| 290 | 318 | } |
| 291 | 319 | }); |
| 292 | 320 | }, |
| 293 | 321 | dataFormSubmit(type) { |
| 322 | + console.error({...this.dataForm}) | |
| 323 | + // return | |
| 294 | 324 | this.validateForm(type, () => { |
| 295 | 325 | let obj = { |
| 296 | 326 | ...this.dataForm, | ... | ... |
src/views/baseSpecialAction/index.vue
| ... | ... | @@ -6,12 +6,26 @@ |
| 6 | 6 | <div class="NCC-common-layout-center"> |
| 7 | 7 | <el-row class="NCC-common-search-box" :gutter="16"> |
| 8 | 8 | <el-form @submit.native.prevent size="mini"> |
| 9 | - <el-col :span="6"> | |
| 9 | + <el-col :span="4"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker | |
| 12 | + v-model="query.releaseTime" | |
| 13 | + type="datetimerange" | |
| 14 | + value-format="yyyy-MM-dd" | |
| 15 | + format="yyyy-MM-dd" | |
| 16 | + start-placeholder="开始日期" | |
| 17 | + end-placeholder="结束日期" | |
| 18 | + > | |
| 19 | + </el-date-picker> | |
| 20 | + </el-form-item> | |
| 21 | + </el-col> | |
| 22 | + <el-col :span="4"> | |
| 10 | 23 | <el-form-item label=""> |
| 11 | 24 | <el-input v-model="query.title" placeholder="标题" clearable/> |
| 12 | 25 | </el-form-item> |
| 13 | 26 | </el-col> |
| 14 | - <el-col :span="6"> | |
| 27 | + | |
| 28 | + <el-col :span="4"> | |
| 15 | 29 | <el-form-item label=""> |
| 16 | 30 | <el-select v-model="query.state" placeholder="请选择状态" clearable> |
| 17 | 31 | <el-option label="已存档" value="已存档"></el-option> |
| ... | ... | @@ -30,7 +44,7 @@ |
| 30 | 44 | </el-form> |
| 31 | 45 | <div class="NCC-common-search-box-right"> |
| 32 | 46 | <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> --> | |
| 47 | + <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> | |
| 34 | 48 | </div> |
| 35 | 49 | </el-row> |
| 36 | 50 | <div class="NCC-common-layout-main NCC-flex-main"> |
| ... | ... | @@ -42,12 +56,14 @@ |
| 42 | 56 | </template> |
| 43 | 57 | </el-table-column> |
| 44 | 58 | <el-table-column prop="creatorTime" label="发布时间" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> |
| 45 | - <el-table-column label="传达区域" prop="communicationArea" align="left" show-overflow-tooltip> | |
| 59 | + <el-table-column prop="cleanedDataCount" label="清理数据条数" align="left" show-overflow-tooltip/> | |
| 60 | + <el-table-column prop="purgedRecordsCount" label="处置账号个数" align="left" show-overflow-tooltip/> | |
| 61 | + <!-- <el-table-column label="传达区域" prop="communicationArea" align="left" show-overflow-tooltip> | |
| 46 | 62 | <template slot-scope="scope">{{ JSON.parse(scope.row.communicationArea) | dynamicText(communicationAreaOptions) }}</template> |
| 47 | 63 | </el-table-column> |
| 48 | 64 | <el-table-column label="传达外协" prop="communicationOut" align="left" show-overflow-tooltip> |
| 49 | 65 | <template slot-scope="scope">{{ JSON.parse(scope.row.communicationOut) | dynamicText(communicationOutOptions) }}</template> |
| 50 | - </el-table-column> | |
| 66 | + </el-table-column> --> | |
| 51 | 67 | <!-- <el-table-column label="内容" prop="content" align="left" show-overflow-tooltip /> --> |
| 52 | 68 | <el-table-column prop="state" label="状态" align="left" show-overflow-tooltip width="100"> |
| 53 | 69 | <template slot-scope="scope"> |
| ... | ... | @@ -92,6 +108,7 @@ export default { |
| 92 | 108 | query: { |
| 93 | 109 | title: undefined, |
| 94 | 110 | state: undefined, |
| 111 | + releaseTime:'' | |
| 95 | 112 | }, |
| 96 | 113 | list: [], |
| 97 | 114 | listLoading: false, |
| ... | ... | @@ -186,23 +203,43 @@ export default { |
| 186 | 203 | }); |
| 187 | 204 | }, |
| 188 | 205 | exportData() { |
| 206 | + // let query = {...this.listQuery, ...this.query }; | |
| 207 | + // request({ | |
| 208 | + // url: `/Extend/BaseSpecialAction/Actions/ExportByCount`, | |
| 209 | + // method: "GET", | |
| 210 | + // data: query, | |
| 211 | + // }).then((res) => { | |
| 212 | + | |
| 213 | + // }); | |
| 189 | 214 | this.exportBoxVisible = true; |
| 190 | 215 | this.$nextTick(() => { |
| 191 | 216 | this.$refs.ExportBox.init(this.list); |
| 192 | 217 | }); |
| 193 | 218 | }, |
| 194 | 219 | download(data) { |
| 195 | - let query = { ...data, ...this.listQuery, ...this.query }; | |
| 220 | + console.error(data) | |
| 196 | 221 | request({ |
| 197 | - url: `/Extend/BaseSpecialAction/Actions/Export`, | |
| 222 | + url: `/Extend/BaseSpecialAction/Actions/ExportByCount`, | |
| 198 | 223 | method: "GET", |
| 199 | - data: query, | |
| 224 | + params: data, | |
| 200 | 225 | }).then((res) => { |
| 201 | - if (!res.data.url) return; | |
| 202 | - window.location.href = this.define.comUrl + res.data.url; | |
| 203 | - this.$refs.ExportBox.visible = false; | |
| 204 | - this.exportBoxVisible = false; | |
| 226 | + if (!res.data.url) return; | |
| 227 | + window.location.href = this.define.comUrl + res.data.url; | |
| 228 | + this.$refs.ExportBox.visible = false; | |
| 229 | + this.exportBoxVisible = false; | |
| 205 | 230 | }); |
| 231 | + | |
| 232 | + // let query = { ...data, ...this.listQuery, ...this.query }; | |
| 233 | + // request({ | |
| 234 | + // url: `/Extend/BaseSpecialAction/Actions/Export`, | |
| 235 | + // method: "GET", | |
| 236 | + // data: query, | |
| 237 | + // }).then((res) => { | |
| 238 | + // if (!res.data.url) return; | |
| 239 | + // window.location.href = this.define.comUrl + res.data.url; | |
| 240 | + // this.$refs.ExportBox.visible = false; | |
| 241 | + // this.exportBoxVisible = false; | |
| 242 | + // }); | |
| 206 | 243 | }, |
| 207 | 244 | search() { |
| 208 | 245 | this.listQuery = { | ... | ... |
src/views/baseSystemInfo/DetailForm.vue
| ... | ... | @@ -159,6 +159,12 @@ |
| 159 | 159 | <p class="text">{{ dataForm.remark || "--" }}</p> |
| 160 | 160 | </div> |
| 161 | 161 | </el-col> |
| 162 | + <el-col :span="24"> | |
| 163 | + <div class="form-item"> | |
| 164 | + <div class="label w-120">状态:</div> | |
| 165 | + <p class="text">{{ dataForm.status=='1'?'在用':dataForm.status=='2'?'停用':dataForm.status=='3'?'注销':'--' }}</p> | |
| 166 | + </div> | |
| 167 | + </el-col> | |
| 162 | 168 | <!-- <el-col :span="24"> |
| 163 | 169 | <div class="form-item"> |
| 164 | 170 | <div class="label w-120">所属外协:</div> | ... | ... |
src/views/baseSystemInfo/index.vue
| ... | ... | @@ -364,7 +364,11 @@ export default { |
| 364 | 364 | obj ={ |
| 365 | 365 | url: '/Extend/basesysteminfo/Actions/Export', |
| 366 | 366 | method: "POST", |
| 367 | - data: this.query, | |
| 367 | + data:{ | |
| 368 | + ...this.query, | |
| 369 | + keyword: this.$store.state.meta.searchKey | |
| 370 | + }, | |
| 371 | + | |
| 368 | 372 | } |
| 369 | 373 | }; |
| 370 | 374 | request(obj).then((res) => { | ... | ... |
src/views/homePage/components/Menu.vue
src/views/homePage/components/news/index.vue
| ... | ... | @@ -2,14 +2,20 @@ |
| 2 | 2 | <div class="News"> |
| 3 | 3 | <el-popover placement="left" width="300" trigger="click"> |
| 4 | 4 | <NewsDialog ref="MessageDialog" @changeMagNum="changeMagNum" /> |
| 5 | - <div slot="reference" class="news-item"> | |
| 5 | + <div slot="reference" class="news-item" > | |
| 6 | 6 | <div class="icon-item"> |
| 7 | - <div class="red-spot" v-show="isHaveMsg"></div> | |
| 8 | - <i class="el-icon-message-solid"></i> | |
| 9 | - </div> | |
| 10 | - <div class="nav-title">我的消息</div> | |
| 7 | + <div class="red-spot" v-show="isHaveMsg"></div> | |
| 8 | + <i class="el-icon-message-solid"></i> | |
| 9 | + </div> | |
| 10 | + <div class="nav-title">我的消息</div> | |
| 11 | 11 | </div> |
| 12 | 12 | </el-popover> |
| 13 | + <div class="news-item" @click="gopath"> | |
| 14 | + <div class="icon-item"> | |
| 15 | + <i class="el-icon-data-line"></i> | |
| 16 | + </div> | |
| 17 | + <div class="nav-title">大屏</div> | |
| 18 | + </div> | |
| 13 | 19 | </div> |
| 14 | 20 | </template> |
| 15 | 21 | |
| ... | ... | @@ -42,6 +48,9 @@ export default { |
| 42 | 48 | } |
| 43 | 49 | }, |
| 44 | 50 | methods: { |
| 51 | + gopath(){ | |
| 52 | + window.location.href = 'http://10.0.0.208:5000/HomePage/index.html'; | |
| 53 | + }, | |
| 45 | 54 | changeMagNum(val) { |
| 46 | 55 | this.isHaveMsg = val ? true : false; |
| 47 | 56 | this.messageCount = val; | ... | ... |
src/views/homePage/homePage.scss
src/views/new/baseCollectAndPreserveEvidence/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseCollectAndPreserveEvidence/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="取证编码" prop="collectCode"> | |
| 13 | + <el-input v-model="dataForm.collectCode" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="标题" prop="tittle"> | |
| 19 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="内容" prop="content"> | |
| 25 | + <el-input v-model="dataForm.content" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="图片" prop="imageUrl"> | |
| 31 | + <NCC-UploadImg v-model="dataForm.imageUrl" :fileSize="5" sizeUnit="MB" :limit="9" > | |
| 32 | + </NCC-UploadImg> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + </el-form> | |
| 36 | + </el-row> | |
| 37 | + <span slot="footer" class="dialog-footer"> | |
| 38 | + <el-button @click="visible = false">取 消</el-button> | |
| 39 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 40 | + </span> | |
| 41 | + </el-dialog> | |
| 42 | +</template> | |
| 43 | +<script> | |
| 44 | + import request from '@/utils/request' | |
| 45 | + export default { | |
| 46 | + components: {}, | |
| 47 | + props: [], | |
| 48 | + data() { | |
| 49 | + return { | |
| 50 | + loading: false, | |
| 51 | + visible: false, | |
| 52 | + isDetail: false, | |
| 53 | + dataForm: { | |
| 54 | + id:'', | |
| 55 | + date:undefined, | |
| 56 | + collectCode:undefined, | |
| 57 | + tittle:undefined, | |
| 58 | + content:undefined, | |
| 59 | + imageUrl:[], | |
| 60 | + }, | |
| 61 | + rules: { | |
| 62 | + }, | |
| 63 | + } | |
| 64 | + }, | |
| 65 | + computed: {}, | |
| 66 | + watch: {}, | |
| 67 | + created() { | |
| 68 | + }, | |
| 69 | + mounted() { | |
| 70 | + }, | |
| 71 | + methods: { | |
| 72 | + goBack() { | |
| 73 | + this.$emit('refresh') | |
| 74 | + }, | |
| 75 | + init(id, isDetail) { | |
| 76 | + this.dataForm.id = id || 0; | |
| 77 | + this.visible = true; | |
| 78 | + this.isDetail = isDetail || false; | |
| 79 | + this.$nextTick(() => { | |
| 80 | + this.$refs['elForm'].resetFields(); | |
| 81 | + if (this.dataForm.id) { | |
| 82 | + request({ | |
| 83 | + url: '/SubDev/BaseCollectAndPreserveEvidence/' + this.dataForm.id, | |
| 84 | + method: 'get' | |
| 85 | + }).then(res =>{ | |
| 86 | + this.dataForm = res.data; | |
| 87 | + if(!this.dataForm.imageUrl)this.dataForm.imageUrl=[]; | |
| 88 | + }) | |
| 89 | + } | |
| 90 | + }) | |
| 91 | + }, | |
| 92 | + dataFormSubmit() { | |
| 93 | + this.$refs['elForm'].validate((valid) => { | |
| 94 | + if (valid) { | |
| 95 | + if (!this.dataForm.id) { | |
| 96 | + request({ | |
| 97 | + url: `/SubDev/BaseCollectAndPreserveEvidence`, | |
| 98 | + method: 'post', | |
| 99 | + data: this.dataForm, | |
| 100 | + }).then((res) => { | |
| 101 | + this.$message({ | |
| 102 | + message: res.msg, | |
| 103 | + type: 'success', | |
| 104 | + duration: 1000, | |
| 105 | + onClose: () => { | |
| 106 | + this.visible = false, | |
| 107 | + this.$emit('refresh', true) | |
| 108 | + } | |
| 109 | + }) | |
| 110 | + }) | |
| 111 | + } else { | |
| 112 | + request({ | |
| 113 | + url: '/SubDev/BaseCollectAndPreserveEvidence/' + this.dataForm.id, | |
| 114 | + method: 'PUT', | |
| 115 | + data: this.dataForm | |
| 116 | + }).then((res) => { | |
| 117 | + this.$message({ | |
| 118 | + message: res.msg, | |
| 119 | + type: 'success', | |
| 120 | + duration: 1000, | |
| 121 | + onClose: () => { | |
| 122 | + this.visible = false | |
| 123 | + this.$emit('refresh', true) | |
| 124 | + } | |
| 125 | + }) | |
| 126 | + }) | |
| 127 | + } | |
| 128 | + } | |
| 129 | + }) | |
| 130 | + }, | |
| 131 | + } | |
| 132 | + } | |
| 133 | +</script> | ... | ... |
src/views/new/baseCollectAndPreserveEvidence/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">取证固证</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label=""> | |
| 16 | + <el-input v-model="query.content" placeholder="内容" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label=""> | |
| 21 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 22 | + </el-date-picker> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <el-input v-model="query.collectCode" placeholder="取证编码" clearable /> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + </template> | |
| 32 | + <el-col :span="6"> | |
| 33 | + <el-form-item> | |
| 34 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 35 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 36 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 37 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-form> | |
| 41 | + </el-row> | |
| 42 | + <div class="NCC-common-layout-main NCC-flex-main NCC-common-search-box"> | |
| 43 | + <div class="NCC-common-head"> | |
| 44 | + <div style="display: flex;"> | |
| 45 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 46 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 47 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 48 | + <div style="margin-left: 10px;"> | |
| 49 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseCollectAndPreserveEvidence/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 50 | + <div class="avatar-box"> | |
| 51 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 52 | + </div> | |
| 53 | + </el-upload> | |
| 54 | + </div> | |
| 55 | + </div> | |
| 56 | + <div class="NCC-common-head-right"> | |
| 57 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 58 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 59 | + </el-tooltip> | |
| 60 | + <screenfull isContainer /> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 64 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 65 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 66 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 67 | + <el-table-column prop="collectCode" label="取证编码" align="left" /> | |
| 68 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 69 | + <template slot-scope="scope"> | |
| 70 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 71 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 72 | + </template> | |
| 73 | + </el-table-column> | |
| 74 | + </NCC-table> | |
| 75 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 79 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 80 | + </div> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | +</template> | |
| 84 | +<script> | |
| 85 | +import define from '@/utils/define' | |
| 86 | + import request from '@/utils/request' | |
| 87 | + import NCCForm from './Form' | |
| 88 | + import ExportBox from './ExportBox' | |
| 89 | + export default { | |
| 90 | + components: { NCCForm, ExportBox }, | |
| 91 | + data() { | |
| 92 | + return { | |
| 93 | + uploadHeaders: { | |
| 94 | + Authorization: this.$store.getters.token, | |
| 95 | + IsLogin: true, | |
| 96 | + }, | |
| 97 | + showAll: false, | |
| 98 | + query: { | |
| 99 | + tittle:undefined, | |
| 100 | + content:undefined, | |
| 101 | + date:undefined, | |
| 102 | + collectCode:undefined, | |
| 103 | + }, | |
| 104 | + list: [], | |
| 105 | + listLoading: true, | |
| 106 | + multipleSelection: [], total: 0, | |
| 107 | + listQuery: { | |
| 108 | + currentPage: 1, | |
| 109 | + pageSize: 20, | |
| 110 | + sort: "desc", | |
| 111 | + sidx: "", | |
| 112 | + }, | |
| 113 | + formVisible: false, | |
| 114 | + exportBoxVisible: false, | |
| 115 | + columnList: [ | |
| 116 | + { prop: 'tittle', label: '标题' }, | |
| 117 | + { prop: 'content', label: '内容' }, | |
| 118 | + { prop: 'date', label: '时间' }, | |
| 119 | + { prop: 'collectCode', label: '取证编码' }, | |
| 120 | + ], | |
| 121 | + } | |
| 122 | + }, | |
| 123 | + computed: {}, | |
| 124 | + created() { | |
| 125 | + this.initData() | |
| 126 | + }, | |
| 127 | + methods: { | |
| 128 | + uploadSuccess(response, file, fileList) { | |
| 129 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 130 | + this.$message({ | |
| 131 | + type: type, | |
| 132 | + message: response.msg, | |
| 133 | + }); | |
| 134 | + // this.initList(); | |
| 135 | + }, | |
| 136 | + initData() { | |
| 137 | + this.listLoading = true; | |
| 138 | + let _query = { | |
| 139 | + ...this.listQuery, | |
| 140 | + ...this.query | |
| 141 | + }; | |
| 142 | + let query = {} | |
| 143 | + for (let key in _query) { | |
| 144 | + if (Array.isArray(_query[key])) { | |
| 145 | + query[key] = _query[key].join() | |
| 146 | + } else { | |
| 147 | + query[key] = _query[key] | |
| 148 | + } | |
| 149 | + } | |
| 150 | + request({ | |
| 151 | + url: `/SubDev/BaseCollectAndPreserveEvidence`, | |
| 152 | + method: 'get', | |
| 153 | + params: query | |
| 154 | + }).then(res => { | |
| 155 | + this.list = res.data.list | |
| 156 | + this.total = res.data.pagination.total | |
| 157 | + this.listLoading = false | |
| 158 | + }) | |
| 159 | + }, | |
| 160 | + handleDel(id) { | |
| 161 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 162 | + type: 'warning' | |
| 163 | + }).then(() => { | |
| 164 | + request({ | |
| 165 | + url: `/SubDev/BaseCollectAndPreserveEvidence/${id}`, | |
| 166 | + method: 'DELETE' | |
| 167 | + }).then(res => { | |
| 168 | + this.$message({ | |
| 169 | + type: 'success', | |
| 170 | + message: res.msg, | |
| 171 | + onClose: () => { | |
| 172 | + this.initData() | |
| 173 | + } | |
| 174 | + }); | |
| 175 | + }) | |
| 176 | + }).catch(() => { | |
| 177 | + }); | |
| 178 | + }, | |
| 179 | + addOrUpdateHandle(id, isDetail) { | |
| 180 | + this.formVisible = true | |
| 181 | + this.$nextTick(() => { | |
| 182 | + this.$refs.NCCForm.init(id, isDetail) | |
| 183 | + }) | |
| 184 | + }, | |
| 185 | + exportData(type) { | |
| 186 | + let obj = {}; | |
| 187 | + if(type) { | |
| 188 | + obj = { | |
| 189 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/4', | |
| 190 | + params: {type:4}, | |
| 191 | + method: "GET", | |
| 192 | + responseType: 'blob', | |
| 193 | + } | |
| 194 | + request(obj).then((res) => { | |
| 195 | + if(type) { | |
| 196 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 197 | + const url = window.URL.createObjectURL(blob); | |
| 198 | + let link = document.createElement('a'); | |
| 199 | + link.style.display = 'none'; | |
| 200 | + link.href = url; | |
| 201 | + link.download = '取证固证.xlsx'; | |
| 202 | + link.click(); | |
| 203 | + } else { | |
| 204 | + if(res.code != 200) return; | |
| 205 | + const url = define.APIURl + res.data.url; | |
| 206 | + const link = document.createElement("a"); | |
| 207 | + link.href = url; | |
| 208 | + link.download = res.data.name; | |
| 209 | + link.click(); | |
| 210 | + } | |
| 211 | + }) | |
| 212 | + } else { | |
| 213 | + this.exportBoxVisible = true | |
| 214 | + this.$nextTick(() => { | |
| 215 | + this.$refs.ExportBox.init(this.columnList) | |
| 216 | + }) | |
| 217 | + }; | |
| 218 | + | |
| 219 | + }, | |
| 220 | + // exportData() { | |
| 221 | + // this.exportBoxVisible = true | |
| 222 | + // this.$nextTick(() => { | |
| 223 | + // this.$refs.ExportBox.init(this.columnList) | |
| 224 | + // }) | |
| 225 | + // }, | |
| 226 | + download(data) { | |
| 227 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 228 | + request({ | |
| 229 | + url: `/SubDev/BaseCollectAndPreserveEvidence/Actions/Export`, | |
| 230 | + method: 'get', | |
| 231 | + params: query | |
| 232 | + }).then(res => { | |
| 233 | + if (!res.data.url) return | |
| 234 | + window.location.href = this.define.comUrl + res.data.url | |
| 235 | + this.$refs.ExportBox.visible = false | |
| 236 | + this.exportBoxVisible = false | |
| 237 | + }) | |
| 238 | + }, | |
| 239 | + search() { | |
| 240 | + this.listQuery = { | |
| 241 | + currentPage: 1, | |
| 242 | + pageSize: 20, | |
| 243 | + sort: "desc", | |
| 244 | + sidx: "", | |
| 245 | + } | |
| 246 | + this.initData() | |
| 247 | + }, | |
| 248 | + refresh(isrRefresh) { | |
| 249 | + this.formVisible = false | |
| 250 | + if (isrRefresh) this.reset() | |
| 251 | + }, | |
| 252 | + reset() { | |
| 253 | + for (let key in this.query) { | |
| 254 | + this.query[key] = undefined | |
| 255 | + } | |
| 256 | + this.listQuery = { | |
| 257 | + currentPage: 1, | |
| 258 | + pageSize: 20, | |
| 259 | + sort: "desc", | |
| 260 | + sidx: "", | |
| 261 | + } | |
| 262 | + this.initData() | |
| 263 | + } | |
| 264 | + } | |
| 265 | + } | |
| 266 | +</script> | |
| 0 | 267 | \ No newline at end of file | ... | ... |
src/views/new/baseInspectionResult/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseInspectionResult/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="应用名称" prop="systemId"> | |
| 7 | + <el-input v-model="dataForm.systemId" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 8 | + </el-input> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="内容" prop="content"> | |
| 13 | + <el-input v-model="dataForm.content" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="图片" prop="imageUrl"> | |
| 19 | + <NCC-UploadImg v-model="dataForm.imageUrl" :fileSize="5" sizeUnit="MB" :limit="9" > | |
| 20 | + </NCC-UploadImg> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + </el-form> | |
| 24 | + </el-row> | |
| 25 | + <span slot="footer" class="dialog-footer"> | |
| 26 | + <el-button @click="visible = false">取 消</el-button> | |
| 27 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 28 | + </span> | |
| 29 | + </el-dialog> | |
| 30 | +</template> | |
| 31 | +<script> | |
| 32 | + import request from '@/utils/request' | |
| 33 | + export default { | |
| 34 | + components: {}, | |
| 35 | + props: [], | |
| 36 | + data() { | |
| 37 | + return { | |
| 38 | + loading: false, | |
| 39 | + visible: false, | |
| 40 | + isDetail: false, | |
| 41 | + dataForm: { | |
| 42 | + id:'', | |
| 43 | + systemId:undefined, | |
| 44 | + content:undefined, | |
| 45 | + imageUrl:[], | |
| 46 | + }, | |
| 47 | + rules: { | |
| 48 | + }, | |
| 49 | + } | |
| 50 | + }, | |
| 51 | + computed: {}, | |
| 52 | + watch: {}, | |
| 53 | + created() { | |
| 54 | + }, | |
| 55 | + mounted() { | |
| 56 | + }, | |
| 57 | + methods: { | |
| 58 | + goBack() { | |
| 59 | + this.$emit('refresh') | |
| 60 | + }, | |
| 61 | + init(id, isDetail) { | |
| 62 | + this.dataForm.id = id || 0; | |
| 63 | + this.visible = true; | |
| 64 | + this.isDetail = isDetail || false; | |
| 65 | + this.$nextTick(() => { | |
| 66 | + this.$refs['elForm'].resetFields(); | |
| 67 | + if (this.dataForm.id) { | |
| 68 | + request({ | |
| 69 | + url: '/SubDev/BaseInspectionResult/' + this.dataForm.id, | |
| 70 | + method: 'get' | |
| 71 | + }).then(res =>{ | |
| 72 | + this.dataForm = res.data; | |
| 73 | + if(!this.dataForm.imageUrl)this.dataForm.imageUrl=[]; | |
| 74 | + }) | |
| 75 | + } | |
| 76 | + }) | |
| 77 | + }, | |
| 78 | + dataFormSubmit() { | |
| 79 | + this.$refs['elForm'].validate((valid) => { | |
| 80 | + if (valid) { | |
| 81 | + if (!this.dataForm.id) { | |
| 82 | + request({ | |
| 83 | + url: `/SubDev/BaseInspectionResult`, | |
| 84 | + method: 'post', | |
| 85 | + data: this.dataForm, | |
| 86 | + }).then((res) => { | |
| 87 | + this.$message({ | |
| 88 | + message: res.msg, | |
| 89 | + type: 'success', | |
| 90 | + duration: 1000, | |
| 91 | + onClose: () => { | |
| 92 | + this.visible = false, | |
| 93 | + this.$emit('refresh', true) | |
| 94 | + } | |
| 95 | + }) | |
| 96 | + }) | |
| 97 | + } else { | |
| 98 | + request({ | |
| 99 | + url: '/SubDev/BaseInspectionResult/' + this.dataForm.id, | |
| 100 | + method: 'PUT', | |
| 101 | + data: this.dataForm | |
| 102 | + }).then((res) => { | |
| 103 | + this.$message({ | |
| 104 | + message: res.msg, | |
| 105 | + type: 'success', | |
| 106 | + duration: 1000, | |
| 107 | + onClose: () => { | |
| 108 | + this.visible = false | |
| 109 | + this.$emit('refresh', true) | |
| 110 | + } | |
| 111 | + }) | |
| 112 | + }) | |
| 113 | + } | |
| 114 | + } | |
| 115 | + }) | |
| 116 | + }, | |
| 117 | + } | |
| 118 | + } | |
| 119 | +</script> | ... | ... |
src/views/new/baseInspectionResult/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">巡检结果</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-input v-model="query.systemId" placeholder="应用名称" clearable /> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label=""> | |
| 16 | + <el-input v-model="query.content" placeholder="内容" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item> | |
| 21 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 22 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + </el-form> | |
| 26 | + </el-row> | |
| 27 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 28 | + <div class="NCC-common-head"> | |
| 29 | + <div style="display: flex;"> | |
| 30 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 31 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 32 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 33 | + <div style="margin-left: 10px;"> | |
| 34 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseInspectionResult/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 35 | + <div class="avatar-box"> | |
| 36 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 37 | + </div> | |
| 38 | + </el-upload> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + <div class="NCC-common-head-right"> | |
| 42 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 43 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 44 | + </el-tooltip> | |
| 45 | + <screenfull isContainer /> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 49 | + <el-table-column prop="systemId" label="应用名称" align="left" /> | |
| 50 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 51 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 52 | + <template slot-scope="scope"> | |
| 53 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button> | |
| 54 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn">删除</el-button> | |
| 55 | + </template> | |
| 56 | + </el-table-column> | |
| 57 | + </NCC-table> | |
| 58 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 62 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 63 | + </div> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | +</template> | |
| 67 | +<script> | |
| 68 | + import request from '@/utils/request' | |
| 69 | + import NCCForm from './Form' | |
| 70 | + import ExportBox from './ExportBox' | |
| 71 | + export default { | |
| 72 | + components: { NCCForm, ExportBox }, | |
| 73 | + data() { | |
| 74 | + return { | |
| 75 | + uploadHeaders: { | |
| 76 | + Authorization: this.$store.getters.token, | |
| 77 | + IsLogin: true, | |
| 78 | + }, | |
| 79 | + query: { | |
| 80 | + systemId:undefined, | |
| 81 | + content:undefined, | |
| 82 | + }, | |
| 83 | + list: [], | |
| 84 | + listLoading: true, | |
| 85 | + multipleSelection: [], total: 0, | |
| 86 | + listQuery: { | |
| 87 | + currentPage: 1, | |
| 88 | + pageSize: 20, | |
| 89 | + sort: "desc", | |
| 90 | + sidx: "", | |
| 91 | + }, | |
| 92 | + formVisible: false, | |
| 93 | + exportBoxVisible: false, | |
| 94 | + columnList: [ | |
| 95 | + { prop: 'systemId', label: '应用名称' }, | |
| 96 | + { prop: 'content', label: '内容' }, | |
| 97 | + ], | |
| 98 | + } | |
| 99 | + }, | |
| 100 | + computed: {}, | |
| 101 | + created() { | |
| 102 | + this.initData() | |
| 103 | + }, | |
| 104 | + methods: { | |
| 105 | + uploadSuccess(response, file, fileList) { | |
| 106 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 107 | + this.$message({ | |
| 108 | + type: type, | |
| 109 | + message: response.msg, | |
| 110 | + }); | |
| 111 | + // this.initList(); | |
| 112 | + }, | |
| 113 | + initData() { | |
| 114 | + this.listLoading = true; | |
| 115 | + let _query = { | |
| 116 | + ...this.listQuery, | |
| 117 | + ...this.query | |
| 118 | + }; | |
| 119 | + let query = {} | |
| 120 | + for (let key in _query) { | |
| 121 | + if (Array.isArray(_query[key])) { | |
| 122 | + query[key] = _query[key].join() | |
| 123 | + } else { | |
| 124 | + query[key] = _query[key] | |
| 125 | + } | |
| 126 | + } | |
| 127 | + request({ | |
| 128 | + url: `/SubDev/BaseInspectionResult`, | |
| 129 | + method: 'get', | |
| 130 | + params: query | |
| 131 | + }).then(res => { | |
| 132 | + this.list = res.data.list | |
| 133 | + this.total = res.data.pagination.total | |
| 134 | + this.listLoading = false | |
| 135 | + }) | |
| 136 | + }, | |
| 137 | + handleDel(id) { | |
| 138 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 139 | + type: 'warning' | |
| 140 | + }).then(() => { | |
| 141 | + request({ | |
| 142 | + url: `/SubDev/BaseInspectionResult/${id}`, | |
| 143 | + method: 'DELETE' | |
| 144 | + }).then(res => { | |
| 145 | + this.$message({ | |
| 146 | + type: 'success', | |
| 147 | + message: res.msg, | |
| 148 | + onClose: () => { | |
| 149 | + this.initData() | |
| 150 | + } | |
| 151 | + }); | |
| 152 | + }) | |
| 153 | + }).catch(() => { | |
| 154 | + }); | |
| 155 | + }, | |
| 156 | + addOrUpdateHandle(id, isDetail) { | |
| 157 | + this.formVisible = true | |
| 158 | + this.$nextTick(() => { | |
| 159 | + this.$refs.NCCForm.init(id, isDetail) | |
| 160 | + }) | |
| 161 | + }, | |
| 162 | + exportData(type) { | |
| 163 | + let obj = {}; | |
| 164 | + if(type) { | |
| 165 | + obj = { | |
| 166 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/18', | |
| 167 | + params: {type:1}, | |
| 168 | + method: "GET", | |
| 169 | + responseType: 'blob', | |
| 170 | + } | |
| 171 | + request(obj).then((res) => { | |
| 172 | + if(type) { | |
| 173 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 174 | + const url = window.URL.createObjectURL(blob); | |
| 175 | + let link = document.createElement('a'); | |
| 176 | + link.style.display = 'none'; | |
| 177 | + link.href = url; | |
| 178 | + link.download = '巡检结果.xlsx'; | |
| 179 | + link.click(); | |
| 180 | + } else { | |
| 181 | + if(res.code != 200) return; | |
| 182 | + const url = define.APIURl + res.data.url; | |
| 183 | + const link = document.createElement("a"); | |
| 184 | + link.href = url; | |
| 185 | + link.download = res.data.name; | |
| 186 | + link.click(); | |
| 187 | + } | |
| 188 | + }) | |
| 189 | + } else { | |
| 190 | + this.exportBoxVisible = true | |
| 191 | + this.$nextTick(() => { | |
| 192 | + this.$refs.ExportBox.init(this.columnList) | |
| 193 | + }) | |
| 194 | + }; | |
| 195 | + | |
| 196 | + }, | |
| 197 | + // exportData() { | |
| 198 | + // this.exportBoxVisible = true | |
| 199 | + // this.$nextTick(() => { | |
| 200 | + // this.$refs.ExportBox.init(this.columnList) | |
| 201 | + // }) | |
| 202 | + // }, | |
| 203 | + download(data) { | |
| 204 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 205 | + request({ | |
| 206 | + url: `/SubDev/BaseInspectionResult/Actions/Export`, | |
| 207 | + method: 'get', | |
| 208 | + params: query | |
| 209 | + }).then(res => { | |
| 210 | + if (!res.data.url) return | |
| 211 | + window.location.href = this.define.comUrl + res.data.url | |
| 212 | + this.$refs.ExportBox.visible = false | |
| 213 | + this.exportBoxVisible = false | |
| 214 | + }) | |
| 215 | + }, | |
| 216 | + search() { | |
| 217 | + this.listQuery = { | |
| 218 | + currentPage: 1, | |
| 219 | + pageSize: 20, | |
| 220 | + sort: "desc", | |
| 221 | + sidx: "", | |
| 222 | + } | |
| 223 | + this.initData() | |
| 224 | + }, | |
| 225 | + refresh(isrRefresh) { | |
| 226 | + this.formVisible = false | |
| 227 | + if (isrRefresh) this.reset() | |
| 228 | + }, | |
| 229 | + reset() { | |
| 230 | + for (let key in this.query) { | |
| 231 | + this.query[key] = undefined | |
| 232 | + } | |
| 233 | + this.listQuery = { | |
| 234 | + currentPage: 1, | |
| 235 | + pageSize: 20, | |
| 236 | + sort: "desc", | |
| 237 | + sidx: "", | |
| 238 | + } | |
| 239 | + this.initData() | |
| 240 | + } | |
| 241 | + } | |
| 242 | + } | |
| 243 | +</script> | |
| 0 | 244 | \ No newline at end of file | ... | ... |
src/views/new/baseInternetContentSupervisionStatus/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseInternetContentSupervisionStatus/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="标题" prop="tittle"> | |
| 13 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="内容" prop="content"> | |
| 19 | + <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="附件" prop="annex"> | |
| 25 | + <NCC-UploadFz v-model="dataForm.annex" :fileSize="1024" sizeUnit="MB" :limit="9" buttonText="点击上传" > | |
| 26 | + </NCC-UploadFz> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + </el-form> | |
| 30 | + </el-row> | |
| 31 | + <span slot="footer" class="dialog-footer"> | |
| 32 | + <el-button @click="visible = false">取 消</el-button> | |
| 33 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 34 | + </span> | |
| 35 | + </el-dialog> | |
| 36 | +</template> | |
| 37 | +<script> | |
| 38 | + import request from '@/utils/request' | |
| 39 | + export default { | |
| 40 | + components: {}, | |
| 41 | + props: [], | |
| 42 | + data() { | |
| 43 | + return { | |
| 44 | + loading: false, | |
| 45 | + visible: false, | |
| 46 | + isDetail: false, | |
| 47 | + dataForm: { | |
| 48 | + id:'', | |
| 49 | + date:undefined, | |
| 50 | + tittle:undefined, | |
| 51 | + content:undefined, | |
| 52 | + annex:[], | |
| 53 | + }, | |
| 54 | + rules: { | |
| 55 | + }, | |
| 56 | + } | |
| 57 | + }, | |
| 58 | + computed: {}, | |
| 59 | + watch: {}, | |
| 60 | + created() { | |
| 61 | + }, | |
| 62 | + mounted() { | |
| 63 | + }, | |
| 64 | + methods: { | |
| 65 | + goBack() { | |
| 66 | + this.$emit('refresh') | |
| 67 | + }, | |
| 68 | + init(id, isDetail) { | |
| 69 | + this.dataForm.id = id || 0; | |
| 70 | + this.visible = true; | |
| 71 | + this.isDetail = isDetail || false; | |
| 72 | + this.$nextTick(() => { | |
| 73 | + this.$refs['elForm'].resetFields(); | |
| 74 | + if (this.dataForm.id) { | |
| 75 | + request({ | |
| 76 | + url: '/SubDev/BaseInternetContentSupervisionStatus/' + this.dataForm.id, | |
| 77 | + method: 'get' | |
| 78 | + }).then(res =>{ | |
| 79 | + this.dataForm = res.data; | |
| 80 | + if(!this.dataForm.annex)this.dataForm.annex=[]; | |
| 81 | + }) | |
| 82 | + } | |
| 83 | + }) | |
| 84 | + }, | |
| 85 | + dataFormSubmit() { | |
| 86 | + this.$refs['elForm'].validate((valid) => { | |
| 87 | + if (valid) { | |
| 88 | + if (!this.dataForm.id) { | |
| 89 | + request({ | |
| 90 | + url: `/SubDev/BaseInternetContentSupervisionStatus`, | |
| 91 | + method: 'post', | |
| 92 | + data: this.dataForm, | |
| 93 | + }).then((res) => { | |
| 94 | + this.$message({ | |
| 95 | + message: res.msg, | |
| 96 | + type: 'success', | |
| 97 | + duration: 1000, | |
| 98 | + onClose: () => { | |
| 99 | + this.visible = false, | |
| 100 | + this.$emit('refresh', true) | |
| 101 | + } | |
| 102 | + }) | |
| 103 | + }) | |
| 104 | + } else { | |
| 105 | + request({ | |
| 106 | + url: '/SubDev/BaseInternetContentSupervisionStatus/' + this.dataForm.id, | |
| 107 | + method: 'PUT', | |
| 108 | + data: this.dataForm | |
| 109 | + }).then((res) => { | |
| 110 | + this.$message({ | |
| 111 | + message: res.msg, | |
| 112 | + type: 'success', | |
| 113 | + duration: 1000, | |
| 114 | + onClose: () => { | |
| 115 | + this.visible = false | |
| 116 | + this.$emit('refresh', true) | |
| 117 | + } | |
| 118 | + }) | |
| 119 | + }) | |
| 120 | + } | |
| 121 | + } | |
| 122 | + }) | |
| 123 | + }, | |
| 124 | + } | |
| 125 | + } | |
| 126 | +</script> | ... | ... |
src/views/new/baseInternetContentSupervisionStatus/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">互联网信息内容监管情况</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-input v-model="query.content" placeholder="内容" /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item> | |
| 27 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 28 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + </el-form> | |
| 32 | + </el-row> | |
| 33 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 34 | + <div class="NCC-common-head"> | |
| 35 | + <div style="display: flex;"> | |
| 36 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 37 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 38 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 39 | + <div style="margin-left: 10px;"> | |
| 40 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseInternetContentSupervisionStatus/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 41 | + <div class="avatar-box"> | |
| 42 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 43 | + </div> | |
| 44 | + </el-upload> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + <div class="NCC-common-head-right"> | |
| 48 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 49 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 50 | + </el-tooltip> | |
| 51 | + <screenfull isContainer /> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 55 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 56 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 57 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 58 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 59 | + <template slot-scope="scope"> | |
| 60 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 61 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 62 | + </template> | |
| 63 | + </el-table-column> | |
| 64 | + </NCC-table> | |
| 65 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 69 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | + | |
| 74 | +</template> | |
| 75 | +<script> | |
| 76 | + import request from '@/utils/request' | |
| 77 | + import NCCForm from './Form' | |
| 78 | + import ExportBox from './ExportBox' | |
| 79 | + export default { | |
| 80 | + components: { NCCForm, ExportBox }, | |
| 81 | + data() { | |
| 82 | + return { | |
| 83 | + uploadHeaders: { | |
| 84 | + Authorization: this.$store.getters.token, | |
| 85 | + IsLogin: true, | |
| 86 | + }, | |
| 87 | + showAll: false, | |
| 88 | + query: { | |
| 89 | + date:undefined, | |
| 90 | + tittle:undefined, | |
| 91 | + content:undefined, | |
| 92 | + }, | |
| 93 | + list: [], | |
| 94 | + listLoading: true, | |
| 95 | + multipleSelection: [], total: 0, | |
| 96 | + listQuery: { | |
| 97 | + currentPage: 1, | |
| 98 | + pageSize: 20, | |
| 99 | + sort: "desc", | |
| 100 | + sidx: "", | |
| 101 | + }, | |
| 102 | + formVisible: false, | |
| 103 | + exportBoxVisible: false, | |
| 104 | + columnList: [ | |
| 105 | + { prop: 'date', label: '时间' }, | |
| 106 | + { prop: 'tittle', label: '标题' }, | |
| 107 | + { prop: 'content', label: '内容' }, | |
| 108 | + ], | |
| 109 | + } | |
| 110 | + }, | |
| 111 | + computed: {}, | |
| 112 | + created() { | |
| 113 | + this.initData() | |
| 114 | + }, | |
| 115 | + methods: { | |
| 116 | + uploadSuccess(response, file, fileList) { | |
| 117 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 118 | + this.$message({ | |
| 119 | + type: type, | |
| 120 | + message: response.msg, | |
| 121 | + }); | |
| 122 | + // this.initList(); | |
| 123 | + }, | |
| 124 | + initData() { | |
| 125 | + this.listLoading = true; | |
| 126 | + let _query = { | |
| 127 | + ...this.listQuery, | |
| 128 | + ...this.query | |
| 129 | + }; | |
| 130 | + let query = {} | |
| 131 | + for (let key in _query) { | |
| 132 | + if (Array.isArray(_query[key])) { | |
| 133 | + query[key] = _query[key].join() | |
| 134 | + } else { | |
| 135 | + query[key] = _query[key] | |
| 136 | + } | |
| 137 | + } | |
| 138 | + request({ | |
| 139 | + url: `/SubDev/BaseInternetContentSupervisionStatus`, | |
| 140 | + method: 'get', | |
| 141 | + params: query | |
| 142 | + }).then(res => { | |
| 143 | + this.list = res.data.list | |
| 144 | + this.total = res.data.pagination.total | |
| 145 | + this.listLoading = false | |
| 146 | + }) | |
| 147 | + }, | |
| 148 | + handleDel(id) { | |
| 149 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 150 | + type: 'warning' | |
| 151 | + }).then(() => { | |
| 152 | + request({ | |
| 153 | + url: `/SubDev/BaseInternetContentSupervisionStatus/${id}`, | |
| 154 | + method: 'DELETE' | |
| 155 | + }).then(res => { | |
| 156 | + this.$message({ | |
| 157 | + type: 'success', | |
| 158 | + message: res.msg, | |
| 159 | + onClose: () => { | |
| 160 | + this.initData() | |
| 161 | + } | |
| 162 | + }); | |
| 163 | + }) | |
| 164 | + }).catch(() => { | |
| 165 | + }); | |
| 166 | + }, | |
| 167 | + addOrUpdateHandle(id, isDetail) { | |
| 168 | + this.formVisible = true | |
| 169 | + this.$nextTick(() => { | |
| 170 | + this.$refs.NCCForm.init(id, isDetail) | |
| 171 | + }) | |
| 172 | + }, | |
| 173 | + exportData(type) { | |
| 174 | + let obj = {}; | |
| 175 | + if(type) { | |
| 176 | + obj = { | |
| 177 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/11', | |
| 178 | + params: {type:11}, | |
| 179 | + method: "GET", | |
| 180 | + responseType: 'blob', | |
| 181 | + } | |
| 182 | + request(obj).then((res) => { | |
| 183 | + if(type) { | |
| 184 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 185 | + const url = window.URL.createObjectURL(blob); | |
| 186 | + let link = document.createElement('a'); | |
| 187 | + link.style.display = 'none'; | |
| 188 | + link.href = url; | |
| 189 | + link.download = '互联网信息内容监管情况.xlsx'; | |
| 190 | + link.click(); | |
| 191 | + } else { | |
| 192 | + if(res.code != 200) return; | |
| 193 | + const url = define.APIURl + res.data.url; | |
| 194 | + const link = document.createElement("a"); | |
| 195 | + link.href = url; | |
| 196 | + link.download = res.data.name; | |
| 197 | + link.click(); | |
| 198 | + } | |
| 199 | + }) | |
| 200 | + } else { | |
| 201 | + this.exportBoxVisible = true | |
| 202 | + this.$nextTick(() => { | |
| 203 | + this.$refs.ExportBox.init(this.columnList) | |
| 204 | + }) | |
| 205 | + }; | |
| 206 | + | |
| 207 | + }, | |
| 208 | + // exportData() { | |
| 209 | + // this.exportBoxVisible = true | |
| 210 | + // this.$nextTick(() => { | |
| 211 | + // this.$refs.ExportBox.init(this.columnList) | |
| 212 | + // }) | |
| 213 | + // }, | |
| 214 | + download(data) { | |
| 215 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 216 | + request({ | |
| 217 | + url: `/SubDev/BaseInternetContentSupervisionStatus/Actions/Export`, | |
| 218 | + method: 'get', | |
| 219 | + params: query | |
| 220 | + }).then(res => { | |
| 221 | + if (!res.data.url) return | |
| 222 | + window.location.href = this.define.comUrl + res.data.url | |
| 223 | + this.$refs.ExportBox.visible = false | |
| 224 | + this.exportBoxVisible = false | |
| 225 | + }) | |
| 226 | + }, | |
| 227 | + search() { | |
| 228 | + this.listQuery = { | |
| 229 | + currentPage: 1, | |
| 230 | + pageSize: 20, | |
| 231 | + sort: "desc", | |
| 232 | + sidx: "", | |
| 233 | + } | |
| 234 | + this.initData() | |
| 235 | + }, | |
| 236 | + refresh(isrRefresh) { | |
| 237 | + this.formVisible = false | |
| 238 | + if (isrRefresh) this.reset() | |
| 239 | + }, | |
| 240 | + reset() { | |
| 241 | + for (let key in this.query) { | |
| 242 | + this.query[key] = undefined | |
| 243 | + } | |
| 244 | + this.listQuery = { | |
| 245 | + currentPage: 1, | |
| 246 | + pageSize: 20, | |
| 247 | + sort: "desc", | |
| 248 | + sidx: "", | |
| 249 | + } | |
| 250 | + this.initData() | |
| 251 | + } | |
| 252 | + } | |
| 253 | + } | |
| 254 | +</script> | |
| 0 | 255 | \ No newline at end of file | ... | ... |
src/views/new/baseInternetIllegalAndBadInfoReportPlatformAccept/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseInternetIllegalAndBadInfoReportPlatformAccept/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="举报类型" prop="reportType"> | |
| 13 | + <el-input v-model="dataForm.reportType" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="举报数量" prop="reportCount"> | |
| 19 | + <el-input-number v-model="dataForm.reportCount" placeholder="数字文本" :step="1" > | |
| 20 | + </el-input-number> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="有效数量" prop="validQuantity"> | |
| 25 | + <el-input-number v-model="dataForm.validQuantity" placeholder="数字文本" :step="1" > | |
| 26 | + </el-input-number> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="无效数量" prop="invalidQuantity"> | |
| 31 | + <el-input-number v-model="dataForm.invalidQuantity" placeholder="数字文本" :step="1" > | |
| 32 | + </el-input-number> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + </el-form> | |
| 36 | + </el-row> | |
| 37 | + <span slot="footer" class="dialog-footer"> | |
| 38 | + <el-button @click="visible = false">取 消</el-button> | |
| 39 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 40 | + </span> | |
| 41 | + </el-dialog> | |
| 42 | +</template> | |
| 43 | +<script> | |
| 44 | + import request from '@/utils/request' | |
| 45 | + export default { | |
| 46 | + components: {}, | |
| 47 | + props: [], | |
| 48 | + data() { | |
| 49 | + return { | |
| 50 | + loading: false, | |
| 51 | + visible: false, | |
| 52 | + isDetail: false, | |
| 53 | + dataForm: { | |
| 54 | + id:'', | |
| 55 | + date:undefined, | |
| 56 | + reportType:undefined, | |
| 57 | + reportCount:undefined, | |
| 58 | + validQuantity:undefined, | |
| 59 | + invalidQuantity:undefined, | |
| 60 | + }, | |
| 61 | + rules: { | |
| 62 | + }, | |
| 63 | + } | |
| 64 | + }, | |
| 65 | + computed: {}, | |
| 66 | + watch: {}, | |
| 67 | + created() { | |
| 68 | + }, | |
| 69 | + mounted() { | |
| 70 | + }, | |
| 71 | + methods: { | |
| 72 | + goBack() { | |
| 73 | + this.$emit('refresh') | |
| 74 | + }, | |
| 75 | + init(id, isDetail) { | |
| 76 | + this.dataForm.id = id || 0; | |
| 77 | + this.visible = true; | |
| 78 | + this.isDetail = isDetail || false; | |
| 79 | + this.$nextTick(() => { | |
| 80 | + this.$refs['elForm'].resetFields(); | |
| 81 | + if (this.dataForm.id) { | |
| 82 | + request({ | |
| 83 | + url: '/SubDev/BaseInternetIllegalAndBadInfoReportPlatformAccept/' + this.dataForm.id, | |
| 84 | + method: 'get' | |
| 85 | + }).then(res =>{ | |
| 86 | + this.dataForm = res.data; | |
| 87 | + }) | |
| 88 | + } | |
| 89 | + }) | |
| 90 | + }, | |
| 91 | + dataFormSubmit() { | |
| 92 | + this.$refs['elForm'].validate((valid) => { | |
| 93 | + if (valid) { | |
| 94 | + if (!this.dataForm.id) { | |
| 95 | + request({ | |
| 96 | + url: `/SubDev/BaseInternetIllegalAndBadInfoReportPlatformAccept`, | |
| 97 | + method: 'post', | |
| 98 | + data: this.dataForm, | |
| 99 | + }).then((res) => { | |
| 100 | + this.$message({ | |
| 101 | + message: res.msg, | |
| 102 | + type: 'success', | |
| 103 | + duration: 1000, | |
| 104 | + onClose: () => { | |
| 105 | + this.visible = false, | |
| 106 | + this.$emit('refresh', true) | |
| 107 | + } | |
| 108 | + }) | |
| 109 | + }) | |
| 110 | + } else { | |
| 111 | + request({ | |
| 112 | + url: '/SubDev/BaseInternetIllegalAndBadInfoReportPlatformAccept/' + this.dataForm.id, | |
| 113 | + method: 'PUT', | |
| 114 | + data: this.dataForm | |
| 115 | + }).then((res) => { | |
| 116 | + this.$message({ | |
| 117 | + message: res.msg, | |
| 118 | + type: 'success', | |
| 119 | + duration: 1000, | |
| 120 | + onClose: () => { | |
| 121 | + this.visible = false | |
| 122 | + this.$emit('refresh', true) | |
| 123 | + } | |
| 124 | + }) | |
| 125 | + }) | |
| 126 | + } | |
| 127 | + } | |
| 128 | + }) | |
| 129 | + }, | |
| 130 | + } | |
| 131 | + } | |
| 132 | +</script> | ... | ... |
src/views/new/baseInternetIllegalAndBadInfoReportPlatformAccept/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">成都举报平台举报受理数量</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.reportType" placeholder="举报类型" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <num-range v-model="query.reportCount"></num-range> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <num-range v-model="query.validQuantity"></num-range> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item label=""> | |
| 33 | + <num-range v-model="query.invalidQuantity"></num-range> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + </template> | |
| 37 | + <el-col :span="6"> | |
| 38 | + <el-form-item> | |
| 39 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 40 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 41 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 42 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 43 | + </el-form-item> | |
| 44 | + </el-col> | |
| 45 | + </el-form> | |
| 46 | + </el-row> | |
| 47 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 48 | + <div class="NCC-common-head"> | |
| 49 | + <div style="display: flex;"> | |
| 50 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 51 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 52 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 53 | + <div style="margin-left: 10px;"> | |
| 54 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseInternetIllegalAndBadInfoReportPlatformAccept/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 55 | + <div class="avatar-box"> | |
| 56 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 57 | + </div> | |
| 58 | + </el-upload> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + <div class="NCC-common-head-right"> | |
| 62 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 63 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 64 | + </el-tooltip> | |
| 65 | + <screenfull isContainer /> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 69 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 70 | + <el-table-column prop="reportType" label="举报类型" align="left" /> | |
| 71 | + <el-table-column prop="reportCount" label="举报数量" align="left" /> | |
| 72 | + <el-table-column prop="validQuantity" label="有效数量" align="left" /> | |
| 73 | + <el-table-column prop="invalidQuantity" label="无效数量" align="left" /> | |
| 74 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 75 | + <template slot-scope="scope"> | |
| 76 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 77 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 78 | + </template> | |
| 79 | + </el-table-column> | |
| 80 | + </NCC-table> | |
| 81 | + <div style="display: flex;align-items: center;justify-content: space-between;width: 100%;"> | |
| 82 | + <div style="display: flex;"> | |
| 83 | + <div class="item-title">举报数量:{{ total1.reportCount }}</div> | |
| 84 | + <div class="item-title" style="margin-left: 10px;">有效数量:{{ total1.validQuantity }}</div> | |
| 85 | + <div class="item-title" style="margin-left: 10px;">无效数量:{{ total1.invalidQuantity }}</div> | |
| 86 | + </div> | |
| 87 | + <div style="width: 50%;"> | |
| 88 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 89 | + </div> | |
| 90 | + </div> | |
| 91 | + </div> | |
| 92 | + </div> | |
| 93 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 94 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 95 | + </div> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 98 | +</template> | |
| 99 | +<script> | |
| 100 | + import request from '@/utils/request' | |
| 101 | + import NCCForm from './Form' | |
| 102 | + import ExportBox from './ExportBox' | |
| 103 | + export default { | |
| 104 | + components: { NCCForm, ExportBox }, | |
| 105 | + data() { | |
| 106 | + return { | |
| 107 | + uploadHeaders: { | |
| 108 | + Authorization: this.$store.getters.token, | |
| 109 | + IsLogin: true, | |
| 110 | + }, | |
| 111 | + showAll: false, | |
| 112 | + query: { | |
| 113 | + date:undefined, | |
| 114 | + reportType:undefined, | |
| 115 | + reportCount:undefined, | |
| 116 | + validQuantity:undefined, | |
| 117 | + invalidQuantity:undefined, | |
| 118 | + }, | |
| 119 | + list: [], | |
| 120 | + listLoading: true, | |
| 121 | + multipleSelection: [], total: 0, | |
| 122 | + listQuery: { | |
| 123 | + currentPage: 1, | |
| 124 | + pageSize: 20, | |
| 125 | + sort: "desc", | |
| 126 | + sidx: "", | |
| 127 | + }, | |
| 128 | + formVisible: false, | |
| 129 | + exportBoxVisible: false, | |
| 130 | + columnList: [ | |
| 131 | + { prop: 'date', label: '时间' }, | |
| 132 | + { prop: 'reportType', label: '举报类型' }, | |
| 133 | + { prop: 'reportCount', label: '举报数量' }, | |
| 134 | + { prop: 'validQuantity', label: '有效数量' }, | |
| 135 | + { prop: 'invalidQuantity', label: '无效数量' }, | |
| 136 | + ], | |
| 137 | + total1:0 | |
| 138 | + } | |
| 139 | + }, | |
| 140 | + computed: {}, | |
| 141 | + created() { | |
| 142 | + this.initData() | |
| 143 | + }, | |
| 144 | + methods: { | |
| 145 | + | |
| 146 | + uploadSuccess(response, file, fileList) { | |
| 147 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 148 | + this.$message({ | |
| 149 | + type: type, | |
| 150 | + message: response.msg, | |
| 151 | + }); | |
| 152 | + // this.initList(); | |
| 153 | + }, | |
| 154 | + initData() { | |
| 155 | + this.listLoading = true; | |
| 156 | + let _query = { | |
| 157 | + ...this.listQuery, | |
| 158 | + ...this.query | |
| 159 | + }; | |
| 160 | + let query = {} | |
| 161 | + for (let key in _query) { | |
| 162 | + if (Array.isArray(_query[key])) { | |
| 163 | + query[key] = _query[key].join() | |
| 164 | + } else { | |
| 165 | + query[key] = _query[key] | |
| 166 | + } | |
| 167 | + } | |
| 168 | + request({ | |
| 169 | + url: `/SubDev/BaseInternetIllegalAndBadInfoReportPlatformAccept`, | |
| 170 | + method: 'get', | |
| 171 | + params: query | |
| 172 | + }).then(res => { | |
| 173 | + this.list = res.data.list | |
| 174 | + this.total = res.data.pagination.total | |
| 175 | + this.listLoading = false | |
| 176 | + }) | |
| 177 | + request({ | |
| 178 | + url: `/SubDev/BaseInternetIllegalAndBadInfoReportPlatformAccept/GetCount`, | |
| 179 | + method: 'get', | |
| 180 | + params: query | |
| 181 | + }).then(res => { | |
| 182 | + console.error(res) | |
| 183 | + this.total1 = res.data | |
| 184 | + }) | |
| 185 | + }, | |
| 186 | + handleDel(id) { | |
| 187 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 188 | + type: 'warning' | |
| 189 | + }).then(() => { | |
| 190 | + request({ | |
| 191 | + url: `/SubDev/BaseInternetIllegalAndBadInfoReportPlatformAccept/${id}`, | |
| 192 | + method: 'DELETE' | |
| 193 | + }).then(res => { | |
| 194 | + this.$message({ | |
| 195 | + type: 'success', | |
| 196 | + message: res.msg, | |
| 197 | + onClose: () => { | |
| 198 | + this.initData() | |
| 199 | + } | |
| 200 | + }); | |
| 201 | + }) | |
| 202 | + }).catch(() => { | |
| 203 | + }); | |
| 204 | + }, | |
| 205 | + addOrUpdateHandle(id, isDetail) { | |
| 206 | + this.formVisible = true | |
| 207 | + this.$nextTick(() => { | |
| 208 | + this.$refs.NCCForm.init(id, isDetail) | |
| 209 | + }) | |
| 210 | + }, | |
| 211 | + exportData(type) { | |
| 212 | + let obj = {}; | |
| 213 | + if(type) { | |
| 214 | + obj = { | |
| 215 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/16', | |
| 216 | + params: {type:16}, | |
| 217 | + method: "GET", | |
| 218 | + responseType: 'blob', | |
| 219 | + } | |
| 220 | + request(obj).then((res) => { | |
| 221 | + if(type) { | |
| 222 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 223 | + const url = window.URL.createObjectURL(blob); | |
| 224 | + let link = document.createElement('a'); | |
| 225 | + link.style.display = 'none'; | |
| 226 | + link.href = url; | |
| 227 | + link.download = '成都举报平台举报受理数量.xlsx'; | |
| 228 | + link.click(); | |
| 229 | + } else { | |
| 230 | + if(res.code != 200) return; | |
| 231 | + const url = define.APIURl + res.data.url; | |
| 232 | + const link = document.createElement("a"); | |
| 233 | + link.href = url; | |
| 234 | + link.download = res.data.name; | |
| 235 | + link.click(); | |
| 236 | + } | |
| 237 | + }) | |
| 238 | + } else { | |
| 239 | + this.exportBoxVisible = true | |
| 240 | + this.$nextTick(() => { | |
| 241 | + this.$refs.ExportBox.init(this.columnList) | |
| 242 | + }) | |
| 243 | + }; | |
| 244 | + | |
| 245 | + }, | |
| 246 | + // exportData() { | |
| 247 | + // this.exportBoxVisible = true | |
| 248 | + // this.$nextTick(() => { | |
| 249 | + // this.$refs.ExportBox.init(this.columnList) | |
| 250 | + // }) | |
| 251 | + // }, | |
| 252 | + download(data) { | |
| 253 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 254 | + request({ | |
| 255 | + url: `/SubDev/BaseInternetIllegalAndBadInfoReportPlatformAccept/Actions/Export`, | |
| 256 | + method: 'get', | |
| 257 | + params: query | |
| 258 | + }).then(res => { | |
| 259 | + if (!res.data.url) return | |
| 260 | + window.location.href = this.define.comUrl + res.data.url | |
| 261 | + this.$refs.ExportBox.visible = false | |
| 262 | + this.exportBoxVisible = false | |
| 263 | + }) | |
| 264 | + }, | |
| 265 | + search() { | |
| 266 | + this.listQuery = { | |
| 267 | + currentPage: 1, | |
| 268 | + pageSize: 20, | |
| 269 | + sort: "desc", | |
| 270 | + sidx: "", | |
| 271 | + } | |
| 272 | + this.initData() | |
| 273 | + }, | |
| 274 | + refresh(isrRefresh) { | |
| 275 | + this.formVisible = false | |
| 276 | + if (isrRefresh) this.reset() | |
| 277 | + }, | |
| 278 | + reset() { | |
| 279 | + for (let key in this.query) { | |
| 280 | + this.query[key] = undefined | |
| 281 | + } | |
| 282 | + this.listQuery = { | |
| 283 | + currentPage: 1, | |
| 284 | + pageSize: 20, | |
| 285 | + sort: "desc", | |
| 286 | + sidx: "", | |
| 287 | + } | |
| 288 | + this.initData() | |
| 289 | + } | |
| 290 | + } | |
| 291 | + } | |
| 292 | +</script> | |
| 0 | 293 | \ No newline at end of file | ... | ... |
src/views/new/baseInterviewSituation/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseInterviewSituation/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="约谈时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="属地" prop="areaId"> | |
| 13 | + <!-- <el-checkbox-group v-model="dataForm.areaId" :style='{}' > | |
| 14 | + <el-checkbox v-for="(item, index) in areaIdOptions" :key="index" :label="item.id" >{{item.fullName}}</el-checkbox> | |
| 15 | + </el-checkbox-group> --> | |
| 16 | + <el-radio-group | |
| 17 | + v-model="dataForm.areaId" | |
| 18 | + placeholder="请选择所属区县" | |
| 19 | + style="line-height: 22px" | |
| 20 | + > | |
| 21 | + <el-radio v-for="v in areaOptions" :key="v.id" :label="v.id">{{ | |
| 22 | + v.fullName | |
| 23 | + }}</el-radio> | |
| 24 | + </el-radio-group> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <el-col :span="24"> | |
| 28 | + <el-form-item label="网站平台名称" prop="systemName"> | |
| 29 | + <el-input v-model="dataForm.systemName" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 30 | + </el-input> | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + <el-col :span="24"> | |
| 34 | + <el-form-item label="类型" prop="type"> | |
| 35 | + <el-radio v-model="dataForm.type" label="执法约谈">执法约谈</el-radio> | |
| 36 | + <el-radio v-model="dataForm.type" label="行政指导谈话">行政指导谈话</el-radio> | |
| 37 | + <el-radio v-model="dataForm.type" label="其他">其他</el-radio> | |
| 38 | + <!-- <el-input v-model="dataForm.type" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 39 | + </el-input> --> | |
| 40 | + <!-- <el-checkbox v-model="checked">备选项</el-checkbox> --> | |
| 41 | + </el-form-item> | |
| 42 | + <el-form-item label="" prop="type" v-if="dataForm.type == '其他'"> | |
| 43 | + <el-input v-model="type" placeholder="请输入" clearable :style='{"width":"100%"}' ></el-input> | |
| 44 | + </el-form-item> | |
| 45 | + </el-col> | |
| 46 | + <el-col :span="24"> | |
| 47 | + <el-form-item label="链接域名" prop="connectionDomain"> | |
| 48 | + <el-input v-model="dataForm.connectionDomain" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 49 | + </el-input> | |
| 50 | + </el-form-item> | |
| 51 | + </el-col> | |
| 52 | + <el-col :span="24"> | |
| 53 | + <el-form-item label="主体名称" prop="companyName"> | |
| 54 | + <el-input v-model="dataForm.companyName" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 55 | + </el-input> | |
| 56 | + </el-form-item> | |
| 57 | + </el-col> | |
| 58 | + <el-col :span="24"> | |
| 59 | + <el-form-item label="来源" prop="source"> | |
| 60 | + <el-input v-model="dataForm.source" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 61 | + </el-input> | |
| 62 | + </el-form-item> | |
| 63 | + </el-col> | |
| 64 | + <el-col :span="24"> | |
| 65 | + <el-form-item label="问题描述" prop="problemDescription"> | |
| 66 | + <el-input v-model="dataForm.problemDescription" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 67 | + </el-input> | |
| 68 | + </el-form-item> | |
| 69 | + </el-col> | |
| 70 | + <el-col :span="24"> | |
| 71 | + <el-form-item label="整改情况" prop="rectificationSituation"> | |
| 72 | + <el-input v-model="dataForm.rectificationSituation" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 73 | + </el-input> | |
| 74 | + </el-form-item> | |
| 75 | + </el-col> | |
| 76 | + <el-col :span="24"> | |
| 77 | + <el-form-item label="复查情况" prop="recheckSituation"> | |
| 78 | + <el-input v-model="dataForm.recheckSituation" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 79 | + </el-input> | |
| 80 | + </el-form-item> | |
| 81 | + </el-col> | |
| 82 | + <el-col :span="24"> | |
| 83 | + <el-form-item label="备注" prop="remark"> | |
| 84 | + <el-input v-model="dataForm.remark" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 85 | + </el-input> | |
| 86 | + </el-form-item> | |
| 87 | + </el-col> | |
| 88 | + <el-col :span="24"> | |
| 89 | + <el-form-item label="联系人" prop="contactUser"> | |
| 90 | + <el-input v-model="dataForm.contactUser" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 91 | + </el-input> | |
| 92 | + </el-form-item> | |
| 93 | + </el-col> | |
| 94 | + </el-form> | |
| 95 | + </el-row> | |
| 96 | + <span slot="footer" class="dialog-footer"> | |
| 97 | + <el-button @click="visible = false">取 消</el-button> | |
| 98 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 99 | + </span> | |
| 100 | + </el-dialog> | |
| 101 | +</template> | |
| 102 | +<script> | |
| 103 | + import infoMixin from "@/mixins/info"; | |
| 104 | + import request from '@/utils/request' | |
| 105 | + export default { | |
| 106 | + mixins: [infoMixin], | |
| 107 | + components: {}, | |
| 108 | + props: [], | |
| 109 | + data() { | |
| 110 | + return { | |
| 111 | + type:'', | |
| 112 | + areaOptions: [], | |
| 113 | + loading: false, | |
| 114 | + visible: false, | |
| 115 | + isDetail: false, | |
| 116 | + dataForm: { | |
| 117 | + id:'', | |
| 118 | + date:undefined, | |
| 119 | + areaId:[], | |
| 120 | + systemName:undefined, | |
| 121 | + type:'', | |
| 122 | + connectionDomain:undefined, | |
| 123 | + companyName:undefined, | |
| 124 | + source:undefined, | |
| 125 | + problemDescription:undefined, | |
| 126 | + rectificationSituation:undefined, | |
| 127 | + recheckSituation:undefined, | |
| 128 | + remark:undefined, | |
| 129 | + contactUser:undefined, | |
| 130 | + }, | |
| 131 | + rules: { | |
| 132 | + }, | |
| 133 | + areaIdOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], | |
| 134 | + } | |
| 135 | + }, | |
| 136 | + computed: {}, | |
| 137 | + watch: {}, | |
| 138 | + created() { | |
| 139 | + this.initAreaTypeList(); | |
| 140 | + | |
| 141 | + }, | |
| 142 | + mounted() { | |
| 143 | + }, | |
| 144 | + methods: { | |
| 145 | + goBack() { | |
| 146 | + this.$emit('refresh') | |
| 147 | + }, | |
| 148 | + init(id, isDetail) { | |
| 149 | + this.dataForm.id = id || 0; | |
| 150 | + this.visible = true; | |
| 151 | + this.isDetail = isDetail || false; | |
| 152 | + this.$nextTick(() => { | |
| 153 | + this.$refs['elForm'].resetFields(); | |
| 154 | + if (this.dataForm.id) { | |
| 155 | + request({ | |
| 156 | + url: '/SubDev/BaseInterviewSituation/' + this.dataForm.id, | |
| 157 | + method: 'get' | |
| 158 | + }).then(res =>{ | |
| 159 | + this.dataForm = res.data; | |
| 160 | + if(this.dataForm.id && this.dataForm.type != '执法约谈' && this.dataForm.type != '行政指导谈话') { | |
| 161 | + this.type = this.dataForm.type | |
| 162 | + this.dataForm.type = '其他' | |
| 163 | + } | |
| 164 | + if(!this.dataForm.areaId)this.dataForm.areaId=[]; | |
| 165 | + }) | |
| 166 | + } | |
| 167 | + }) | |
| 168 | + }, | |
| 169 | + dataFormSubmit() { | |
| 170 | + if(this.dataForm.type == '其他') { | |
| 171 | + if(this.type) { | |
| 172 | + this.dataForm.type = this.type; | |
| 173 | + } | |
| 174 | + } | |
| 175 | + this.$refs['elForm'].validate((valid) => { | |
| 176 | + if (valid) { | |
| 177 | + if (!this.dataForm.id) { | |
| 178 | + request({ | |
| 179 | + url: `/SubDev/BaseInterviewSituation`, | |
| 180 | + method: 'post', | |
| 181 | + data: this.dataForm, | |
| 182 | + }).then((res) => { | |
| 183 | + this.$message({ | |
| 184 | + message: res.msg, | |
| 185 | + type: 'success', | |
| 186 | + duration: 1000, | |
| 187 | + onClose: () => { | |
| 188 | + this.visible = false, | |
| 189 | + this.$emit('refresh', true) | |
| 190 | + } | |
| 191 | + }) | |
| 192 | + }) | |
| 193 | + } else { | |
| 194 | + request({ | |
| 195 | + url: '/SubDev/BaseInterviewSituation/' + this.dataForm.id, | |
| 196 | + method: 'PUT', | |
| 197 | + data: this.dataForm | |
| 198 | + }).then((res) => { | |
| 199 | + this.$message({ | |
| 200 | + message: res.msg, | |
| 201 | + type: 'success', | |
| 202 | + duration: 1000, | |
| 203 | + onClose: () => { | |
| 204 | + this.visible = false | |
| 205 | + this.$emit('refresh', true) | |
| 206 | + } | |
| 207 | + }) | |
| 208 | + }) | |
| 209 | + } | |
| 210 | + } | |
| 211 | + }) | |
| 212 | + }, | |
| 213 | + } | |
| 214 | + } | |
| 215 | +</script> | ... | ... |
src/views/new/baseInterviewSituation/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">约谈情况</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-select v-model="query.areaId" placeholder="属地" > | |
| 18 | + <el-option v-for="item in areaOptions" :key="item.id" :label="item.fullName" :value="item.id"/> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + </el-col> | |
| 22 | + <el-col :span="6"> | |
| 23 | + <el-form-item label=""> | |
| 24 | + <el-input v-model="query.systemName" placeholder="网站平台名称" clearable /> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <template v-if="showAll"> | |
| 28 | + <el-col :span="6"> | |
| 29 | + <el-form-item label=""> | |
| 30 | + <el-input v-model="query.type" placeholder="类型" clearable /> | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + <el-col :span="6"> | |
| 34 | + <el-form-item label=""> | |
| 35 | + <el-input v-model="query.connectionDomain" placeholder="链接域名" clearable /> | |
| 36 | + </el-form-item> | |
| 37 | + </el-col> | |
| 38 | + <el-col :span="6"> | |
| 39 | + <el-form-item label=""> | |
| 40 | + <el-input v-model="query.companyName" placeholder="主体名称" clearable /> | |
| 41 | + </el-form-item> | |
| 42 | + </el-col> | |
| 43 | + <el-col :span="6"> | |
| 44 | + <el-form-item label=""> | |
| 45 | + <el-input v-model="query.source" placeholder="来源" clearable /> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="6"> | |
| 49 | + <el-form-item label=""> | |
| 50 | + <el-input v-model="query.problemDescription" placeholder="问题描述" /> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + <el-col :span="6"> | |
| 54 | + <el-form-item label=""> | |
| 55 | + <el-input v-model="query.rectificationSituation" placeholder="整改情况" /> | |
| 56 | + </el-form-item> | |
| 57 | + </el-col> | |
| 58 | + <el-col :span="6"> | |
| 59 | + <el-form-item label=""> | |
| 60 | + <el-input v-model="query.recheckSituation" placeholder="复查情况" /> | |
| 61 | + </el-form-item> | |
| 62 | + </el-col> | |
| 63 | + <el-col :span="6"> | |
| 64 | + <el-form-item label=""> | |
| 65 | + <el-input v-model="query.remark" placeholder="备注" /> | |
| 66 | + </el-form-item> | |
| 67 | + </el-col> | |
| 68 | + <el-col :span="6"> | |
| 69 | + <el-form-item label=""> | |
| 70 | + <el-input v-model="query.contactUser" placeholder="联系人" clearable /> | |
| 71 | + </el-form-item> | |
| 72 | + </el-col> | |
| 73 | + </template> | |
| 74 | + <el-col :span="6"> | |
| 75 | + <el-form-item> | |
| 76 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 77 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 78 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 79 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 80 | + </el-form-item> | |
| 81 | + </el-col> | |
| 82 | + </el-form> | |
| 83 | + </el-row> | |
| 84 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 85 | + <div class="NCC-common-head"> | |
| 86 | + <div style="display: flex;"> | |
| 87 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 88 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 89 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 90 | + <div style="margin-left: 10px;"> | |
| 91 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseInterviewSituation/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 92 | + <div class="avatar-box"> | |
| 93 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 94 | + </div> | |
| 95 | + </el-upload> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 98 | + <div class="NCC-common-head-right"> | |
| 99 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 100 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 101 | + </el-tooltip> | |
| 102 | + <screenfull isContainer /> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 106 | + <el-table-column prop="date" label="约谈时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 107 | + <el-table-column label="属地" prop="areaId" align="left"> | |
| 108 | + <template slot-scope="scope">{{dynamicTextnew(scope.row.areaId,areaOptions)}}</template> | |
| 109 | + <!-- <template slot-scope="scope">{{ scope.row.areaId | dynamicText(areaIdOptions) }}</template> --> | |
| 110 | + </el-table-column> | |
| 111 | + <el-table-column prop="systemName" label="网站平台名称" align="left" /> | |
| 112 | + <el-table-column prop="type" label="类型" align="left" /> | |
| 113 | + <el-table-column prop="connectionDomain" label="链接域名" align="left" /> | |
| 114 | + <el-table-column prop="companyName" label="主体名称" align="left" /> | |
| 115 | + <el-table-column prop="source" label="来源" align="left" /> | |
| 116 | + <el-table-column prop="problemDescription" label="问题描述" align="left" /> | |
| 117 | + <el-table-column prop="rectificationSituation" label="整改情况" align="left" /> | |
| 118 | + <el-table-column prop="recheckSituation" label="复查情况" align="left" /> | |
| 119 | + <el-table-column prop="remark" label="备注" align="left" /> | |
| 120 | + <el-table-column prop="contactUser" label="联系人" align="left" /> | |
| 121 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 122 | + <template slot-scope="scope"> | |
| 123 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 124 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 125 | + </template> | |
| 126 | + </el-table-column> | |
| 127 | + </NCC-table> | |
| 128 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 129 | + </div> | |
| 130 | + </div> | |
| 131 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 132 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 133 | + </div> | |
| 134 | + </div> | |
| 135 | + </div> | |
| 136 | +</template> | |
| 137 | +<script> | |
| 138 | +import infoMixin from "@/mixins/info"; | |
| 139 | + import request from '@/utils/request' | |
| 140 | + import NCCForm from './Form' | |
| 141 | + import ExportBox from './ExportBox' | |
| 142 | + export default { | |
| 143 | + mixins: [infoMixin], | |
| 144 | + components: { NCCForm, ExportBox }, | |
| 145 | + data() { | |
| 146 | + return { | |
| 147 | + uploadHeaders: { | |
| 148 | + Authorization: this.$store.getters.token, | |
| 149 | + IsLogin: true, | |
| 150 | + }, | |
| 151 | + areaOptions: [], | |
| 152 | + showAll: false, | |
| 153 | + query: { | |
| 154 | + date:undefined, | |
| 155 | + areaId:undefined, | |
| 156 | + systemName:undefined, | |
| 157 | + type:undefined, | |
| 158 | + connectionDomain:undefined, | |
| 159 | + companyName:undefined, | |
| 160 | + source:undefined, | |
| 161 | + problemDescription:undefined, | |
| 162 | + rectificationSituation:undefined, | |
| 163 | + recheckSituation:undefined, | |
| 164 | + remark:undefined, | |
| 165 | + contactUser:undefined, | |
| 166 | + }, | |
| 167 | + list: [], | |
| 168 | + listLoading: true, | |
| 169 | + multipleSelection: [], total: 0, | |
| 170 | + listQuery: { | |
| 171 | + currentPage: 1, | |
| 172 | + pageSize: 20, | |
| 173 | + sort: "desc", | |
| 174 | + sidx: "", | |
| 175 | + }, | |
| 176 | + formVisible: false, | |
| 177 | + exportBoxVisible: false, | |
| 178 | + columnList: [ | |
| 179 | + { prop: 'date', label: '约谈时间' }, | |
| 180 | + { prop: 'areaId', label: '属地' }, | |
| 181 | + { prop: 'systemName', label: '网站平台名称' }, | |
| 182 | + { prop: 'type', label: '类型' }, | |
| 183 | + { prop: 'connectionDomain', label: '链接域名' }, | |
| 184 | + { prop: 'companyName', label: '主体名称' }, | |
| 185 | + { prop: 'source', label: '来源' }, | |
| 186 | + { prop: 'problemDescription', label: '问题描述' }, | |
| 187 | + { prop: 'rectificationSituation', label: '整改情况' }, | |
| 188 | + { prop: 'recheckSituation', label: '复查情况' }, | |
| 189 | + { prop: 'remark', label: '备注' }, | |
| 190 | + { prop: 'contactUser', label: '联系人' }, | |
| 191 | + ], | |
| 192 | + areaIdOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], | |
| 193 | + } | |
| 194 | + }, | |
| 195 | + computed: {}, | |
| 196 | + created() { | |
| 197 | + this.initAreaTypeList(); | |
| 198 | + this.initData() | |
| 199 | + }, | |
| 200 | + methods: { | |
| 201 | + uploadSuccess(response, file, fileList) { | |
| 202 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 203 | + this.$message({ | |
| 204 | + type: type, | |
| 205 | + message: response.msg, | |
| 206 | + }); | |
| 207 | + // this.initList(); | |
| 208 | + }, | |
| 209 | + dynamicTextnew(value, options) { | |
| 210 | + if (!value) return '' | |
| 211 | + if (Array.isArray(value)) { | |
| 212 | + if (!options || !Array.isArray(options)) return value.join() | |
| 213 | + let textList = [] | |
| 214 | + for (let i = 0; i < value.length; i++) { | |
| 215 | + let item = options.filter(o => o.id == value[i])[0] | |
| 216 | + if (!item || !item.fullName) { | |
| 217 | + textList.push(value[i]) | |
| 218 | + } else { | |
| 219 | + textList.push(item.fullName) | |
| 220 | + } | |
| 221 | + } | |
| 222 | + return textList.join() | |
| 223 | + } | |
| 224 | + if (!options || !Array.isArray(options)) return value | |
| 225 | + let item = options.filter(o => o.id == value)[0] | |
| 226 | + if (!item || !item.fullName) return value | |
| 227 | + return item.fullName | |
| 228 | + }, | |
| 229 | + initData() { | |
| 230 | + this.listLoading = true; | |
| 231 | + let _query = { | |
| 232 | + ...this.listQuery, | |
| 233 | + ...this.query | |
| 234 | + }; | |
| 235 | + let query = {} | |
| 236 | + for (let key in _query) { | |
| 237 | + if (Array.isArray(_query[key])) { | |
| 238 | + query[key] = _query[key].join() | |
| 239 | + } else { | |
| 240 | + query[key] = _query[key] | |
| 241 | + } | |
| 242 | + } | |
| 243 | + console.error(query) | |
| 244 | + request({ | |
| 245 | + url: `/SubDev/BaseInterviewSituation`, | |
| 246 | + method: 'get', | |
| 247 | + params: query | |
| 248 | + }).then(res => { | |
| 249 | + this.list = res.data.list | |
| 250 | + this.total = res.data.pagination.total | |
| 251 | + this.listLoading = false | |
| 252 | + }) | |
| 253 | + }, | |
| 254 | + handleDel(id) { | |
| 255 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 256 | + type: 'warning' | |
| 257 | + }).then(() => { | |
| 258 | + request({ | |
| 259 | + url: `/SubDev/BaseInterviewSituation/${id}`, | |
| 260 | + method: 'DELETE' | |
| 261 | + }).then(res => { | |
| 262 | + this.$message({ | |
| 263 | + type: 'success', | |
| 264 | + message: res.msg, | |
| 265 | + onClose: () => { | |
| 266 | + this.initData() | |
| 267 | + } | |
| 268 | + }); | |
| 269 | + }) | |
| 270 | + }).catch(() => { | |
| 271 | + }); | |
| 272 | + }, | |
| 273 | + addOrUpdateHandle(id, isDetail) { | |
| 274 | + this.formVisible = true | |
| 275 | + this.$nextTick(() => { | |
| 276 | + this.$refs.NCCForm.init(id, isDetail) | |
| 277 | + }) | |
| 278 | + }, | |
| 279 | + exportData(type) { | |
| 280 | + let obj = {}; | |
| 281 | + if(type) { | |
| 282 | + obj = { | |
| 283 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/12', | |
| 284 | + params: {type:12}, | |
| 285 | + method: "GET", | |
| 286 | + responseType: 'blob', | |
| 287 | + } | |
| 288 | + request(obj).then((res) => { | |
| 289 | + if(type) { | |
| 290 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 291 | + const url = window.URL.createObjectURL(blob); | |
| 292 | + let link = document.createElement('a'); | |
| 293 | + link.style.display = 'none'; | |
| 294 | + link.href = url; | |
| 295 | + link.download = '约谈情况.xlsx'; | |
| 296 | + link.click(); | |
| 297 | + } else { | |
| 298 | + if(res.code != 200) return; | |
| 299 | + const url = define.APIURl + res.data.url; | |
| 300 | + const link = document.createElement("a"); | |
| 301 | + link.href = url; | |
| 302 | + link.download = res.data.name; | |
| 303 | + link.click(); | |
| 304 | + } | |
| 305 | + }) | |
| 306 | + } else { | |
| 307 | + this.exportBoxVisible = true | |
| 308 | + this.$nextTick(() => { | |
| 309 | + this.$refs.ExportBox.init(this.columnList) | |
| 310 | + }) | |
| 311 | + }; | |
| 312 | + | |
| 313 | + }, | |
| 314 | + // exportData() { | |
| 315 | + // this.exportBoxVisible = true | |
| 316 | + // this.$nextTick(() => { | |
| 317 | + // this.$refs.ExportBox.init(this.columnList) | |
| 318 | + // }) | |
| 319 | + // }, | |
| 320 | + download(data) { | |
| 321 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 322 | + request({ | |
| 323 | + url: `/SubDev/BaseInterviewSituation/Actions/Export`, | |
| 324 | + method: 'get', | |
| 325 | + params: query | |
| 326 | + }).then(res => { | |
| 327 | + if (!res.data.url) return | |
| 328 | + window.location.href = this.define.comUrl + res.data.url | |
| 329 | + this.$refs.ExportBox.visible = false | |
| 330 | + this.exportBoxVisible = false | |
| 331 | + }) | |
| 332 | + }, | |
| 333 | + search() { | |
| 334 | + this.listQuery = { | |
| 335 | + currentPage: 1, | |
| 336 | + pageSize: 20, | |
| 337 | + sort: "desc", | |
| 338 | + sidx: "", | |
| 339 | + } | |
| 340 | + this.initData() | |
| 341 | + }, | |
| 342 | + refresh(isrRefresh) { | |
| 343 | + this.formVisible = false | |
| 344 | + if (isrRefresh) this.reset() | |
| 345 | + }, | |
| 346 | + reset() { | |
| 347 | + for (let key in this.query) { | |
| 348 | + this.query[key] = undefined | |
| 349 | + } | |
| 350 | + this.listQuery = { | |
| 351 | + currentPage: 1, | |
| 352 | + pageSize: 20, | |
| 353 | + sort: "desc", | |
| 354 | + sidx: "", | |
| 355 | + } | |
| 356 | + this.initData() | |
| 357 | + } | |
| 358 | + } | |
| 359 | + } | |
| 360 | +</script> | |
| 0 | 361 | \ No newline at end of file | ... | ... |
src/views/new/baseLocalKeyWebsiteReportAcceptanceStatus/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseLocalKeyWebsiteReportAcceptanceStatus/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="区县" prop="areaId"> | |
| 13 | + <el-radio-group | |
| 14 | + v-model="dataForm.areaId" | |
| 15 | + placeholder="请选择所属区县" | |
| 16 | + style="line-height: 22px" | |
| 17 | + > | |
| 18 | + <el-radio v-for="v in areaOptions" :key="v.id" :label="v.id">{{ | |
| 19 | + v.fullName | |
| 20 | + }}</el-radio> | |
| 21 | + </el-radio-group> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <el-col :span="24"> | |
| 25 | + <el-form-item label="分类" prop="localKeyWebsiteClass"> | |
| 26 | + <el-input v-model="dataForm.localKeyWebsiteClass" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 27 | + </el-input> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + <el-col :span="24"> | |
| 31 | + <el-form-item label="受理数量" prop="acceptanceQuantity"> | |
| 32 | + <el-input-number v-model="dataForm.acceptanceQuantity" placeholder="数字文本" :step="1" > | |
| 33 | + </el-input-number> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + </el-form> | |
| 37 | + </el-row> | |
| 38 | + <span slot="footer" class="dialog-footer"> | |
| 39 | + <el-button @click="visible = false">取 消</el-button> | |
| 40 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 41 | + </span> | |
| 42 | + </el-dialog> | |
| 43 | +</template> | |
| 44 | +<script> | |
| 45 | + import infoMixin from "@/mixins/info"; | |
| 46 | + import request from '@/utils/request' | |
| 47 | + export default { | |
| 48 | + mixins: [infoMixin], | |
| 49 | + components: {}, | |
| 50 | + props: [], | |
| 51 | + data() { | |
| 52 | + return { | |
| 53 | + loading: false, | |
| 54 | + visible: false, | |
| 55 | + isDetail: false, | |
| 56 | + dataForm: { | |
| 57 | + id:'', | |
| 58 | + date:undefined, | |
| 59 | + areaId:[], | |
| 60 | + localKeyWebsiteClass:undefined, | |
| 61 | + acceptanceQuantity:undefined, | |
| 62 | + }, | |
| 63 | + rules: { | |
| 64 | + }, | |
| 65 | + areaOptions: [], | |
| 66 | + areaIdOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], | |
| 67 | + } | |
| 68 | + }, | |
| 69 | + computed: {}, | |
| 70 | + watch: {}, | |
| 71 | + created() { | |
| 72 | + this.initAreaTypeList(); | |
| 73 | + }, | |
| 74 | + mounted() { | |
| 75 | + }, | |
| 76 | + methods: { | |
| 77 | + goBack() { | |
| 78 | + this.$emit('refresh') | |
| 79 | + }, | |
| 80 | + init(id, isDetail) { | |
| 81 | + this.dataForm.id = id || 0; | |
| 82 | + this.visible = true; | |
| 83 | + this.isDetail = isDetail || false; | |
| 84 | + this.$nextTick(() => { | |
| 85 | + this.$refs['elForm'].resetFields(); | |
| 86 | + if (this.dataForm.id) { | |
| 87 | + request({ | |
| 88 | + url: '/SubDev/BaseLocalKeyWebsiteReportAcceptanceStatus/' + this.dataForm.id, | |
| 89 | + method: 'get' | |
| 90 | + }).then(res =>{ | |
| 91 | + this.dataForm = res.data; | |
| 92 | + if(!this.dataForm.areaId)this.dataForm.areaId=[]; | |
| 93 | + }) | |
| 94 | + } | |
| 95 | + }) | |
| 96 | + }, | |
| 97 | + dataFormSubmit() { | |
| 98 | + this.$refs['elForm'].validate((valid) => { | |
| 99 | + if (valid) { | |
| 100 | + if (!this.dataForm.id) { | |
| 101 | + request({ | |
| 102 | + url: `/SubDev/BaseLocalKeyWebsiteReportAcceptanceStatus`, | |
| 103 | + method: 'post', | |
| 104 | + data: this.dataForm, | |
| 105 | + }).then((res) => { | |
| 106 | + this.$message({ | |
| 107 | + message: res.msg, | |
| 108 | + type: 'success', | |
| 109 | + duration: 1000, | |
| 110 | + onClose: () => { | |
| 111 | + this.visible = false, | |
| 112 | + this.$emit('refresh', true) | |
| 113 | + } | |
| 114 | + }) | |
| 115 | + }) | |
| 116 | + } else { | |
| 117 | + request({ | |
| 118 | + url: '/SubDev/BaseLocalKeyWebsiteReportAcceptanceStatus/' + this.dataForm.id, | |
| 119 | + method: 'PUT', | |
| 120 | + data: this.dataForm | |
| 121 | + }).then((res) => { | |
| 122 | + this.$message({ | |
| 123 | + message: res.msg, | |
| 124 | + type: 'success', | |
| 125 | + duration: 1000, | |
| 126 | + onClose: () => { | |
| 127 | + this.visible = false | |
| 128 | + this.$emit('refresh', true) | |
| 129 | + } | |
| 130 | + }) | |
| 131 | + }) | |
| 132 | + } | |
| 133 | + } | |
| 134 | + }) | |
| 135 | + }, | |
| 136 | + } | |
| 137 | + } | |
| 138 | +</script> | ... | ... |
src/views/new/baseLocalKeyWebsiteReportAcceptanceStatus/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">属地重点网站举报受理情况</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-select v-model="query.areaId" placeholder="区县" > | |
| 18 | + <el-option v-for="item in areaOptions" :key="item.id" :label="item.fullName" :value="item.id"/> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + </el-col> | |
| 22 | + <el-col :span="6"> | |
| 23 | + <el-form-item label=""> | |
| 24 | + <el-input v-model="query.class" placeholder="分类" clearable /> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <template v-if="showAll"> | |
| 28 | + <el-col :span="6"> | |
| 29 | + <el-form-item label=""> | |
| 30 | + <num-range v-model="query.acceptanceQuantity"></num-range> | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + </template> | |
| 34 | + <el-col :span="6"> | |
| 35 | + <el-form-item> | |
| 36 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 37 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 38 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 39 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 40 | + </el-form-item> | |
| 41 | + </el-col> | |
| 42 | + </el-form> | |
| 43 | + </el-row> | |
| 44 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 45 | + <div class="NCC-common-head"> | |
| 46 | + <div style="display: flex;"> | |
| 47 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 48 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 49 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 50 | + <div style="margin-left: 10px;"> | |
| 51 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseLocalKeyWebsiteReportAcceptanceStatus/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 52 | + <div class="avatar-box"> | |
| 53 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 54 | + </div> | |
| 55 | + </el-upload> | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + <div class="NCC-common-head-right"> | |
| 59 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 60 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 61 | + </el-tooltip> | |
| 62 | + <screenfull isContainer /> | |
| 63 | + </div> | |
| 64 | + </div> | |
| 65 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 66 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 67 | + <el-table-column label="区县" prop="areaId" align="left"> | |
| 68 | + <template slot-scope="scope">{{dynamicTextnew(scope.row.areaId,areaOptions)}}</template> | |
| 69 | + </el-table-column> | |
| 70 | + <el-table-column prop="localKeyWebsiteClass" label="分类" align="left" /> | |
| 71 | + <el-table-column prop="acceptanceQuantity" label="受理数量" align="left" /> | |
| 72 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 73 | + <template slot-scope="scope"> | |
| 74 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 75 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 76 | + </template> | |
| 77 | + </el-table-column> | |
| 78 | + </NCC-table> | |
| 79 | + <div style="display: flex;align-items: center;justify-content: space-between;width: 100%;"> | |
| 80 | + <div style="display: flex;"> | |
| 81 | + <div class="item-title">受理统计:{{ total1 }}</div> | |
| 82 | + </div> | |
| 83 | + <div style="width: 50%;"> | |
| 84 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + | |
| 88 | + </div> | |
| 89 | + </div> | |
| 90 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 91 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 92 | + </div> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | +</template> | |
| 96 | +<script> | |
| 97 | +import infoMixin from "@/mixins/info"; | |
| 98 | + import request from '@/utils/request' | |
| 99 | + import NCCForm from './Form' | |
| 100 | + import ExportBox from './ExportBox' | |
| 101 | + export default { | |
| 102 | + mixins: [infoMixin], | |
| 103 | + components: { NCCForm, ExportBox }, | |
| 104 | + data() { | |
| 105 | + return { | |
| 106 | + uploadHeaders: { | |
| 107 | + Authorization: this.$store.getters.token, | |
| 108 | + IsLogin: true, | |
| 109 | + }, | |
| 110 | + showAll: false, | |
| 111 | + query: { | |
| 112 | + date:undefined, | |
| 113 | + areaId:undefined, | |
| 114 | + class:undefined, | |
| 115 | + acceptanceQuantity:undefined, | |
| 116 | + }, | |
| 117 | + areaOptions: [], | |
| 118 | + list: [], | |
| 119 | + listLoading: true, | |
| 120 | + multipleSelection: [], total: 0, | |
| 121 | + listQuery: { | |
| 122 | + currentPage: 1, | |
| 123 | + pageSize: 20, | |
| 124 | + sort: "desc", | |
| 125 | + sidx: "", | |
| 126 | + }, | |
| 127 | + formVisible: false, | |
| 128 | + exportBoxVisible: false, | |
| 129 | + columnList: [ | |
| 130 | + { prop: 'date', label: '时间' }, | |
| 131 | + { prop: 'areaId', label: '区县' }, | |
| 132 | + { prop: 'class', label: '分类' }, | |
| 133 | + { prop: 'acceptanceQuantity', label: '受理数量' }, | |
| 134 | + ], | |
| 135 | + total1:0, | |
| 136 | + total2:0, | |
| 137 | + // areaIdOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], | |
| 138 | + } | |
| 139 | + }, | |
| 140 | + computed: {}, | |
| 141 | + created() { | |
| 142 | + this.initAreaTypeList(); | |
| 143 | + this.initData() | |
| 144 | + }, | |
| 145 | + methods: { | |
| 146 | + uploadSuccess(response, file, fileList) { | |
| 147 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 148 | + this.$message({ | |
| 149 | + type: type, | |
| 150 | + message: response.msg, | |
| 151 | + }); | |
| 152 | + // this.initList(); | |
| 153 | + }, | |
| 154 | + dynamicTextnew(value, options) { | |
| 155 | + if (!value) return '' | |
| 156 | + if (Array.isArray(value)) { | |
| 157 | + if (!options || !Array.isArray(options)) return value.join() | |
| 158 | + let textList = [] | |
| 159 | + for (let i = 0; i < value.length; i++) { | |
| 160 | + let item = options.filter(o => o.id == value[i])[0] | |
| 161 | + if (!item || !item.fullName) { | |
| 162 | + textList.push(value[i]) | |
| 163 | + } else { | |
| 164 | + textList.push(item.fullName) | |
| 165 | + } | |
| 166 | + } | |
| 167 | + return textList.join() | |
| 168 | + } | |
| 169 | + if (!options || !Array.isArray(options)) return value | |
| 170 | + let item = options.filter(o => o.id == value)[0] | |
| 171 | + if (!item || !item.fullName) return value | |
| 172 | + return item.fullName | |
| 173 | + }, | |
| 174 | + initData() { | |
| 175 | + this.listLoading = true; | |
| 176 | + let _query = { | |
| 177 | + ...this.listQuery, | |
| 178 | + ...this.query | |
| 179 | + }; | |
| 180 | + let query = {} | |
| 181 | + for (let key in _query) { | |
| 182 | + if (Array.isArray(_query[key])) { | |
| 183 | + query[key] = _query[key].join() | |
| 184 | + } else { | |
| 185 | + query[key] = _query[key] | |
| 186 | + } | |
| 187 | + } | |
| 188 | + request({ | |
| 189 | + url: `/SubDev/BaseLocalKeyWebsiteReportAcceptanceStatus`, | |
| 190 | + method: 'get', | |
| 191 | + params: query | |
| 192 | + }).then(res => { | |
| 193 | + this.list = res.data.list | |
| 194 | + this.total = res.data.pagination.total | |
| 195 | + this.listLoading = false | |
| 196 | + }) | |
| 197 | + request({ | |
| 198 | + url: `/SubDev/BaseLocalKeyWebsiteReportAcceptanceStatus/GetCount`, | |
| 199 | + method: 'get', | |
| 200 | + params: query | |
| 201 | + }).then(res => { | |
| 202 | + console.error(res) | |
| 203 | + this.total1 = res.data | |
| 204 | + }) | |
| 205 | + | |
| 206 | + }, | |
| 207 | + handleDel(id) { | |
| 208 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 209 | + type: 'warning' | |
| 210 | + }).then(() => { | |
| 211 | + request({ | |
| 212 | + url: `/SubDev/BaseLocalKeyWebsiteReportAcceptanceStatus/${id}`, | |
| 213 | + method: 'DELETE' | |
| 214 | + }).then(res => { | |
| 215 | + this.$message({ | |
| 216 | + type: 'success', | |
| 217 | + message: res.msg, | |
| 218 | + onClose: () => { | |
| 219 | + this.initData() | |
| 220 | + } | |
| 221 | + }); | |
| 222 | + }) | |
| 223 | + }).catch(() => { | |
| 224 | + }); | |
| 225 | + }, | |
| 226 | + addOrUpdateHandle(id, isDetail) { | |
| 227 | + this.formVisible = true | |
| 228 | + this.$nextTick(() => { | |
| 229 | + this.$refs.NCCForm.init(id, isDetail) | |
| 230 | + }) | |
| 231 | + }, | |
| 232 | + exportData(type) { | |
| 233 | + let obj = {}; | |
| 234 | + if(type) { | |
| 235 | + obj = { | |
| 236 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/15', | |
| 237 | + params: {type:15}, | |
| 238 | + method: "GET", | |
| 239 | + responseType: 'blob', | |
| 240 | + } | |
| 241 | + request(obj).then((res) => { | |
| 242 | + if(type) { | |
| 243 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 244 | + const url = window.URL.createObjectURL(blob); | |
| 245 | + let link = document.createElement('a'); | |
| 246 | + link.style.display = 'none'; | |
| 247 | + link.href = url; | |
| 248 | + link.download = '属地重点网站举报受理情况.xlsx'; | |
| 249 | + link.click(); | |
| 250 | + } else { | |
| 251 | + if(res.code != 200) return; | |
| 252 | + const url = define.APIURl + res.data.url; | |
| 253 | + const link = document.createElement("a"); | |
| 254 | + link.href = url; | |
| 255 | + link.download = res.data.name; | |
| 256 | + link.click(); | |
| 257 | + } | |
| 258 | + }) | |
| 259 | + } else { | |
| 260 | + this.exportBoxVisible = true | |
| 261 | + this.$nextTick(() => { | |
| 262 | + this.$refs.ExportBox.init(this.columnList) | |
| 263 | + }) | |
| 264 | + }; | |
| 265 | + | |
| 266 | + }, | |
| 267 | + | |
| 268 | + // exportData() { | |
| 269 | + // this.exportBoxVisible = true | |
| 270 | + // this.$nextTick(() => { | |
| 271 | + // this.$refs.ExportBox.init(this.columnList) | |
| 272 | + // }) | |
| 273 | + // }, | |
| 274 | + download(data) { | |
| 275 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 276 | + request({ | |
| 277 | + url: `/SubDev/BaseLocalKeyWebsiteReportAcceptanceStatus/Actions/Export`, | |
| 278 | + method: 'get', | |
| 279 | + params: query | |
| 280 | + }).then(res => { | |
| 281 | + if (!res.data.url) return | |
| 282 | + window.location.href = this.define.comUrl + res.data.url | |
| 283 | + this.$refs.ExportBox.visible = false | |
| 284 | + this.exportBoxVisible = false | |
| 285 | + }) | |
| 286 | + }, | |
| 287 | + search() { | |
| 288 | + this.listQuery = { | |
| 289 | + currentPage: 1, | |
| 290 | + pageSize: 20, | |
| 291 | + sort: "desc", | |
| 292 | + sidx: "", | |
| 293 | + } | |
| 294 | + this.initData() | |
| 295 | + }, | |
| 296 | + refresh(isrRefresh) { | |
| 297 | + this.formVisible = false | |
| 298 | + if (isrRefresh) this.reset() | |
| 299 | + }, | |
| 300 | + reset() { | |
| 301 | + for (let key in this.query) { | |
| 302 | + this.query[key] = undefined | |
| 303 | + } | |
| 304 | + this.listQuery = { | |
| 305 | + currentPage: 1, | |
| 306 | + pageSize: 20, | |
| 307 | + sort: "desc", | |
| 308 | + sidx: "", | |
| 309 | + } | |
| 310 | + this.initData() | |
| 311 | + } | |
| 312 | + } | |
| 313 | + } | |
| 314 | +</script> | |
| 0 | 315 | \ No newline at end of file | ... | ... |
src/views/new/baseLocalKeyWebsiteValidReportClassificationStati/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseLocalKeyWebsiteValidReportClassificationStati/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="区县" prop="areaId"> | |
| 13 | + <!-- <el-checkbox-group v-model="dataForm.areaId" :style='{}' > | |
| 14 | + <el-checkbox v-for="(item, index) in areaIdOptions" :key="index" :label="item.id" >{{item.fullName}}</el-checkbox> | |
| 15 | + </el-checkbox-group> --> | |
| 16 | + <el-radio-group | |
| 17 | + v-model="dataForm.areaId" | |
| 18 | + placeholder="请选择所属区县" | |
| 19 | + style="line-height: 22px" | |
| 20 | + > | |
| 21 | + <el-radio v-for="v in areaOptions" :key="v.id" :label="v.id">{{ | |
| 22 | + v.fullName | |
| 23 | + }}</el-radio> | |
| 24 | + </el-radio-group> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <el-col :span="24"> | |
| 28 | + <el-form-item label="分类" prop="localKeyWebsiteClass"> | |
| 29 | + <el-select v-model="dataForm.localKeyWebsiteClass" placeholder="请选择" style="width: 100%;" > | |
| 30 | + <el-option label="政治类" value="政治类"></el-option> | |
| 31 | + <el-option label="暴恐类" value="暴恐类"></el-option> | |
| 32 | + <el-option label="谣言类" value="谣言类"></el-option> | |
| 33 | + <el-option label="色情类" value="色情类"></el-option> | |
| 34 | + <el-option label="低俗类" value="低俗类"></el-option> | |
| 35 | + <el-option label="赌博类" value="赌博类"></el-option> | |
| 36 | + <el-option label="诈骗类" value="诈骗类"></el-option> | |
| 37 | + <el-option label="侵权类" value="侵权类"></el-option> | |
| 38 | + <el-option label="其他" value="其他"></el-option> | |
| 39 | + </el-select> | |
| 40 | + <!-- <el-input v-model="dataForm.class" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 41 | + </el-input> --> | |
| 42 | + </el-form-item> | |
| 43 | + </el-col> | |
| 44 | + <el-col :span="24"> | |
| 45 | + <el-form-item label="有效受理数量" prop="validAcceptanceQuantity"> | |
| 46 | + <el-input-number v-model="dataForm.validAcceptanceQuantity" placeholder="数字文本" :step="1" > | |
| 47 | + </el-input-number> | |
| 48 | + </el-form-item> | |
| 49 | + </el-col> | |
| 50 | + </el-form> | |
| 51 | + </el-row> | |
| 52 | + <span slot="footer" class="dialog-footer"> | |
| 53 | + <el-button @click="visible = false">取 消</el-button> | |
| 54 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 55 | + </span> | |
| 56 | + </el-dialog> | |
| 57 | +</template> | |
| 58 | +<script> | |
| 59 | + import infoMixin from "@/mixins/info"; | |
| 60 | + import request from '@/utils/request' | |
| 61 | + export default { | |
| 62 | + mixins: [infoMixin], | |
| 63 | + components: {}, | |
| 64 | + props: [], | |
| 65 | + data() { | |
| 66 | + return { | |
| 67 | + loading: false, | |
| 68 | + visible: false, | |
| 69 | + isDetail: false, | |
| 70 | + dataForm: { | |
| 71 | + id:'', | |
| 72 | + date:undefined, | |
| 73 | + areaId:[], | |
| 74 | + localKeyWebsiteClass:undefined, | |
| 75 | + validAcceptanceQuantity:undefined, | |
| 76 | + }, | |
| 77 | + rules: { | |
| 78 | + }, | |
| 79 | + areaIdOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], | |
| 80 | + } | |
| 81 | + }, | |
| 82 | + computed: {}, | |
| 83 | + watch: {}, | |
| 84 | + created() { | |
| 85 | + this.initAreaTypeList(); | |
| 86 | + }, | |
| 87 | + mounted() { | |
| 88 | + }, | |
| 89 | + methods: { | |
| 90 | + goBack() { | |
| 91 | + this.$emit('refresh') | |
| 92 | + }, | |
| 93 | + init(id, isDetail) { | |
| 94 | + this.dataForm.id = id || 0; | |
| 95 | + this.visible = true; | |
| 96 | + this.isDetail = isDetail || false; | |
| 97 | + this.$nextTick(() => { | |
| 98 | + this.$refs['elForm'].resetFields(); | |
| 99 | + if (this.dataForm.id) { | |
| 100 | + request({ | |
| 101 | + url: '/SubDev/BaseLocalKeyWebsiteValidReportClassificationStati/' + this.dataForm.id, | |
| 102 | + method: 'get' | |
| 103 | + }).then(res =>{ | |
| 104 | + this.dataForm = res.data; | |
| 105 | + if(!this.dataForm.areaId)this.dataForm.areaId=[]; | |
| 106 | + }) | |
| 107 | + } | |
| 108 | + }) | |
| 109 | + }, | |
| 110 | + dataFormSubmit() { | |
| 111 | + this.$refs['elForm'].validate((valid) => { | |
| 112 | + if (valid) { | |
| 113 | + if (!this.dataForm.id) { | |
| 114 | + request({ | |
| 115 | + url: `/SubDev/BaseLocalKeyWebsiteValidReportClassificationStati`, | |
| 116 | + method: 'post', | |
| 117 | + data: this.dataForm, | |
| 118 | + }).then((res) => { | |
| 119 | + this.$message({ | |
| 120 | + message: res.msg, | |
| 121 | + type: 'success', | |
| 122 | + duration: 1000, | |
| 123 | + onClose: () => { | |
| 124 | + this.visible = false, | |
| 125 | + this.$emit('refresh', true) | |
| 126 | + } | |
| 127 | + }) | |
| 128 | + }) | |
| 129 | + } else { | |
| 130 | + request({ | |
| 131 | + url: '/SubDev/BaseLocalKeyWebsiteValidReportClassificationStati/' + this.dataForm.id, | |
| 132 | + method: 'PUT', | |
| 133 | + data: this.dataForm | |
| 134 | + }).then((res) => { | |
| 135 | + this.$message({ | |
| 136 | + message: res.msg, | |
| 137 | + type: 'success', | |
| 138 | + duration: 1000, | |
| 139 | + onClose: () => { | |
| 140 | + this.visible = false | |
| 141 | + this.$emit('refresh', true) | |
| 142 | + } | |
| 143 | + }) | |
| 144 | + }) | |
| 145 | + } | |
| 146 | + } | |
| 147 | + }) | |
| 148 | + }, | |
| 149 | + } | |
| 150 | + } | |
| 151 | +</script> | ... | ... |
src/views/new/baseLocalKeyWebsiteValidReportClassificationStati/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">属地重点网站有效举报分类统计情况</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-select v-model="query.areaId" placeholder="区县" > | |
| 18 | + <el-option v-for="item in areaOptions" :key="item.id" :label="item.fullName" :value="item.id"/> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + </el-col> | |
| 22 | + <el-col :span="6"> | |
| 23 | + <el-form-item label=""> | |
| 24 | + <el-input v-model="query.localKeyWebsiteClass" placeholder="分类" clearable /> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <template v-if="showAll"> | |
| 28 | + <el-col :span="6"> | |
| 29 | + <el-form-item label=""> | |
| 30 | + <num-range v-model="query.validAcceptanceQuantity"></num-range> | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + </template> | |
| 34 | + <el-col :span="6"> | |
| 35 | + <el-form-item> | |
| 36 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 37 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 38 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 39 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 40 | + </el-form-item> | |
| 41 | + </el-col> | |
| 42 | + </el-form> | |
| 43 | + </el-row> | |
| 44 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 45 | + <div class="NCC-common-head"> | |
| 46 | + <div style="display: flex;"> | |
| 47 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 48 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 49 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 50 | + <div style="margin-left: 10px;"> | |
| 51 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseLocalKeyWebsiteValidReportClassificationStati/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 52 | + <div class="avatar-box"> | |
| 53 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 54 | + </div> | |
| 55 | + </el-upload> | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + <div class="NCC-common-head-right"> | |
| 59 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 60 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 61 | + </el-tooltip> | |
| 62 | + <screenfull isContainer /> | |
| 63 | + </div> | |
| 64 | + </div> | |
| 65 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 66 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 67 | + <el-table-column label="区县" prop="areaId" align="left"> | |
| 68 | + <template slot-scope="scope">{{dynamicTextnew(scope.row.areaId,areaOptions)}}</template> | |
| 69 | + </el-table-column> | |
| 70 | + <el-table-column prop="localKeyWebsiteClass" label="分类" align="left" /> | |
| 71 | + <el-table-column prop="validAcceptanceQuantity" label="有效受理数量" align="left" /> | |
| 72 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 73 | + <template slot-scope="scope"> | |
| 74 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 75 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 76 | + </template> | |
| 77 | + </el-table-column> | |
| 78 | + </NCC-table> | |
| 79 | + <div style="display: flex;align-items: center;justify-content: space-between;width: 100%;"> | |
| 80 | + <div style="display: flex;"> | |
| 81 | + <div style="margin-left: 10px;" class="item-title">举报统计:{{ total2 }}</div> | |
| 82 | + </div> | |
| 83 | + <div style="width: 50%;"> | |
| 84 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + </div> | |
| 88 | + </div> | |
| 89 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 90 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 91 | + </div> | |
| 92 | + </div> | |
| 93 | + </div> | |
| 94 | +</template> | |
| 95 | +<script> | |
| 96 | +import infoMixin from "@/mixins/info"; | |
| 97 | + import request from '@/utils/request' | |
| 98 | + import NCCForm from './Form' | |
| 99 | + import ExportBox from './ExportBox' | |
| 100 | + export default { | |
| 101 | + mixins: [infoMixin], | |
| 102 | + components: { NCCForm, ExportBox }, | |
| 103 | + data() { | |
| 104 | + return { | |
| 105 | + uploadHeaders: { | |
| 106 | + Authorization: this.$store.getters.token, | |
| 107 | + IsLogin: true, | |
| 108 | + }, | |
| 109 | + showAll: false, | |
| 110 | + query: { | |
| 111 | + date:undefined, | |
| 112 | + areaId:undefined, | |
| 113 | + localKeyWebsiteClass:undefined, | |
| 114 | + validAcceptanceQuantity:undefined, | |
| 115 | + }, | |
| 116 | + list: [], | |
| 117 | + listLoading: true, | |
| 118 | + multipleSelection: [], total: 0, | |
| 119 | + listQuery: { | |
| 120 | + currentPage: 1, | |
| 121 | + pageSize: 20, | |
| 122 | + sort: "desc", | |
| 123 | + sidx: "", | |
| 124 | + }, | |
| 125 | + formVisible: false, | |
| 126 | + exportBoxVisible: false, | |
| 127 | + columnList: [ | |
| 128 | + { prop: 'date', label: '时间' }, | |
| 129 | + { prop: 'areaId', label: '区县' }, | |
| 130 | + { prop: 'class', label: '分类' }, | |
| 131 | + { prop: 'validAcceptanceQuantity', label: '有效受理数量' }, | |
| 132 | + ], | |
| 133 | + areaOptions:[], | |
| 134 | + areaIdOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], | |
| 135 | + total2:0 | |
| 136 | + } | |
| 137 | + }, | |
| 138 | + computed: {}, | |
| 139 | + created() { | |
| 140 | + this.initAreaTypeList(); | |
| 141 | + this.initData() | |
| 142 | + }, | |
| 143 | + methods: { | |
| 144 | + uploadSuccess(response, file, fileList) { | |
| 145 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 146 | + this.$message({ | |
| 147 | + type: type, | |
| 148 | + message: response.msg, | |
| 149 | + }); | |
| 150 | + // this.initList(); | |
| 151 | + }, | |
| 152 | + dynamicTextnew(value, options) { | |
| 153 | + console.error(']]]]]]]]]]]]]') | |
| 154 | + if (!value) return '' | |
| 155 | + if (Array.isArray(value)) { | |
| 156 | + if (!options || !Array.isArray(options)) return value.join() | |
| 157 | + let textList = [] | |
| 158 | + for (let i = 0; i < value.length; i++) { | |
| 159 | + let item = options.filter(o => o.id == value[i])[0] | |
| 160 | + if (!item || !item.fullName) { | |
| 161 | + textList.push(value[i]) | |
| 162 | + } else { | |
| 163 | + textList.push(item.fullName) | |
| 164 | + } | |
| 165 | + } | |
| 166 | + return textList.join() | |
| 167 | + } | |
| 168 | + if (!options || !Array.isArray(options)) return value | |
| 169 | + let item = options.filter(o => o.id == value)[0] | |
| 170 | + if (!item || !item.fullName) return value | |
| 171 | + return item.fullName | |
| 172 | + }, | |
| 173 | + initData() { | |
| 174 | + this.listLoading = true; | |
| 175 | + let _query = { | |
| 176 | + ...this.listQuery, | |
| 177 | + ...this.query | |
| 178 | + }; | |
| 179 | + let query = {} | |
| 180 | + for (let key in _query) { | |
| 181 | + if (Array.isArray(_query[key])) { | |
| 182 | + query[key] = _query[key].join() | |
| 183 | + } else { | |
| 184 | + query[key] = _query[key] | |
| 185 | + } | |
| 186 | + } | |
| 187 | + request({ | |
| 188 | + url: `/SubDev/BaseLocalKeyWebsiteValidReportClassificationStati`, | |
| 189 | + method: 'get', | |
| 190 | + params: query | |
| 191 | + }).then(res => { | |
| 192 | + this.list = res.data.list | |
| 193 | + this.total = res.data.pagination.total | |
| 194 | + this.listLoading = false | |
| 195 | + }) | |
| 196 | + request({ | |
| 197 | + url: `/SubDev/BaseLocalKeyWebsiteValidReportClassificationStati/GetCount`, | |
| 198 | + method: 'get', | |
| 199 | + params: query | |
| 200 | + }).then(res => { | |
| 201 | + console.error(res) | |
| 202 | + this.total2 = res.data | |
| 203 | + }) | |
| 204 | + }, | |
| 205 | + handleDel(id) { | |
| 206 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 207 | + type: 'warning' | |
| 208 | + }).then(() => { | |
| 209 | + request({ | |
| 210 | + url: `/SubDev/BaseLocalKeyWebsiteValidReportClassificationStati/${id}`, | |
| 211 | + method: 'DELETE' | |
| 212 | + }).then(res => { | |
| 213 | + this.$message({ | |
| 214 | + type: 'success', | |
| 215 | + message: res.msg, | |
| 216 | + onClose: () => { | |
| 217 | + this.initData() | |
| 218 | + } | |
| 219 | + }); | |
| 220 | + }) | |
| 221 | + }).catch(() => { | |
| 222 | + }); | |
| 223 | + }, | |
| 224 | + addOrUpdateHandle(id, isDetail) { | |
| 225 | + this.formVisible = true | |
| 226 | + this.$nextTick(() => { | |
| 227 | + this.$refs.NCCForm.init(id, isDetail) | |
| 228 | + }) | |
| 229 | + }, | |
| 230 | + exportData(type) { | |
| 231 | + let obj = {}; | |
| 232 | + if(type) { | |
| 233 | + obj = { | |
| 234 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/17', | |
| 235 | + params: {type:17}, | |
| 236 | + method: "GET", | |
| 237 | + responseType: 'blob', | |
| 238 | + } | |
| 239 | + request(obj).then((res) => { | |
| 240 | + if(type) { | |
| 241 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 242 | + const url = window.URL.createObjectURL(blob); | |
| 243 | + let link = document.createElement('a'); | |
| 244 | + link.style.display = 'none'; | |
| 245 | + link.href = url; | |
| 246 | + link.download = '属地重点网站有效举报分类统计情况.xlsx'; | |
| 247 | + link.click(); | |
| 248 | + } else { | |
| 249 | + if(res.code != 200) return; | |
| 250 | + const url = define.APIURl + res.data.url; | |
| 251 | + const link = document.createElement("a"); | |
| 252 | + link.href = url; | |
| 253 | + link.download = res.data.name; | |
| 254 | + link.click(); | |
| 255 | + } | |
| 256 | + }) | |
| 257 | + } else { | |
| 258 | + this.exportBoxVisible = true | |
| 259 | + this.$nextTick(() => { | |
| 260 | + this.$refs.ExportBox.init(this.columnList) | |
| 261 | + }) | |
| 262 | + }; | |
| 263 | + | |
| 264 | + }, | |
| 265 | + // exportData() { | |
| 266 | + // this.exportBoxVisible = true | |
| 267 | + // this.$nextTick(() => { | |
| 268 | + // this.$refs.ExportBox.init(this.columnList) | |
| 269 | + // }) | |
| 270 | + // }, | |
| 271 | + download(data) { | |
| 272 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 273 | + request({ | |
| 274 | + url: `/SubDev/BaseLocalKeyWebsiteValidReportClassificationStati/Actions/Export`, | |
| 275 | + method: 'get', | |
| 276 | + params: query | |
| 277 | + }).then(res => { | |
| 278 | + if (!res.data.url) return | |
| 279 | + window.location.href = this.define.comUrl + res.data.url | |
| 280 | + this.$refs.ExportBox.visible = false | |
| 281 | + this.exportBoxVisible = false | |
| 282 | + }) | |
| 283 | + }, | |
| 284 | + search() { | |
| 285 | + this.listQuery = { | |
| 286 | + currentPage: 1, | |
| 287 | + pageSize: 20, | |
| 288 | + sort: "desc", | |
| 289 | + sidx: "", | |
| 290 | + } | |
| 291 | + this.initData() | |
| 292 | + }, | |
| 293 | + refresh(isrRefresh) { | |
| 294 | + this.formVisible = false | |
| 295 | + if (isrRefresh) this.reset() | |
| 296 | + }, | |
| 297 | + reset() { | |
| 298 | + for (let key in this.query) { | |
| 299 | + this.query[key] = undefined | |
| 300 | + } | |
| 301 | + this.listQuery = { | |
| 302 | + currentPage: 1, | |
| 303 | + pageSize: 20, | |
| 304 | + sort: "desc", | |
| 305 | + sidx: "", | |
| 306 | + } | |
| 307 | + this.initData() | |
| 308 | + } | |
| 309 | + } | |
| 310 | + } | |
| 311 | +</script> | |
| 0 | 312 | \ No newline at end of file | ... | ... |
src/views/new/baseLocalinspectionreport/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseLocalinspectionreport/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="time"> | |
| 7 | + <el-date-picker v-model="dataForm.time" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="巡查类型" prop="inspectionType"> | |
| 13 | + <el-input v-model="dataForm.inspectionType" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="标题" prop="tittle"> | |
| 19 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="巡查网站平台数量" prop="crawlWebsitePlatformCount"> | |
| 25 | + <el-input-number v-model="dataForm.crawlWebsitePlatformCount" placeholder="数字文本" :step="1" > | |
| 26 | + </el-input-number> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <!-- <el-col :span="24"> | |
| 30 | + <el-form-item label="附件" prop="annex"> | |
| 31 | + <el-input v-model="dataForm.annex" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 32 | + </el-input> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> --> | |
| 35 | + <el-col :span="24"> | |
| 36 | + <el-form-item label="附件" prop="annex"> | |
| 37 | + <NCC-UploadFz v-model="dataForm.annex" :fileSize="1024" sizeUnit="MB" :limit="9" buttonText="点击上传" > | |
| 38 | + </NCC-UploadFz> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + </el-form> | |
| 42 | + </el-row> | |
| 43 | + <span slot="footer" class="dialog-footer"> | |
| 44 | + <el-button @click="visible = false">取 消</el-button> | |
| 45 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 46 | + </span> | |
| 47 | + </el-dialog> | |
| 48 | +</template> | |
| 49 | +<script> | |
| 50 | + import request from '@/utils/request' | |
| 51 | + export default { | |
| 52 | + components: {}, | |
| 53 | + props: [], | |
| 54 | + data() { | |
| 55 | + return { | |
| 56 | + loading: false, | |
| 57 | + visible: false, | |
| 58 | + isDetail: false, | |
| 59 | + dataForm: { | |
| 60 | + id:'', | |
| 61 | + time:undefined, | |
| 62 | + inspectionType:undefined, | |
| 63 | + tittle:undefined, | |
| 64 | + crawlWebsitePlatformCount:undefined, | |
| 65 | + annex:[], | |
| 66 | + }, | |
| 67 | + rules: { | |
| 68 | + }, | |
| 69 | + } | |
| 70 | + }, | |
| 71 | + computed: {}, | |
| 72 | + watch: {}, | |
| 73 | + created() { | |
| 74 | + }, | |
| 75 | + mounted() { | |
| 76 | + }, | |
| 77 | + methods: { | |
| 78 | + goBack() { | |
| 79 | + this.$emit('refresh') | |
| 80 | + }, | |
| 81 | + init(id, isDetail) { | |
| 82 | + this.dataForm.id = id || 0; | |
| 83 | + this.visible = true; | |
| 84 | + this.isDetail = isDetail || false; | |
| 85 | + this.$nextTick(() => { | |
| 86 | + this.$refs['elForm'].resetFields(); | |
| 87 | + if (this.dataForm.id) { | |
| 88 | + request({ | |
| 89 | + url: '/SubDev/BaseLocalinspectionreport/' + this.dataForm.id, | |
| 90 | + method: 'get' | |
| 91 | + }).then(res =>{ | |
| 92 | + this.dataForm = res.data; | |
| 93 | + }) | |
| 94 | + } | |
| 95 | + }) | |
| 96 | + }, | |
| 97 | + dataFormSubmit() { | |
| 98 | + this.$refs['elForm'].validate((valid) => { | |
| 99 | + if (valid) { | |
| 100 | + if (!this.dataForm.id) { | |
| 101 | + request({ | |
| 102 | + url: `/SubDev/BaseLocalinspectionreport`, | |
| 103 | + method: 'post', | |
| 104 | + data: this.dataForm, | |
| 105 | + }).then((res) => { | |
| 106 | + this.$message({ | |
| 107 | + message: res.msg, | |
| 108 | + type: 'success', | |
| 109 | + duration: 1000, | |
| 110 | + onClose: () => { | |
| 111 | + this.visible = false, | |
| 112 | + this.$emit('refresh', true) | |
| 113 | + } | |
| 114 | + }) | |
| 115 | + }) | |
| 116 | + } else { | |
| 117 | + request({ | |
| 118 | + url: '/SubDev/BaseLocalinspectionreport/' + this.dataForm.id, | |
| 119 | + method: 'PUT', | |
| 120 | + data: this.dataForm | |
| 121 | + }).then((res) => { | |
| 122 | + this.$message({ | |
| 123 | + message: res.msg, | |
| 124 | + type: 'success', | |
| 125 | + duration: 1000, | |
| 126 | + onClose: () => { | |
| 127 | + this.visible = false | |
| 128 | + this.$emit('refresh', true) | |
| 129 | + } | |
| 130 | + }) | |
| 131 | + }) | |
| 132 | + } | |
| 133 | + } | |
| 134 | + }) | |
| 135 | + }, | |
| 136 | + } | |
| 137 | + } | |
| 138 | +</script> | ... | ... |
src/views/new/baseLocalinspectionreport/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">属地巡查报告</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.time" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.inspectionType" placeholder="巡查类型" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <num-range v-model="query.crawlWebsitePlatformCount"></num-range> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item label=""> | |
| 33 | + <el-input v-model="query.annex" placeholder="附件" clearable /> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + </template> | |
| 37 | + <el-col :span="6"> | |
| 38 | + <el-form-item> | |
| 39 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 40 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 41 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 42 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 43 | + </el-form-item> | |
| 44 | + </el-col> | |
| 45 | + </el-form> | |
| 46 | + </el-row> | |
| 47 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 48 | + <div class="NCC-common-head"> | |
| 49 | + <div style="display: flex;"> | |
| 50 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 51 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 52 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 53 | + <div style="margin-left: 10px;"> | |
| 54 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseLocalinspectionreport/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 55 | + <div class="avatar-box"> | |
| 56 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 57 | + </div> | |
| 58 | + </el-upload> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + <div class="NCC-common-head-right"> | |
| 62 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 63 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 64 | + </el-tooltip> | |
| 65 | + <screenfull isContainer /> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 69 | + <el-table-column prop="time" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 70 | + <el-table-column prop="inspectionType" label="巡查类型" align="left" /> | |
| 71 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 72 | + <el-table-column prop="crawlWebsitePlatformCount" label="巡查网站平台数量" align="left" /> | |
| 73 | + <!-- <el-table-column prop="annex" label="附件" align="left" /> --> | |
| 74 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 75 | + <template slot-scope="scope"> | |
| 76 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 77 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 78 | + </template> | |
| 79 | + </el-table-column> | |
| 80 | + </NCC-table> | |
| 81 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 82 | + </div> | |
| 83 | + </div> | |
| 84 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 85 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 86 | + </div> | |
| 87 | + </div> | |
| 88 | + </div> | |
| 89 | +</template> | |
| 90 | +<script> | |
| 91 | + import request from '@/utils/request' | |
| 92 | + import NCCForm from './Form' | |
| 93 | + import ExportBox from './ExportBox' | |
| 94 | + export default { | |
| 95 | + components: { NCCForm, ExportBox }, | |
| 96 | + data() { | |
| 97 | + return { | |
| 98 | + uploadHeaders: { | |
| 99 | + Authorization: this.$store.getters.token, | |
| 100 | + IsLogin: true, | |
| 101 | + }, | |
| 102 | + showAll: false, | |
| 103 | + query: { | |
| 104 | + time:undefined, | |
| 105 | + inspectionType:undefined, | |
| 106 | + tittle:undefined, | |
| 107 | + crawlWebsitePlatformCount:undefined, | |
| 108 | + annex:undefined, | |
| 109 | + }, | |
| 110 | + list: [], | |
| 111 | + listLoading: true, | |
| 112 | + multipleSelection: [], total: 0, | |
| 113 | + listQuery: { | |
| 114 | + currentPage: 1, | |
| 115 | + pageSize: 20, | |
| 116 | + sort: "desc", | |
| 117 | + sidx: "", | |
| 118 | + }, | |
| 119 | + formVisible: false, | |
| 120 | + exportBoxVisible: false, | |
| 121 | + columnList: [ | |
| 122 | + { prop: 'time', label: '时间' }, | |
| 123 | + { prop: 'inspectionType', label: '巡查类型' }, | |
| 124 | + { prop: 'tittle', label: '标题' }, | |
| 125 | + { prop: 'crawlWebsitePlatformCount', label: '巡查网站平台数量' }, | |
| 126 | + { prop: 'annex', label: '附件' }, | |
| 127 | + ], | |
| 128 | + } | |
| 129 | + }, | |
| 130 | + computed: {}, | |
| 131 | + created() { | |
| 132 | + this.initData() | |
| 133 | + }, | |
| 134 | + methods: { | |
| 135 | + uploadSuccess(response, file, fileList) { | |
| 136 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 137 | + this.$message({ | |
| 138 | + type: type, | |
| 139 | + message: response.msg, | |
| 140 | + }); | |
| 141 | + // this.initList(); | |
| 142 | + }, | |
| 143 | + initData() { | |
| 144 | + this.listLoading = true; | |
| 145 | + let _query = { | |
| 146 | + ...this.listQuery, | |
| 147 | + ...this.query | |
| 148 | + }; | |
| 149 | + let query = {} | |
| 150 | + for (let key in _query) { | |
| 151 | + if (Array.isArray(_query[key])) { | |
| 152 | + query[key] = _query[key].join() | |
| 153 | + } else { | |
| 154 | + query[key] = _query[key] | |
| 155 | + } | |
| 156 | + } | |
| 157 | + request({ | |
| 158 | + url: `/SubDev/BaseLocalinspectionreport`, | |
| 159 | + method: 'get', | |
| 160 | + params: query | |
| 161 | + }).then(res => { | |
| 162 | + this.list = res.data.list | |
| 163 | + this.total = res.data.pagination.total | |
| 164 | + this.listLoading = false | |
| 165 | + }) | |
| 166 | + }, | |
| 167 | + handleDel(id) { | |
| 168 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 169 | + type: 'warning' | |
| 170 | + }).then(() => { | |
| 171 | + request({ | |
| 172 | + url: `/SubDev/BaseLocalinspectionreport/${id}`, | |
| 173 | + method: 'DELETE' | |
| 174 | + }).then(res => { | |
| 175 | + this.$message({ | |
| 176 | + type: 'success', | |
| 177 | + message: res.msg, | |
| 178 | + onClose: () => { | |
| 179 | + this.initData() | |
| 180 | + } | |
| 181 | + }); | |
| 182 | + }) | |
| 183 | + }).catch(() => { | |
| 184 | + }); | |
| 185 | + }, | |
| 186 | + addOrUpdateHandle(id, isDetail) { | |
| 187 | + this.formVisible = true | |
| 188 | + this.$nextTick(() => { | |
| 189 | + this.$refs.NCCForm.init(id, isDetail) | |
| 190 | + }) | |
| 191 | + }, | |
| 192 | + | |
| 193 | + exportData(type) { | |
| 194 | + let obj = {}; | |
| 195 | + if(type) { | |
| 196 | + obj = { | |
| 197 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/6', | |
| 198 | + params: {type:6}, | |
| 199 | + method: "GET", | |
| 200 | + responseType: 'blob', | |
| 201 | + } | |
| 202 | + request(obj).then((res) => { | |
| 203 | + if(type) { | |
| 204 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 205 | + const url = window.URL.createObjectURL(blob); | |
| 206 | + let link = document.createElement('a'); | |
| 207 | + link.style.display = 'none'; | |
| 208 | + link.href = url; | |
| 209 | + link.download = '属地巡查报告.xlsx'; | |
| 210 | + link.click(); | |
| 211 | + } else { | |
| 212 | + if(res.code != 200) return; | |
| 213 | + const url = define.APIURl + res.data.url; | |
| 214 | + const link = document.createElement("a"); | |
| 215 | + link.href = url; | |
| 216 | + link.download = res.data.name; | |
| 217 | + link.click(); | |
| 218 | + } | |
| 219 | + }) | |
| 220 | + } else { | |
| 221 | + this.exportBoxVisible = true | |
| 222 | + this.$nextTick(() => { | |
| 223 | + this.$refs.ExportBox.init(this.columnList) | |
| 224 | + }) | |
| 225 | + }; | |
| 226 | + | |
| 227 | + }, | |
| 228 | + // exportData() { | |
| 229 | + // this.exportBoxVisible = true | |
| 230 | + // this.$nextTick(() => { | |
| 231 | + // this.$refs.ExportBox.init(this.columnList) | |
| 232 | + // }) | |
| 233 | + // }, | |
| 234 | + download(data) { | |
| 235 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 236 | + request({ | |
| 237 | + url: `/SubDev/BaseLocalinspectionreport/Actions/Export`, | |
| 238 | + method: 'get', | |
| 239 | + params: query | |
| 240 | + }).then(res => { | |
| 241 | + if (!res.data.url) return | |
| 242 | + window.location.href = this.define.comUrl + res.data.url | |
| 243 | + this.$refs.ExportBox.visible = false | |
| 244 | + this.exportBoxVisible = false | |
| 245 | + }) | |
| 246 | + }, | |
| 247 | + search() { | |
| 248 | + this.listQuery = { | |
| 249 | + currentPage: 1, | |
| 250 | + pageSize: 20, | |
| 251 | + sort: "desc", | |
| 252 | + sidx: "", | |
| 253 | + } | |
| 254 | + this.initData() | |
| 255 | + }, | |
| 256 | + refresh(isrRefresh) { | |
| 257 | + this.formVisible = false | |
| 258 | + if (isrRefresh) this.reset() | |
| 259 | + }, | |
| 260 | + reset() { | |
| 261 | + for (let key in this.query) { | |
| 262 | + this.query[key] = undefined | |
| 263 | + } | |
| 264 | + this.listQuery = { | |
| 265 | + currentPage: 1, | |
| 266 | + pageSize: 20, | |
| 267 | + sort: "desc", | |
| 268 | + sidx: "", | |
| 269 | + } | |
| 270 | + this.initData() | |
| 271 | + } | |
| 272 | + } | |
| 273 | + } | |
| 274 | +</script> | |
| 0 | 275 | \ No newline at end of file | ... | ... |
src/views/new/baseMeetingSpirit/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseMeetingSpirit/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="标题" prop="tittle"> | |
| 13 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="内容" prop="content"> | |
| 19 | + <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + </el-form> | |
| 24 | + </el-row> | |
| 25 | + <span slot="footer" class="dialog-footer"> | |
| 26 | + <el-button @click="visible = false">取 消</el-button> | |
| 27 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 28 | + </span> | |
| 29 | + </el-dialog> | |
| 30 | +</template> | |
| 31 | +<script> | |
| 32 | + import request from '@/utils/request' | |
| 33 | + export default { | |
| 34 | + components: {}, | |
| 35 | + props: [], | |
| 36 | + data() { | |
| 37 | + return { | |
| 38 | + loading: false, | |
| 39 | + visible: false, | |
| 40 | + isDetail: false, | |
| 41 | + dataForm: { | |
| 42 | + id:'', | |
| 43 | + date:undefined, | |
| 44 | + tittle:undefined, | |
| 45 | + content:undefined, | |
| 46 | + }, | |
| 47 | + rules: { | |
| 48 | + }, | |
| 49 | + } | |
| 50 | + }, | |
| 51 | + computed: {}, | |
| 52 | + watch: {}, | |
| 53 | + created() { | |
| 54 | + }, | |
| 55 | + mounted() { | |
| 56 | + }, | |
| 57 | + methods: { | |
| 58 | + goBack() { | |
| 59 | + this.$emit('refresh') | |
| 60 | + }, | |
| 61 | + init(id, isDetail) { | |
| 62 | + this.dataForm.id = id || 0; | |
| 63 | + this.visible = true; | |
| 64 | + this.isDetail = isDetail || false; | |
| 65 | + this.$nextTick(() => { | |
| 66 | + this.$refs['elForm'].resetFields(); | |
| 67 | + if (this.dataForm.id) { | |
| 68 | + request({ | |
| 69 | + url: '/SubDev/BaseMeetingSpirit/' + this.dataForm.id, | |
| 70 | + method: 'get' | |
| 71 | + }).then(res =>{ | |
| 72 | + this.dataForm = res.data; | |
| 73 | + }) | |
| 74 | + } | |
| 75 | + }) | |
| 76 | + }, | |
| 77 | + dataFormSubmit() { | |
| 78 | + this.$refs['elForm'].validate((valid) => { | |
| 79 | + if (valid) { | |
| 80 | + if (!this.dataForm.id) { | |
| 81 | + request({ | |
| 82 | + url: `/SubDev/BaseMeetingSpirit`, | |
| 83 | + method: 'post', | |
| 84 | + data: this.dataForm, | |
| 85 | + }).then((res) => { | |
| 86 | + this.$message({ | |
| 87 | + message: res.msg, | |
| 88 | + type: 'success', | |
| 89 | + duration: 1000, | |
| 90 | + onClose: () => { | |
| 91 | + this.visible = false, | |
| 92 | + this.$emit('refresh', true) | |
| 93 | + } | |
| 94 | + }) | |
| 95 | + }) | |
| 96 | + } else { | |
| 97 | + request({ | |
| 98 | + url: '/SubDev/BaseMeetingSpirit/' + this.dataForm.id, | |
| 99 | + method: 'PUT', | |
| 100 | + data: this.dataForm | |
| 101 | + }).then((res) => { | |
| 102 | + this.$message({ | |
| 103 | + message: res.msg, | |
| 104 | + type: 'success', | |
| 105 | + duration: 1000, | |
| 106 | + onClose: () => { | |
| 107 | + this.visible = false | |
| 108 | + this.$emit('refresh', true) | |
| 109 | + } | |
| 110 | + }) | |
| 111 | + }) | |
| 112 | + } | |
| 113 | + } | |
| 114 | + }) | |
| 115 | + }, | |
| 116 | + } | |
| 117 | + } | |
| 118 | +</script> | ... | ... |
src/views/new/baseMeetingSpirit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">会议精神</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-input v-model="query.content" placeholder="内容" /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item> | |
| 27 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 28 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + </el-form> | |
| 32 | + </el-row> | |
| 33 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 34 | + <div class="NCC-common-head"> | |
| 35 | + <div style="display: flex;"> | |
| 36 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 37 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 38 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 39 | + <div style="margin-left: 10px;"> | |
| 40 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseMeetingSpirit/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 41 | + <div class="avatar-box"> | |
| 42 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 43 | + </div> | |
| 44 | + </el-upload> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + <div class="NCC-common-head-right"> | |
| 48 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 49 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 50 | + </el-tooltip> | |
| 51 | + <screenfull isContainer /> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 55 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 56 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 57 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 58 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 59 | + <template slot-scope="scope"> | |
| 60 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 61 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 62 | + </template> | |
| 63 | + </el-table-column> | |
| 64 | + </NCC-table> | |
| 65 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 69 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | +</template> | |
| 74 | +<script> | |
| 75 | + import request from '@/utils/request' | |
| 76 | + import NCCForm from './Form' | |
| 77 | + import ExportBox from './ExportBox' | |
| 78 | + export default { | |
| 79 | + components: { NCCForm, ExportBox }, | |
| 80 | + data() { | |
| 81 | + return { | |
| 82 | + uploadHeaders: { | |
| 83 | + Authorization: this.$store.getters.token, | |
| 84 | + IsLogin: true, | |
| 85 | + }, | |
| 86 | + showAll: false, | |
| 87 | + query: { | |
| 88 | + date:undefined, | |
| 89 | + tittle:undefined, | |
| 90 | + content:undefined, | |
| 91 | + }, | |
| 92 | + list: [], | |
| 93 | + listLoading: true, | |
| 94 | + multipleSelection: [], total: 0, | |
| 95 | + listQuery: { | |
| 96 | + currentPage: 1, | |
| 97 | + pageSize: 20, | |
| 98 | + sort: "desc", | |
| 99 | + sidx: "", | |
| 100 | + }, | |
| 101 | + formVisible: false, | |
| 102 | + exportBoxVisible: false, | |
| 103 | + columnList: [ | |
| 104 | + { prop: 'date', label: '时间' }, | |
| 105 | + { prop: 'tittle', label: '标题' }, | |
| 106 | + { prop: 'content', label: '内容' }, | |
| 107 | + ], | |
| 108 | + } | |
| 109 | + }, | |
| 110 | + computed: {}, | |
| 111 | + created() { | |
| 112 | + this.initData() | |
| 113 | + }, | |
| 114 | + methods: { | |
| 115 | + uploadSuccess(response, file, fileList) { | |
| 116 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 117 | + this.$message({ | |
| 118 | + type: type, | |
| 119 | + message: response.msg, | |
| 120 | + }); | |
| 121 | + // this.initList(); | |
| 122 | + }, | |
| 123 | + initData() { | |
| 124 | + this.listLoading = true; | |
| 125 | + let _query = { | |
| 126 | + ...this.listQuery, | |
| 127 | + ...this.query | |
| 128 | + }; | |
| 129 | + let query = {} | |
| 130 | + for (let key in _query) { | |
| 131 | + if (Array.isArray(_query[key])) { | |
| 132 | + query[key] = _query[key].join() | |
| 133 | + } else { | |
| 134 | + query[key] = _query[key] | |
| 135 | + } | |
| 136 | + } | |
| 137 | + request({ | |
| 138 | + url: `/SubDev/BaseMeetingSpirit`, | |
| 139 | + method: 'get', | |
| 140 | + params: query | |
| 141 | + }).then(res => { | |
| 142 | + this.list = res.data.list | |
| 143 | + this.total = res.data.pagination.total | |
| 144 | + this.listLoading = false | |
| 145 | + }) | |
| 146 | + }, | |
| 147 | + handleDel(id) { | |
| 148 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 149 | + type: 'warning' | |
| 150 | + }).then(() => { | |
| 151 | + request({ | |
| 152 | + url: `/SubDev/BaseMeetingSpirit/${id}`, | |
| 153 | + method: 'DELETE' | |
| 154 | + }).then(res => { | |
| 155 | + this.$message({ | |
| 156 | + type: 'success', | |
| 157 | + message: res.msg, | |
| 158 | + onClose: () => { | |
| 159 | + this.initData() | |
| 160 | + } | |
| 161 | + }); | |
| 162 | + }) | |
| 163 | + }).catch(() => { | |
| 164 | + }); | |
| 165 | + }, | |
| 166 | + addOrUpdateHandle(id, isDetail) { | |
| 167 | + this.formVisible = true | |
| 168 | + this.$nextTick(() => { | |
| 169 | + this.$refs.NCCForm.init(id, isDetail) | |
| 170 | + }) | |
| 171 | + }, | |
| 172 | + exportData(type) { | |
| 173 | + let obj = {}; | |
| 174 | + if(type) { | |
| 175 | + obj = { | |
| 176 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/10', | |
| 177 | + params: {type:10}, | |
| 178 | + method: "GET", | |
| 179 | + responseType: 'blob', | |
| 180 | + } | |
| 181 | + request(obj).then((res) => { | |
| 182 | + if(type) { | |
| 183 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 184 | + const url = window.URL.createObjectURL(blob); | |
| 185 | + let link = document.createElement('a'); | |
| 186 | + link.style.display = 'none'; | |
| 187 | + link.href = url; | |
| 188 | + link.download = '会议精神.xlsx'; | |
| 189 | + link.click(); | |
| 190 | + } else { | |
| 191 | + if(res.code != 200) return; | |
| 192 | + const url = define.APIURl + res.data.url; | |
| 193 | + const link = document.createElement("a"); | |
| 194 | + link.href = url; | |
| 195 | + link.download = res.data.name; | |
| 196 | + link.click(); | |
| 197 | + } | |
| 198 | + }) | |
| 199 | + } else { | |
| 200 | + this.exportBoxVisible = true | |
| 201 | + this.$nextTick(() => { | |
| 202 | + this.$refs.ExportBox.init(this.columnList) | |
| 203 | + }) | |
| 204 | + }; | |
| 205 | + | |
| 206 | + }, | |
| 207 | + // exportData() { | |
| 208 | + // this.exportBoxVisible = true | |
| 209 | + // this.$nextTick(() => { | |
| 210 | + // this.$refs.ExportBox.init(this.columnList) | |
| 211 | + // }) | |
| 212 | + // }, | |
| 213 | + download(data) { | |
| 214 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 215 | + request({ | |
| 216 | + url: `/SubDev/BaseMeetingSpirit/Actions/Export`, | |
| 217 | + method: 'get', | |
| 218 | + params: query | |
| 219 | + }).then(res => { | |
| 220 | + if (!res.data.url) return | |
| 221 | + window.location.href = this.define.comUrl + res.data.url | |
| 222 | + this.$refs.ExportBox.visible = false | |
| 223 | + this.exportBoxVisible = false | |
| 224 | + }) | |
| 225 | + }, | |
| 226 | + search() { | |
| 227 | + this.listQuery = { | |
| 228 | + currentPage: 1, | |
| 229 | + pageSize: 20, | |
| 230 | + sort: "desc", | |
| 231 | + sidx: "", | |
| 232 | + } | |
| 233 | + this.initData() | |
| 234 | + }, | |
| 235 | + refresh(isrRefresh) { | |
| 236 | + this.formVisible = false | |
| 237 | + if (isrRefresh) this.reset() | |
| 238 | + }, | |
| 239 | + reset() { | |
| 240 | + for (let key in this.query) { | |
| 241 | + this.query[key] = undefined | |
| 242 | + } | |
| 243 | + this.listQuery = { | |
| 244 | + currentPage: 1, | |
| 245 | + pageSize: 20, | |
| 246 | + sort: "desc", | |
| 247 | + sidx: "", | |
| 248 | + } | |
| 249 | + this.initData() | |
| 250 | + } | |
| 251 | + } | |
| 252 | + } | |
| 253 | +</script> | |
| 0 | 254 | \ No newline at end of file | ... | ... |
src/views/new/baseMisstatement/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseMisstatement/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="日期" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="网站/账号名称" prop="website"> | |
| 13 | + <el-input v-model="dataForm.website" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="属事属地" prop="jurisdictionType"> | |
| 19 | + <el-checkbox-group v-model="dataForm.jurisdictionType" :style='{}' > | |
| 20 | + <el-checkbox v-for="(item, index) in jurisdictionTypeOptions" :key="index" :label="item.id" >{{item.fullName}}</el-checkbox> | |
| 21 | + </el-checkbox-group> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <el-col :span="24"> | |
| 25 | + <el-form-item label="属地" prop="areaId"> | |
| 26 | + <el-radio-group | |
| 27 | + v-model="dataForm.areaId" | |
| 28 | + placeholder="请选择属地" | |
| 29 | + style="line-height: 22px" | |
| 30 | + > | |
| 31 | + <el-radio v-for="v in areaOptions" :key="v.id" :label="v.id">{{ | |
| 32 | + v.fullName | |
| 33 | + }}</el-radio> | |
| 34 | + </el-radio-group> | |
| 35 | + </el-form-item> | |
| 36 | + </el-col> | |
| 37 | + <el-col :span="24"> | |
| 38 | + <el-form-item label="市级单位" prop="municipalUnit"> | |
| 39 | + <el-input v-model="dataForm.municipalUnit" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 40 | + </el-input> | |
| 41 | + </el-form-item> | |
| 42 | + </el-col> | |
| 43 | + <el-col :span="24"> | |
| 44 | + <el-form-item label="平台" prop="platform"> | |
| 45 | + <el-input v-model="dataForm.platform" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 46 | + </el-input> | |
| 47 | + </el-form-item> | |
| 48 | + </el-col> | |
| 49 | + <el-col :span="24"> | |
| 50 | + <el-form-item label="链接" prop="url"> | |
| 51 | + <el-input v-model="dataForm.url" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 52 | + </el-input> | |
| 53 | + </el-form-item> | |
| 54 | + </el-col> | |
| 55 | + <el-col :span="24"> | |
| 56 | + <el-form-item label="错误表述" prop="incorrectWording"> | |
| 57 | + <el-input v-model="dataForm.incorrectWording" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 58 | + </el-input> | |
| 59 | + </el-form-item> | |
| 60 | + </el-col> | |
| 61 | + <el-col :span="24"> | |
| 62 | + <el-form-item label="正确描述" prop="correctWording"> | |
| 63 | + <el-input v-model="dataForm.correctWording" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 64 | + </el-input> | |
| 65 | + </el-form-item> | |
| 66 | + </el-col> | |
| 67 | + <el-col :span="24"> | |
| 68 | + <el-form-item label="来源" prop="source"> | |
| 69 | + <el-checkbox-group v-model="dataForm.source" :style='{}' > | |
| 70 | + <el-checkbox v-for="(item, index) in sourceOptions" :key="index" :label="item.id" >{{item.fullName}}</el-checkbox> | |
| 71 | + </el-checkbox-group> | |
| 72 | + </el-form-item> | |
| 73 | + </el-col> | |
| 74 | + <el-col :span="24"> | |
| 75 | + <el-form-item label="分类" prop="category"> | |
| 76 | + <el-checkbox-group v-model="dataForm.category" :style='{}' > | |
| 77 | + <el-checkbox v-for="(item, index) in categoryOptions" :key="index" :label="item.id" >{{item.fullName}}</el-checkbox> | |
| 78 | + </el-checkbox-group> | |
| 79 | + </el-form-item> | |
| 80 | + </el-col> | |
| 81 | + </el-form> | |
| 82 | + </el-row> | |
| 83 | + <span slot="footer" class="dialog-footer"> | |
| 84 | + <el-button @click="visible = false">取 消</el-button> | |
| 85 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 86 | + </span> | |
| 87 | + </el-dialog> | |
| 88 | +</template> | |
| 89 | +<script> | |
| 90 | + import infoMixin from "@/mixins/info"; | |
| 91 | + import request from '@/utils/request' | |
| 92 | + export default { | |
| 93 | + mixins: [infoMixin], | |
| 94 | + components: {}, | |
| 95 | + props: [], | |
| 96 | + data() { | |
| 97 | + return { | |
| 98 | + loading: false, | |
| 99 | + visible: false, | |
| 100 | + isDetail: false, | |
| 101 | + dataForm: { | |
| 102 | + id:'', | |
| 103 | + date:undefined, | |
| 104 | + website:undefined, | |
| 105 | + jurisdictionType:[], | |
| 106 | + municipalUnit:undefined, | |
| 107 | + platform:undefined, | |
| 108 | + url:undefined, | |
| 109 | + incorrectWording:undefined, | |
| 110 | + correctWording:undefined, | |
| 111 | + source:[], | |
| 112 | + category:[], | |
| 113 | + areaId:[], | |
| 114 | + | |
| 115 | + }, | |
| 116 | + areaOptions: [], | |
| 117 | + rules: { | |
| 118 | + }, | |
| 119 | + jurisdictionTypeOptions:[{"fullName":"市级单位","id":"市级单位"},{"fullName":"属地","id":"属地"}], | |
| 120 | + sourceOptions:[{"fullName":"指令","id":"指令"},{"fullName":"巡查","id":"巡查"},{"fullName":"举报","id":"举报"},{"fullName":"其他","id":"其他"}], | |
| 121 | + categoryOptions:[{"fullName":"政务","id":"政务"},{"fullName":"国企","id":"国企"},{"fullName":"学校","id":"学校"},{"fullName":"其他","id":"其他"}], | |
| 122 | + } | |
| 123 | + }, | |
| 124 | + computed: {}, | |
| 125 | + watch: {}, | |
| 126 | + created() { | |
| 127 | + this.initAreaTypeList(); | |
| 128 | + }, | |
| 129 | + mounted() { | |
| 130 | + }, | |
| 131 | + methods: { | |
| 132 | + goBack() { | |
| 133 | + this.$emit('refresh') | |
| 134 | + }, | |
| 135 | + init(id, isDetail) { | |
| 136 | + this.dataForm.id = id || 0; | |
| 137 | + this.visible = true; | |
| 138 | + this.isDetail = isDetail || false; | |
| 139 | + this.$nextTick(() => { | |
| 140 | + this.$refs['elForm'].resetFields(); | |
| 141 | + if (this.dataForm.id) { | |
| 142 | + request({ | |
| 143 | + url: '/SubDev/BaseMisstatement/' + this.dataForm.id, | |
| 144 | + method: 'get' | |
| 145 | + }).then(res =>{ | |
| 146 | + this.dataForm = res.data; | |
| 147 | + if(!this.dataForm.jurisdictionType)this.dataForm.jurisdictionType=[]; | |
| 148 | + if(!this.dataForm.source)this.dataForm.source=[]; | |
| 149 | + if(!this.dataForm.category)this.dataForm.category=[]; | |
| 150 | + }) | |
| 151 | + } | |
| 152 | + }) | |
| 153 | + }, | |
| 154 | + dataFormSubmit() { | |
| 155 | + this.$refs['elForm'].validate((valid) => { | |
| 156 | + if (valid) { | |
| 157 | + if (!this.dataForm.id) { | |
| 158 | + request({ | |
| 159 | + url: `/SubDev/BaseMisstatement`, | |
| 160 | + method: 'post', | |
| 161 | + data: this.dataForm, | |
| 162 | + }).then((res) => { | |
| 163 | + this.$message({ | |
| 164 | + message: res.msg, | |
| 165 | + type: 'success', | |
| 166 | + duration: 1000, | |
| 167 | + onClose: () => { | |
| 168 | + this.visible = false, | |
| 169 | + this.$emit('refresh', true) | |
| 170 | + } | |
| 171 | + }) | |
| 172 | + }) | |
| 173 | + } else { | |
| 174 | + request({ | |
| 175 | + url: '/SubDev/BaseMisstatement/' + this.dataForm.id, | |
| 176 | + method: 'PUT', | |
| 177 | + data: this.dataForm | |
| 178 | + }).then((res) => { | |
| 179 | + this.$message({ | |
| 180 | + message: res.msg, | |
| 181 | + type: 'success', | |
| 182 | + duration: 1000, | |
| 183 | + onClose: () => { | |
| 184 | + this.visible = false | |
| 185 | + this.$emit('refresh', true) | |
| 186 | + } | |
| 187 | + }) | |
| 188 | + }) | |
| 189 | + } | |
| 190 | + } | |
| 191 | + }) | |
| 192 | + }, | |
| 193 | + } | |
| 194 | + } | |
| 195 | +</script> | ... | ... |
src/views/new/baseMisstatement/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">错误表述</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.website" placeholder="网站/账号名称" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-select v-model="query.jurisdictionType" placeholder="属事属地" > | |
| 23 | + <el-option v-for="(item, index) in jurisdictionTypeOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 24 | + </el-select> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <template v-if="showAll"> | |
| 28 | + <el-col :span="6"> | |
| 29 | + <el-form-item label=""> | |
| 30 | + <el-input v-model="query.municipalUnit" placeholder="市级单位" clearable /> | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + <el-col :span="6"> | |
| 34 | + <el-form-item label=""> | |
| 35 | + <el-input v-model="query.platform" placeholder="平台" clearable /> | |
| 36 | + </el-form-item> | |
| 37 | + </el-col> | |
| 38 | + <el-col :span="6"> | |
| 39 | + <el-form-item label=""> | |
| 40 | + <el-input v-model="query.url" placeholder="链接" clearable /> | |
| 41 | + </el-form-item> | |
| 42 | + </el-col> | |
| 43 | + <el-col :span="6"> | |
| 44 | + <el-form-item label=""> | |
| 45 | + <el-input v-model="query.incorrectWording" placeholder="错误表述" /> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="6"> | |
| 49 | + <el-form-item label=""> | |
| 50 | + <el-input v-model="query.correctWording" placeholder="正确描述" /> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + <el-col :span="6"> | |
| 54 | + <el-form-item label=""> | |
| 55 | + <el-select v-model="query.source" placeholder="来源" > | |
| 56 | + <el-option v-for="(item, index) in sourceOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 57 | + </el-select> | |
| 58 | + </el-form-item> | |
| 59 | + </el-col> | |
| 60 | + <el-col :span="6"> | |
| 61 | + <el-form-item label=""> | |
| 62 | + <el-select v-model="query.category" placeholder="分类" > | |
| 63 | + <el-option v-for="(item, index) in categoryOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 64 | + </el-select> | |
| 65 | + </el-form-item> | |
| 66 | + </el-col> | |
| 67 | + </template> | |
| 68 | + <el-col :span="6"> | |
| 69 | + <el-form-item> | |
| 70 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 71 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 72 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 73 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 74 | + </el-form-item> | |
| 75 | + </el-col> | |
| 76 | + </el-form> | |
| 77 | + </el-row> | |
| 78 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 79 | + <div class="NCC-common-head"> | |
| 80 | + <div style="display: flex;"> | |
| 81 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 82 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 83 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 84 | + <div style="margin-left: 10px;"> | |
| 85 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseMisstatement/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 86 | + <div class="avatar-box"> | |
| 87 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 88 | + </div> | |
| 89 | + </el-upload> | |
| 90 | + </div> | |
| 91 | + </div> | |
| 92 | + <div class="NCC-common-head-right"> | |
| 93 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 94 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 95 | + </el-tooltip> | |
| 96 | + <screenfull isContainer /> | |
| 97 | + </div> | |
| 98 | + </div> | |
| 99 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 100 | + <el-table-column prop="date" label="日期" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 101 | + <el-table-column prop="website" label="网站/账号名称" align="left" /> | |
| 102 | + <el-table-column label="属事属地" prop="jurisdictionType" align="left"> | |
| 103 | + <template slot-scope="scope">{{ scope.row.jurisdictionType | dynamicText(jurisdictionTypeOptions) }}</template> | |
| 104 | + </el-table-column> | |
| 105 | + <el-table-column prop="municipalUnit" label="市级单位" align="left" /> | |
| 106 | + <el-table-column prop="platform" label="平台" align="left" /> | |
| 107 | + <el-table-column prop="url" label="链接" align="left" /> | |
| 108 | + <el-table-column prop="incorrectWording" label="错误表述" align="left" /> | |
| 109 | + <el-table-column prop="correctWording" label="正确描述" align="left" /> | |
| 110 | + <el-table-column label="来源" prop="source" align="left"> | |
| 111 | + <template slot-scope="scope">{{ scope.row.source | dynamicText(sourceOptions) }}</template> | |
| 112 | + </el-table-column> | |
| 113 | + <el-table-column label="分类" prop="category" align="left"> | |
| 114 | + <template slot-scope="scope">{{ scope.row.category | dynamicText(categoryOptions) }}</template> | |
| 115 | + </el-table-column> | |
| 116 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 117 | + <template slot-scope="scope"> | |
| 118 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 119 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 120 | + </template> | |
| 121 | + </el-table-column> | |
| 122 | + </NCC-table> | |
| 123 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 124 | + </div> | |
| 125 | + </div> | |
| 126 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 127 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 128 | + </div> | |
| 129 | + </div> | |
| 130 | + </div> | |
| 131 | +</template> | |
| 132 | +<script> | |
| 133 | +import define from '@/utils/define' | |
| 134 | + import request from '@/utils/request' | |
| 135 | + import NCCForm from './Form' | |
| 136 | + import ExportBox from './ExportBox' | |
| 137 | + export default { | |
| 138 | + components: { NCCForm, ExportBox }, | |
| 139 | + data() { | |
| 140 | + return { | |
| 141 | + uploadHeaders: { | |
| 142 | + Authorization: this.$store.getters.token, | |
| 143 | + IsLogin: true, | |
| 144 | + }, | |
| 145 | + showAll: false, | |
| 146 | + query: { | |
| 147 | + date:undefined, | |
| 148 | + website:undefined, | |
| 149 | + jurisdictionType:undefined, | |
| 150 | + municipalUnit:undefined, | |
| 151 | + platform:undefined, | |
| 152 | + url:undefined, | |
| 153 | + incorrectWording:undefined, | |
| 154 | + correctWording:undefined, | |
| 155 | + source:undefined, | |
| 156 | + category:undefined, | |
| 157 | + }, | |
| 158 | + list: [], | |
| 159 | + listLoading: true, | |
| 160 | + multipleSelection: [], total: 0, | |
| 161 | + listQuery: { | |
| 162 | + currentPage: 1, | |
| 163 | + pageSize: 20, | |
| 164 | + sort: "desc", | |
| 165 | + sidx: "", | |
| 166 | + }, | |
| 167 | + formVisible: false, | |
| 168 | + exportBoxVisible: false, | |
| 169 | + columnList: [ | |
| 170 | + { prop: 'date', label: '日期' }, | |
| 171 | + { prop: 'website', label: '网站/账号名称' }, | |
| 172 | + { prop: 'jurisdictionType', label: '属事属地' }, | |
| 173 | + { prop: 'municipalUnit', label: '市级单位' }, | |
| 174 | + { prop: 'platform', label: '平台' }, | |
| 175 | + { prop: 'url', label: '链接' }, | |
| 176 | + { prop: 'incorrectWording', label: '错误表述' }, | |
| 177 | + { prop: 'correctWording', label: '正确描述' }, | |
| 178 | + { prop: 'source', label: '来源' }, | |
| 179 | + { prop: 'category', label: '分类' }, | |
| 180 | + ], | |
| 181 | + jurisdictionTypeOptions:[{"fullName":"市级单位","id":"1"},{"fullName":"属地","id":"2"}], | |
| 182 | + sourceOptions:[{"fullName":"指令","id":"1"},{"fullName":"巡查","id":"2"},{"fullName":"举报","id":"3"},{"fullName":"其他","id":"4"}], | |
| 183 | + categoryOptions:[{"fullName":"政务","id":"1"},{"fullName":"国企","id":"2"},{"fullName":"学校","id":"3"},{"fullName":"其他","id":"4"}], | |
| 184 | + } | |
| 185 | + }, | |
| 186 | + computed: {}, | |
| 187 | + created() { | |
| 188 | + this.initData() | |
| 189 | + }, | |
| 190 | + methods: { | |
| 191 | + uploadSuccess(response, file, fileList) { | |
| 192 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 193 | + this.$message({ | |
| 194 | + type: type, | |
| 195 | + message: response.msg, | |
| 196 | + }); | |
| 197 | + // this.initList(); | |
| 198 | + }, | |
| 199 | + initData() { | |
| 200 | + this.listLoading = true; | |
| 201 | + let _query = { | |
| 202 | + ...this.listQuery, | |
| 203 | + ...this.query | |
| 204 | + }; | |
| 205 | + let query = {} | |
| 206 | + for (let key in _query) { | |
| 207 | + if (Array.isArray(_query[key])) { | |
| 208 | + query[key] = _query[key].join() | |
| 209 | + } else { | |
| 210 | + query[key] = _query[key] | |
| 211 | + } | |
| 212 | + } | |
| 213 | + request({ | |
| 214 | + url: `/SubDev/BaseMisstatement`, | |
| 215 | + method: 'GET', | |
| 216 | + data: query | |
| 217 | + }).then(res => { | |
| 218 | + this.list = res.data.list | |
| 219 | + this.total = res.data.pagination.total | |
| 220 | + this.listLoading = false | |
| 221 | + }) | |
| 222 | + }, | |
| 223 | + handleDel(id) { | |
| 224 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 225 | + type: 'warning' | |
| 226 | + }).then(() => { | |
| 227 | + request({ | |
| 228 | + url: `/SubDev/BaseMisstatement/${id}`, | |
| 229 | + method: 'DELETE' | |
| 230 | + }).then(res => { | |
| 231 | + this.$message({ | |
| 232 | + type: 'success', | |
| 233 | + message: res.msg, | |
| 234 | + onClose: () => { | |
| 235 | + this.initData() | |
| 236 | + } | |
| 237 | + }); | |
| 238 | + }) | |
| 239 | + }).catch(() => { | |
| 240 | + }); | |
| 241 | + }, | |
| 242 | + addOrUpdateHandle(id, isDetail) { | |
| 243 | + this.formVisible = true | |
| 244 | + this.$nextTick(() => { | |
| 245 | + this.$refs.NCCForm.init(id, isDetail) | |
| 246 | + }) | |
| 247 | + }, | |
| 248 | + exportData(type) { | |
| 249 | + let obj = {}; | |
| 250 | + if(type) { | |
| 251 | + obj = { | |
| 252 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/18', | |
| 253 | + params: {type:18}, | |
| 254 | + method: "GET", | |
| 255 | + responseType: 'blob', | |
| 256 | + } | |
| 257 | + request(obj).then((res) => { | |
| 258 | + if(type) { | |
| 259 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 260 | + const url = window.URL.createObjectURL(blob); | |
| 261 | + let link = document.createElement('a'); | |
| 262 | + link.style.display = 'none'; | |
| 263 | + link.href = url; | |
| 264 | + link.download = '错误表述.xlsx'; | |
| 265 | + link.click(); | |
| 266 | + } else { | |
| 267 | + if(res.code != 200) return; | |
| 268 | + const url = define.APIURl + res.data.url; | |
| 269 | + const link = document.createElement("a"); | |
| 270 | + link.href = url; | |
| 271 | + link.download = res.data.name; | |
| 272 | + link.click(); | |
| 273 | + } | |
| 274 | + }) | |
| 275 | + } else { | |
| 276 | + this.exportBoxVisible = true | |
| 277 | + this.$nextTick(() => { | |
| 278 | + this.$refs.ExportBox.init(this.columnList) | |
| 279 | + }) | |
| 280 | + }; | |
| 281 | + | |
| 282 | + }, | |
| 283 | + // exportData() { | |
| 284 | + // this.exportBoxVisible = true | |
| 285 | + // this.$nextTick(() => { | |
| 286 | + // this.$refs.ExportBox.init(this.columnList) | |
| 287 | + // }) | |
| 288 | + // }, | |
| 289 | + download(data) { | |
| 290 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 291 | + request({ | |
| 292 | + url: `/SubDev/BaseMisstatement/Actions/Export`, | |
| 293 | + method: 'GET', | |
| 294 | + data: query | |
| 295 | + }).then(res => { | |
| 296 | + if (!res.data.url) return | |
| 297 | + window.location.href = this.define.comUrl + res.data.url | |
| 298 | + this.$refs.ExportBox.visible = false | |
| 299 | + this.exportBoxVisible = false | |
| 300 | + }) | |
| 301 | + }, | |
| 302 | + search() { | |
| 303 | + this.listQuery = { | |
| 304 | + currentPage: 1, | |
| 305 | + pageSize: 20, | |
| 306 | + sort: "desc", | |
| 307 | + sidx: "", | |
| 308 | + } | |
| 309 | + this.initData() | |
| 310 | + }, | |
| 311 | + refresh(isrRefresh) { | |
| 312 | + this.formVisible = false | |
| 313 | + if (isrRefresh) this.reset() | |
| 314 | + }, | |
| 315 | + reset() { | |
| 316 | + for (let key in this.query) { | |
| 317 | + this.query[key] = undefined | |
| 318 | + } | |
| 319 | + this.listQuery = { | |
| 320 | + currentPage: 1, | |
| 321 | + pageSize: 20, | |
| 322 | + sort: "desc", | |
| 323 | + sidx: "", | |
| 324 | + } | |
| 325 | + this.initData() | |
| 326 | + } | |
| 327 | + } | |
| 328 | + } | |
| 329 | +</script> | |
| 0 | 330 | \ No newline at end of file | ... | ... |
src/views/new/baseMonthlyNotificationLocalGovernance/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseMonthlyNotificationLocalGovernance/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="内容" prop="content"> | |
| 13 | + <el-input v-model="dataForm.content" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="附件" prop="annex"> | |
| 19 | + <NCC-UploadFz v-model="dataForm.annex" :fileSize="1024" sizeUnit="MB" :limit="9" buttonText="点击上传" > | |
| 20 | + </NCC-UploadFz> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + </el-form> | |
| 24 | + </el-row> | |
| 25 | + <span slot="footer" class="dialog-footer"> | |
| 26 | + <el-button @click="visible = false">取 消</el-button> | |
| 27 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 28 | + </span> | |
| 29 | + </el-dialog> | |
| 30 | +</template> | |
| 31 | +<script> | |
| 32 | + import request from '@/utils/request' | |
| 33 | + export default { | |
| 34 | + components: {}, | |
| 35 | + props: [], | |
| 36 | + data() { | |
| 37 | + return { | |
| 38 | + loading: false, | |
| 39 | + visible: false, | |
| 40 | + isDetail: false, | |
| 41 | + dataForm: { | |
| 42 | + id:'', | |
| 43 | + date:undefined, | |
| 44 | + content:undefined, | |
| 45 | + annex:[], | |
| 46 | + }, | |
| 47 | + rules: { | |
| 48 | + }, | |
| 49 | + } | |
| 50 | + }, | |
| 51 | + computed: {}, | |
| 52 | + watch: {}, | |
| 53 | + created() { | |
| 54 | + }, | |
| 55 | + mounted() { | |
| 56 | + }, | |
| 57 | + methods: { | |
| 58 | + goBack() { | |
| 59 | + this.$emit('refresh') | |
| 60 | + }, | |
| 61 | + init(id, isDetail) { | |
| 62 | + this.dataForm.id = id || 0; | |
| 63 | + this.visible = true; | |
| 64 | + this.isDetail = isDetail || false; | |
| 65 | + this.$nextTick(() => { | |
| 66 | + this.$refs['elForm'].resetFields(); | |
| 67 | + if (this.dataForm.id) { | |
| 68 | + request({ | |
| 69 | + url: '/SubDev/BaseMonthlyNotificationLocalGovernance/' + this.dataForm.id, | |
| 70 | + method: 'get' | |
| 71 | + }).then(res =>{ | |
| 72 | + this.dataForm = res.data; | |
| 73 | + if(!this.dataForm.annex)this.dataForm.annex=[]; | |
| 74 | + }) | |
| 75 | + } | |
| 76 | + }) | |
| 77 | + }, | |
| 78 | + dataFormSubmit() { | |
| 79 | + this.$refs['elForm'].validate((valid) => { | |
| 80 | + if (valid) { | |
| 81 | + if (!this.dataForm.id) { | |
| 82 | + request({ | |
| 83 | + url: `/SubDev/BaseMonthlyNotificationLocalGovernance`, | |
| 84 | + method: 'post', | |
| 85 | + data: this.dataForm, | |
| 86 | + }).then((res) => { | |
| 87 | + this.$message({ | |
| 88 | + message: res.msg, | |
| 89 | + type: 'success', | |
| 90 | + duration: 1000, | |
| 91 | + onClose: () => { | |
| 92 | + this.visible = false, | |
| 93 | + this.$emit('refresh', true) | |
| 94 | + } | |
| 95 | + }) | |
| 96 | + }) | |
| 97 | + } else { | |
| 98 | + request({ | |
| 99 | + url: '/SubDev/BaseMonthlyNotificationLocalGovernance/' + this.dataForm.id, | |
| 100 | + method: 'PUT', | |
| 101 | + data: this.dataForm | |
| 102 | + }).then((res) => { | |
| 103 | + this.$message({ | |
| 104 | + message: res.msg, | |
| 105 | + type: 'success', | |
| 106 | + duration: 1000, | |
| 107 | + onClose: () => { | |
| 108 | + this.visible = false | |
| 109 | + this.$emit('refresh', true) | |
| 110 | + } | |
| 111 | + }) | |
| 112 | + }) | |
| 113 | + } | |
| 114 | + } | |
| 115 | + }) | |
| 116 | + }, | |
| 117 | + } | |
| 118 | + } | |
| 119 | +</script> | ... | ... |
src/views/new/baseMonthlyNotificationLocalGovernance/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">月度通报-属地治理</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.content" placeholder="内容" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item> | |
| 22 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 23 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 24 | + </el-form-item> | |
| 25 | + </el-col> | |
| 26 | + </el-form> | |
| 27 | + </el-row> | |
| 28 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 29 | + <div class="NCC-common-head"> | |
| 30 | + <div style="display: flex;"> | |
| 31 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 32 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 33 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 34 | + <div style="margin-left: 10px;"> | |
| 35 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseMonthlyNotificationLocalGovernance/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 36 | + <div class="avatar-box"> | |
| 37 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 38 | + </div> | |
| 39 | + </el-upload> | |
| 40 | + </div> | |
| 41 | + </div> | |
| 42 | + <div class="NCC-common-head-right"> | |
| 43 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 44 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 45 | + </el-tooltip> | |
| 46 | + <screenfull isContainer /> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 50 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 51 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 52 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 53 | + <template slot-scope="scope"> | |
| 54 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 55 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 56 | + </template> | |
| 57 | + </el-table-column> | |
| 58 | + </NCC-table> | |
| 59 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 63 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + </div> | |
| 67 | +</template> | |
| 68 | +<script> | |
| 69 | + import request from '@/utils/request' | |
| 70 | + import NCCForm from './Form' | |
| 71 | + import ExportBox from './ExportBox' | |
| 72 | + export default { | |
| 73 | + components: { NCCForm, ExportBox }, | |
| 74 | + data() { | |
| 75 | + return { | |
| 76 | + uploadHeaders: { | |
| 77 | + Authorization: this.$store.getters.token, | |
| 78 | + IsLogin: true, | |
| 79 | + }, | |
| 80 | + query: { | |
| 81 | + date:undefined, | |
| 82 | + content:undefined, | |
| 83 | + }, | |
| 84 | + list: [], | |
| 85 | + listLoading: true, | |
| 86 | + multipleSelection: [], total: 0, | |
| 87 | + listQuery: { | |
| 88 | + currentPage: 1, | |
| 89 | + pageSize: 20, | |
| 90 | + sort: "desc", | |
| 91 | + sidx: "", | |
| 92 | + }, | |
| 93 | + formVisible: false, | |
| 94 | + exportBoxVisible: false, | |
| 95 | + columnList: [ | |
| 96 | + { prop: 'date', label: '时间' }, | |
| 97 | + { prop: 'content', label: '内容' }, | |
| 98 | + ], | |
| 99 | + } | |
| 100 | + }, | |
| 101 | + computed: {}, | |
| 102 | + created() { | |
| 103 | + this.initData() | |
| 104 | + }, | |
| 105 | + methods: { | |
| 106 | + uploadSuccess(response, file, fileList) { | |
| 107 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 108 | + this.$message({ | |
| 109 | + type: type, | |
| 110 | + message: response.msg, | |
| 111 | + }); | |
| 112 | + // this.initList(); | |
| 113 | + }, | |
| 114 | + initData() { | |
| 115 | + this.listLoading = true; | |
| 116 | + let _query = { | |
| 117 | + ...this.listQuery, | |
| 118 | + ...this.query | |
| 119 | + }; | |
| 120 | + let query = {} | |
| 121 | + for (let key in _query) { | |
| 122 | + if (Array.isArray(_query[key])) { | |
| 123 | + query[key] = _query[key].join() | |
| 124 | + } else { | |
| 125 | + query[key] = _query[key] | |
| 126 | + } | |
| 127 | + } | |
| 128 | + request({ | |
| 129 | + url: `/SubDev/BaseMonthlyNotificationLocalGovernance`, | |
| 130 | + method: 'get', | |
| 131 | + params: query | |
| 132 | + }).then(res => { | |
| 133 | + this.list = res.data.list | |
| 134 | + this.total = res.data.pagination.total | |
| 135 | + this.listLoading = false | |
| 136 | + }) | |
| 137 | + }, | |
| 138 | + handleDel(id) { | |
| 139 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 140 | + type: 'warning' | |
| 141 | + }).then(() => { | |
| 142 | + request({ | |
| 143 | + url: `/SubDev/BaseMonthlyNotificationLocalGovernance/${id}`, | |
| 144 | + method: 'DELETE' | |
| 145 | + }).then(res => { | |
| 146 | + this.$message({ | |
| 147 | + type: 'success', | |
| 148 | + message: res.msg, | |
| 149 | + onClose: () => { | |
| 150 | + this.initData() | |
| 151 | + } | |
| 152 | + }); | |
| 153 | + }) | |
| 154 | + }).catch(() => { | |
| 155 | + }); | |
| 156 | + }, | |
| 157 | + addOrUpdateHandle(id, isDetail) { | |
| 158 | + this.formVisible = true | |
| 159 | + this.$nextTick(() => { | |
| 160 | + this.$refs.NCCForm.init(id, isDetail) | |
| 161 | + }) | |
| 162 | + }, | |
| 163 | + exportData(type) { | |
| 164 | + let obj = {}; | |
| 165 | + if(type) { | |
| 166 | + obj = { | |
| 167 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/7', | |
| 168 | + params: {type:7}, | |
| 169 | + method: "GET", | |
| 170 | + responseType: 'blob', | |
| 171 | + } | |
| 172 | + request(obj).then((res) => { | |
| 173 | + if(type) { | |
| 174 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 175 | + const url = window.URL.createObjectURL(blob); | |
| 176 | + let link = document.createElement('a'); | |
| 177 | + link.style.display = 'none'; | |
| 178 | + link.href = url; | |
| 179 | + link.download = '月度通报-属地治理.xlsx'; | |
| 180 | + link.click(); | |
| 181 | + } else { | |
| 182 | + if(res.code != 200) return; | |
| 183 | + const url = define.APIURl + res.data.url; | |
| 184 | + const link = document.createElement("a"); | |
| 185 | + link.href = url; | |
| 186 | + link.download = res.data.name; | |
| 187 | + link.click(); | |
| 188 | + } | |
| 189 | + }) | |
| 190 | + } else { | |
| 191 | + this.exportBoxVisible = true | |
| 192 | + this.$nextTick(() => { | |
| 193 | + this.$refs.ExportBox.init(this.columnList) | |
| 194 | + }) | |
| 195 | + }; | |
| 196 | + | |
| 197 | + }, | |
| 198 | + // exportData() { | |
| 199 | + // this.exportBoxVisible = true | |
| 200 | + // this.$nextTick(() => { | |
| 201 | + // this.$refs.ExportBox.init(this.columnList) | |
| 202 | + // }) | |
| 203 | + // }, | |
| 204 | + download(data) { | |
| 205 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 206 | + request({ | |
| 207 | + url: `/SubDev/BaseMonthlyNotificationLocalGovernance/Actions/Export`, | |
| 208 | + method: 'get', | |
| 209 | + params: query | |
| 210 | + }).then(res => { | |
| 211 | + if (!res.data.url) return | |
| 212 | + window.location.href = this.define.comUrl + res.data.url | |
| 213 | + this.$refs.ExportBox.visible = false | |
| 214 | + this.exportBoxVisible = false | |
| 215 | + }) | |
| 216 | + }, | |
| 217 | + search() { | |
| 218 | + this.listQuery = { | |
| 219 | + currentPage: 1, | |
| 220 | + pageSize: 20, | |
| 221 | + sort: "desc", | |
| 222 | + sidx: "", | |
| 223 | + } | |
| 224 | + this.initData() | |
| 225 | + }, | |
| 226 | + refresh(isrRefresh) { | |
| 227 | + this.formVisible = false | |
| 228 | + if (isrRefresh) this.reset() | |
| 229 | + }, | |
| 230 | + reset() { | |
| 231 | + for (let key in this.query) { | |
| 232 | + this.query[key] = undefined | |
| 233 | + } | |
| 234 | + this.listQuery = { | |
| 235 | + currentPage: 1, | |
| 236 | + pageSize: 20, | |
| 237 | + sort: "desc", | |
| 238 | + sidx: "", | |
| 239 | + } | |
| 240 | + this.initData() | |
| 241 | + } | |
| 242 | + } | |
| 243 | + } | |
| 244 | +</script> | |
| 0 | 245 | \ No newline at end of file | ... | ... |
src/views/new/baseOtherWorkSituation/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseOtherWorkSituation/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="标题" prop="tittle"> | |
| 13 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="内容" prop="content"> | |
| 19 | + <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="附件" prop="annex"> | |
| 25 | + <NCC-UploadFz v-model="dataForm.annex" :fileSize="1024" sizeUnit="MB" :limit="9" buttonText="点击上传" > | |
| 26 | + </NCC-UploadFz> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + </el-form> | |
| 30 | + </el-row> | |
| 31 | + <span slot="footer" class="dialog-footer"> | |
| 32 | + <el-button @click="visible = false">取 消</el-button> | |
| 33 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 34 | + </span> | |
| 35 | + </el-dialog> | |
| 36 | +</template> | |
| 37 | +<script> | |
| 38 | + import request from '@/utils/request' | |
| 39 | + export default { | |
| 40 | + components: {}, | |
| 41 | + props: [], | |
| 42 | + data() { | |
| 43 | + return { | |
| 44 | + loading: false, | |
| 45 | + visible: false, | |
| 46 | + isDetail: false, | |
| 47 | + dataForm: { | |
| 48 | + id:'', | |
| 49 | + date:undefined, | |
| 50 | + tittle:undefined, | |
| 51 | + content:undefined, | |
| 52 | + annex:[], | |
| 53 | + }, | |
| 54 | + rules: { | |
| 55 | + }, | |
| 56 | + } | |
| 57 | + }, | |
| 58 | + computed: {}, | |
| 59 | + watch: {}, | |
| 60 | + created() { | |
| 61 | + }, | |
| 62 | + mounted() { | |
| 63 | + }, | |
| 64 | + methods: { | |
| 65 | + goBack() { | |
| 66 | + this.$emit('refresh') | |
| 67 | + }, | |
| 68 | + init(id, isDetail) { | |
| 69 | + this.dataForm.id = id || 0; | |
| 70 | + this.visible = true; | |
| 71 | + this.isDetail = isDetail || false; | |
| 72 | + this.$nextTick(() => { | |
| 73 | + this.$refs['elForm'].resetFields(); | |
| 74 | + if (this.dataForm.id) { | |
| 75 | + request({ | |
| 76 | + url: '/SubDev/BaseOtherWorkSituation/' + this.dataForm.id, | |
| 77 | + method: 'get' | |
| 78 | + }).then(res =>{ | |
| 79 | + this.dataForm = res.data; | |
| 80 | + if(!this.dataForm.annex)this.dataForm.annex=[]; | |
| 81 | + }) | |
| 82 | + } | |
| 83 | + }) | |
| 84 | + }, | |
| 85 | + dataFormSubmit() { | |
| 86 | + this.$refs['elForm'].validate((valid) => { | |
| 87 | + if (valid) { | |
| 88 | + if (!this.dataForm.id) { | |
| 89 | + request({ | |
| 90 | + url: `/SubDev/BaseOtherWorkSituation`, | |
| 91 | + method: 'post', | |
| 92 | + data: this.dataForm, | |
| 93 | + }).then((res) => { | |
| 94 | + this.$message({ | |
| 95 | + message: res.msg, | |
| 96 | + type: 'success', | |
| 97 | + duration: 1000, | |
| 98 | + onClose: () => { | |
| 99 | + this.visible = false, | |
| 100 | + this.$emit('refresh', true) | |
| 101 | + } | |
| 102 | + }) | |
| 103 | + }) | |
| 104 | + } else { | |
| 105 | + request({ | |
| 106 | + url: '/SubDev/BaseOtherWorkSituation/' + this.dataForm.id, | |
| 107 | + method: 'PUT', | |
| 108 | + data: this.dataForm | |
| 109 | + }).then((res) => { | |
| 110 | + this.$message({ | |
| 111 | + message: res.msg, | |
| 112 | + type: 'success', | |
| 113 | + duration: 1000, | |
| 114 | + onClose: () => { | |
| 115 | + this.visible = false | |
| 116 | + this.$emit('refresh', true) | |
| 117 | + } | |
| 118 | + }) | |
| 119 | + }) | |
| 120 | + } | |
| 121 | + } | |
| 122 | + }) | |
| 123 | + }, | |
| 124 | + } | |
| 125 | + } | |
| 126 | +</script> | ... | ... |
src/views/new/baseOtherWorkSituation/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">其他工作情况</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-input v-model="query.content" placeholder="内容" /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item> | |
| 27 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 28 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + </el-form> | |
| 32 | + </el-row> | |
| 33 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 34 | + <div class="NCC-common-head"> | |
| 35 | + <div style="display: flex;"> | |
| 36 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 37 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 38 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 39 | + <div style="margin-left: 10px;"> | |
| 40 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseOtherWorkSituation/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 41 | + <div class="avatar-box"> | |
| 42 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 43 | + </div> | |
| 44 | + </el-upload> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + <div class="NCC-common-head-right"> | |
| 48 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 49 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 50 | + </el-tooltip> | |
| 51 | + <screenfull isContainer /> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 55 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 56 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 57 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 58 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 59 | + <template slot-scope="scope"> | |
| 60 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 61 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 62 | + </template> | |
| 63 | + </el-table-column> | |
| 64 | + </NCC-table> | |
| 65 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 69 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | +</template> | |
| 74 | +<script> | |
| 75 | + import request from '@/utils/request' | |
| 76 | + import NCCForm from './Form' | |
| 77 | + import ExportBox from './ExportBox' | |
| 78 | + export default { | |
| 79 | + components: { NCCForm, ExportBox }, | |
| 80 | + data() { | |
| 81 | + return { | |
| 82 | + uploadHeaders: { | |
| 83 | + Authorization: this.$store.getters.token, | |
| 84 | + IsLogin: true, | |
| 85 | + }, | |
| 86 | + showAll: false, | |
| 87 | + query: { | |
| 88 | + date:undefined, | |
| 89 | + tittle:undefined, | |
| 90 | + content:undefined, | |
| 91 | + }, | |
| 92 | + list: [], | |
| 93 | + listLoading: true, | |
| 94 | + multipleSelection: [], total: 0, | |
| 95 | + listQuery: { | |
| 96 | + currentPage: 1, | |
| 97 | + pageSize: 20, | |
| 98 | + sort: "desc", | |
| 99 | + sidx: "", | |
| 100 | + }, | |
| 101 | + formVisible: false, | |
| 102 | + exportBoxVisible: false, | |
| 103 | + columnList: [ | |
| 104 | + { prop: 'date', label: '时间' }, | |
| 105 | + { prop: 'tittle', label: '标题' }, | |
| 106 | + { prop: 'content', label: '内容' }, | |
| 107 | + ], | |
| 108 | + } | |
| 109 | + }, | |
| 110 | + computed: {}, | |
| 111 | + created() { | |
| 112 | + this.initData() | |
| 113 | + }, | |
| 114 | + methods: { | |
| 115 | + uploadSuccess(response, file, fileList) { | |
| 116 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 117 | + this.$message({ | |
| 118 | + type: type, | |
| 119 | + message: response.msg, | |
| 120 | + }); | |
| 121 | + // this.initList(); | |
| 122 | + }, | |
| 123 | + initData() { | |
| 124 | + this.listLoading = true; | |
| 125 | + let _query = { | |
| 126 | + ...this.listQuery, | |
| 127 | + ...this.query | |
| 128 | + }; | |
| 129 | + let query = {} | |
| 130 | + for (let key in _query) { | |
| 131 | + if (Array.isArray(_query[key])) { | |
| 132 | + query[key] = _query[key].join() | |
| 133 | + } else { | |
| 134 | + query[key] = _query[key] | |
| 135 | + } | |
| 136 | + } | |
| 137 | + request({ | |
| 138 | + url: `/SubDev/BaseOtherWorkSituation`, | |
| 139 | + method: 'get', | |
| 140 | + params: query | |
| 141 | + }).then(res => { | |
| 142 | + this.list = res.data.list | |
| 143 | + this.total = res.data.pagination.total | |
| 144 | + this.listLoading = false | |
| 145 | + }) | |
| 146 | + }, | |
| 147 | + handleDel(id) { | |
| 148 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 149 | + type: 'warning' | |
| 150 | + }).then(() => { | |
| 151 | + request({ | |
| 152 | + url: `/SubDev/BaseOtherWorkSituation/${id}`, | |
| 153 | + method: 'DELETE' | |
| 154 | + }).then(res => { | |
| 155 | + this.$message({ | |
| 156 | + type: 'success', | |
| 157 | + message: res.msg, | |
| 158 | + onClose: () => { | |
| 159 | + this.initData() | |
| 160 | + } | |
| 161 | + }); | |
| 162 | + }) | |
| 163 | + }).catch(() => { | |
| 164 | + }); | |
| 165 | + }, | |
| 166 | + addOrUpdateHandle(id, isDetail) { | |
| 167 | + this.formVisible = true | |
| 168 | + this.$nextTick(() => { | |
| 169 | + this.$refs.NCCForm.init(id, isDetail) | |
| 170 | + }) | |
| 171 | + }, | |
| 172 | + exportData(type) { | |
| 173 | + let obj = {}; | |
| 174 | + if(type) { | |
| 175 | + obj = { | |
| 176 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/13', | |
| 177 | + params: {type:13}, | |
| 178 | + method: "GET", | |
| 179 | + responseType: 'blob', | |
| 180 | + } | |
| 181 | + request(obj).then((res) => { | |
| 182 | + if(type) { | |
| 183 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 184 | + const url = window.URL.createObjectURL(blob); | |
| 185 | + let link = document.createElement('a'); | |
| 186 | + link.style.display = 'none'; | |
| 187 | + link.href = url; | |
| 188 | + link.download = '其他工作情况.xlsx'; | |
| 189 | + link.click(); | |
| 190 | + } else { | |
| 191 | + if(res.code != 200) return; | |
| 192 | + const url = define.APIURl + res.data.url; | |
| 193 | + const link = document.createElement("a"); | |
| 194 | + link.href = url; | |
| 195 | + link.download = res.data.name; | |
| 196 | + link.click(); | |
| 197 | + } | |
| 198 | + }) | |
| 199 | + } else { | |
| 200 | + this.exportBoxVisible = true | |
| 201 | + this.$nextTick(() => { | |
| 202 | + this.$refs.ExportBox.init(this.columnList) | |
| 203 | + }) | |
| 204 | + }; | |
| 205 | + | |
| 206 | + }, | |
| 207 | + // exportData() { | |
| 208 | + // this.exportBoxVisible = true | |
| 209 | + // this.$nextTick(() => { | |
| 210 | + // this.$refs.ExportBox.init(this.columnList) | |
| 211 | + // }) | |
| 212 | + // }, | |
| 213 | + download(data) { | |
| 214 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 215 | + request({ | |
| 216 | + url: `/SubDev/BaseOtherWorkSituation/Actions/Export`, | |
| 217 | + method: 'get', | |
| 218 | + params: query | |
| 219 | + }).then(res => { | |
| 220 | + if (!res.data.url) return | |
| 221 | + window.location.href = this.define.comUrl + res.data.url | |
| 222 | + this.$refs.ExportBox.visible = false | |
| 223 | + this.exportBoxVisible = false | |
| 224 | + }) | |
| 225 | + }, | |
| 226 | + search() { | |
| 227 | + this.listQuery = { | |
| 228 | + currentPage: 1, | |
| 229 | + pageSize: 20, | |
| 230 | + sort: "desc", | |
| 231 | + sidx: "", | |
| 232 | + } | |
| 233 | + this.initData() | |
| 234 | + }, | |
| 235 | + refresh(isrRefresh) { | |
| 236 | + this.formVisible = false | |
| 237 | + if (isrRefresh) this.reset() | |
| 238 | + }, | |
| 239 | + reset() { | |
| 240 | + for (let key in this.query) { | |
| 241 | + this.query[key] = undefined | |
| 242 | + } | |
| 243 | + this.listQuery = { | |
| 244 | + currentPage: 1, | |
| 245 | + pageSize: 20, | |
| 246 | + sort: "desc", | |
| 247 | + sidx: "", | |
| 248 | + } | |
| 249 | + this.initData() | |
| 250 | + } | |
| 251 | + } | |
| 252 | + } | |
| 253 | +</script> | |
| 0 | 254 | \ No newline at end of file | ... | ... |
src/views/new/basePureFriendlyEnterpriseAssistance/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/basePureFriendlyEnterpriseAssistance/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="运营主体名称" prop="comapnyinfo"> | |
| 7 | + <el-input v-model="dataForm.comapnyinfo" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 8 | + </el-input> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="时间" prop="date"> | |
| 13 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 14 | + </el-date-picker> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="问题类型" prop="problemClass"> | |
| 19 | + <el-input v-model="dataForm.problemClass" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="情况问题" prop="situationQuestion"> | |
| 25 | + <el-input v-model="dataForm.situationQuestion" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="详情" prop="detailInfo"> | |
| 31 | + <el-input v-model="dataForm.detailInfo" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 32 | + </el-input> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + <el-col :span="24"> | |
| 36 | + <el-form-item label="工作情况" prop="workSituation"> | |
| 37 | + <el-input v-model="dataForm.workSituation" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 38 | + </el-input> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="24"> | |
| 42 | + <el-form-item label="办理进度" prop="processingProgress"> | |
| 43 | + <el-select v-model="dataForm.processingProgress" placeholder="请选择" clearable :style='{"width":"100%"}' > | |
| 44 | + <el-option v-for="(item, index) in processingProgressOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option> | |
| 45 | + </el-select> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="24"> | |
| 49 | + <el-form-item label="logo" prop="logo"> | |
| 50 | + <NCC-UploadFz v-model="dataForm.logo" :fileSize="6" sizeUnit="MB" :limit="1" buttonText="点击上传" > | |
| 51 | + </NCC-UploadFz> | |
| 52 | + </el-form-item> | |
| 53 | + </el-col> | |
| 54 | + </el-form> | |
| 55 | + </el-row> | |
| 56 | + <span slot="footer" class="dialog-footer"> | |
| 57 | + <el-button @click="visible = false">取 消</el-button> | |
| 58 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 59 | + </span> | |
| 60 | + </el-dialog> | |
| 61 | +</template> | |
| 62 | +<script> | |
| 63 | + import request from '@/utils/request' | |
| 64 | + export default { | |
| 65 | + props: [], | |
| 66 | + data() { | |
| 67 | + return { | |
| 68 | + loading: false, | |
| 69 | + visible: false, | |
| 70 | + isDetail: false, | |
| 71 | + dataForm: { | |
| 72 | + id:'', | |
| 73 | + comapnyinfo:undefined, | |
| 74 | + date:undefined, | |
| 75 | + problemClass:undefined, | |
| 76 | + situationQuestion:undefined, | |
| 77 | + detailInfo:undefined, | |
| 78 | + workSituation:undefined, | |
| 79 | + processingProgress:undefined, | |
| 80 | + logo:[], | |
| 81 | + }, | |
| 82 | + rules: { | |
| 83 | + }, | |
| 84 | + processingProgressOptions:[{"fullName":"未办理","id":"未办理"},{"fullName":"办理中 ","id":"办理中"},{"fullName":"已办理","id":"已办理"}], | |
| 85 | + } | |
| 86 | + }, | |
| 87 | + computed: {}, | |
| 88 | + watch: {}, | |
| 89 | + created() { | |
| 90 | + }, | |
| 91 | + mounted() { | |
| 92 | + }, | |
| 93 | + methods: { | |
| 94 | + goBack() { | |
| 95 | + this.$emit('refresh') | |
| 96 | + }, | |
| 97 | + init(id, isDetail) { | |
| 98 | + this.dataForm.id = id || 0; | |
| 99 | + this.visible = true; | |
| 100 | + this.isDetail = isDetail || false; | |
| 101 | + this.$nextTick(() => { | |
| 102 | + this.$refs['elForm'].resetFields(); | |
| 103 | + if (this.dataForm.id) { | |
| 104 | + request({ | |
| 105 | + url: '/SubDev/BasePureFriendlyEnterpriseAssistance/' + this.dataForm.id, | |
| 106 | + method: 'get' | |
| 107 | + }).then(res =>{ | |
| 108 | + this.dataForm = res.data; | |
| 109 | + }) | |
| 110 | + } | |
| 111 | + }) | |
| 112 | + }, | |
| 113 | + dataFormSubmit() { | |
| 114 | + this.$refs['elForm'].validate((valid) => { | |
| 115 | + if (valid) { | |
| 116 | + if (!this.dataForm.id) { | |
| 117 | + request({ | |
| 118 | + url: `/SubDev/BasePureFriendlyEnterpriseAssistance`, | |
| 119 | + method: 'post', | |
| 120 | + data: this.dataForm, | |
| 121 | + }).then((res) => { | |
| 122 | + this.$message({ | |
| 123 | + message: res.msg, | |
| 124 | + type: 'success', | |
| 125 | + duration: 1000, | |
| 126 | + onClose: () => { | |
| 127 | + this.visible = false, | |
| 128 | + this.$emit('refresh', true) | |
| 129 | + } | |
| 130 | + }) | |
| 131 | + }) | |
| 132 | + } else { | |
| 133 | + request({ | |
| 134 | + url: '/SubDev/BasePureFriendlyEnterpriseAssistance/' + this.dataForm.id, | |
| 135 | + method: 'PUT', | |
| 136 | + data: this.dataForm | |
| 137 | + }).then((res) => { | |
| 138 | + this.$message({ | |
| 139 | + message: res.msg, | |
| 140 | + type: 'success', | |
| 141 | + duration: 1000, | |
| 142 | + onClose: () => { | |
| 143 | + this.visible = false | |
| 144 | + this.$emit('refresh', true) | |
| 145 | + } | |
| 146 | + }) | |
| 147 | + }) | |
| 148 | + } | |
| 149 | + } | |
| 150 | + }) | |
| 151 | + }, | |
| 152 | + } | |
| 153 | + } | |
| 154 | +</script> | ... | ... |
src/views/new/basePureFriendlyEnterpriseAssistance/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">清亲助企</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-input v-model="query.comapnyinfo" placeholder="运营主体名称" clearable /> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label=""> | |
| 16 | + <el-input v-model="query.logo" placeholder="Logo" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label=""> | |
| 21 | + <el-input v-model="query.problemClass" placeholder="问题类型" clearable /> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <template v-if="showAll"> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item label=""> | |
| 27 | + <el-select v-model="query.processingProgress" placeholder="办理进度" clearable > | |
| 28 | + <el-option v-for="(item, index) in processingProgressOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 29 | + </el-select> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + <el-col :span="6"> | |
| 33 | + <el-form-item label=""> | |
| 34 | + <el-input v-model="query.situationQuestion" placeholder="情况问题" clearable /> | |
| 35 | + </el-form-item> | |
| 36 | + </el-col> | |
| 37 | + <el-col :span="6"> | |
| 38 | + <el-form-item label=""> | |
| 39 | + <el-input v-model="query.workSituation" placeholder="工作情况" clearable /> | |
| 40 | + </el-form-item> | |
| 41 | + </el-col> | |
| 42 | + <el-col :span="6"> | |
| 43 | + <el-form-item label=""> | |
| 44 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 45 | + </el-date-picker> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="6"> | |
| 49 | + <el-form-item label=""> | |
| 50 | + <el-input v-model="query.detailInfo" placeholder="详情" clearable /> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + </template> | |
| 54 | + <el-col :span="6"> | |
| 55 | + <el-form-item> | |
| 56 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 57 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 58 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 59 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 60 | + </el-form-item> | |
| 61 | + </el-col> | |
| 62 | + </el-form> | |
| 63 | + </el-row> | |
| 64 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 65 | + <div class="NCC-common-head"> | |
| 66 | + <div style="display: flex;"> | |
| 67 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 68 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 69 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 70 | + <div style="margin-left: 10px;"> | |
| 71 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/basePureFriendlyEnterpriseAssistance/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 72 | + <div class="avatar-box"> | |
| 73 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 74 | + </div> | |
| 75 | + </el-upload> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + <div class="NCC-common-head-right"> | |
| 79 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 80 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 81 | + </el-tooltip> | |
| 82 | + <screenfull isContainer /> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 86 | + <el-table-column prop="comapnyinfo" label="运营主体名称" align="left" /> | |
| 87 | + <el-table-column label="Logo" align="left"> | |
| 88 | + <template slot-scope="scope" v-if="scope.row.logo"> | |
| 89 | + <!-- 假设 logo 是图片的 URL --> | |
| 90 | + <img :src="parseLogoUrl(scope.row.logo)" alt="Logo" style="max-width: 100px; max-height: 100px;"> | |
| 91 | + </template> | |
| 92 | + <template slot-scope="scope" v-else> | |
| 93 | + <div>暂无</div> | |
| 94 | + </template> | |
| 95 | + </el-table-column> | |
| 96 | + <el-table-column prop="problemClass" label="问题类型" align="left" /> | |
| 97 | + <el-table-column label="办理进度" prop="processingProgress" align="left"> | |
| 98 | + </el-table-column> | |
| 99 | + <el-table-column prop="situationQuestion" label="情况问题" align="left" /> | |
| 100 | + <el-table-column prop="workSituation" label="工作情况" align="left" /> | |
| 101 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 102 | + <el-table-column prop="detailInfo" label="详情" align="left" /> | |
| 103 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 104 | + <template slot-scope="scope"> | |
| 105 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 106 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 107 | + </template> | |
| 108 | + </el-table-column> | |
| 109 | + </NCC-table> | |
| 110 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 114 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 115 | + </div> | |
| 116 | + </div> | |
| 117 | + </div> | |
| 118 | +</template> | |
| 119 | +<script> | |
| 120 | + import request from '@/utils/request' | |
| 121 | + import NCCForm from './Form' | |
| 122 | + import ExportBox from './ExportBox' | |
| 123 | + export default { | |
| 124 | + components: { NCCForm, ExportBox }, | |
| 125 | + data() { | |
| 126 | + return { | |
| 127 | + uploadHeaders: { | |
| 128 | + Authorization: this.$store.getters.token, | |
| 129 | + IsLogin: true, | |
| 130 | + }, | |
| 131 | + showAll: false, | |
| 132 | + query: { | |
| 133 | + comapnyinfo:undefined, | |
| 134 | + logo:undefined, | |
| 135 | + problemClass:undefined, | |
| 136 | + processingProgress:undefined, | |
| 137 | + situationQuestion:undefined, | |
| 138 | + workSituation:undefined, | |
| 139 | + date:undefined, | |
| 140 | + detailInfo:undefined, | |
| 141 | + }, | |
| 142 | + list: [], | |
| 143 | + listLoading: true, | |
| 144 | + multipleSelection: [], total: 0, | |
| 145 | + listQuery: { | |
| 146 | + currentPage: 1, | |
| 147 | + pageSize: 20, | |
| 148 | + sort: "desc", | |
| 149 | + sidx: "", | |
| 150 | + }, | |
| 151 | + formVisible: false, | |
| 152 | + exportBoxVisible: false, | |
| 153 | + columnList: [ | |
| 154 | + { prop: 'comapnyinfo', label: '运营主体名称' }, | |
| 155 | + { prop: 'logo', label: 'Logo' }, | |
| 156 | + { prop: 'problemClass', label: '问题类型' }, | |
| 157 | + { prop: 'processingProgress', label: '办理进度' }, | |
| 158 | + { prop: 'situationQuestion', label: '情况问题' }, | |
| 159 | + { prop: 'workSituation', label: '工作情况' }, | |
| 160 | + { prop: 'date', label: '时间' }, | |
| 161 | + { prop: 'detailInfo', label: '详情' }, | |
| 162 | + ], | |
| 163 | + processingProgressOptions:[{"fullName":"办理中","id":"0"},{"fullName":"办结","id":"1"}], | |
| 164 | + } | |
| 165 | + }, | |
| 166 | + computed: {}, | |
| 167 | + created() { | |
| 168 | + this.initData() | |
| 169 | + }, | |
| 170 | + methods: { | |
| 171 | + parseLogoUrl(logoString) { | |
| 172 | + try { | |
| 173 | + const logoObj = JSON.parse(logoString); | |
| 174 | + return logoObj[0].url || logoString; | |
| 175 | + } catch (error) { | |
| 176 | + // 如果解析失败,直接返回原始字符串 | |
| 177 | + return ''; | |
| 178 | + } | |
| 179 | + }, | |
| 180 | + uploadSuccess(response, file, fileList) { | |
| 181 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 182 | + this.$message({ | |
| 183 | + type: type, | |
| 184 | + message: response.msg, | |
| 185 | + }); | |
| 186 | + // this.initList(); | |
| 187 | + }, | |
| 188 | + initData() { | |
| 189 | + this.listLoading = true; | |
| 190 | + let _query = { | |
| 191 | + ...this.listQuery, | |
| 192 | + ...this.query | |
| 193 | + }; | |
| 194 | + let query = {} | |
| 195 | + for (let key in _query) { | |
| 196 | + if (Array.isArray(_query[key])) { | |
| 197 | + query[key] = _query[key].join() | |
| 198 | + } else { | |
| 199 | + query[key] = _query[key] | |
| 200 | + } | |
| 201 | + } | |
| 202 | + request({ | |
| 203 | + url: `/SubDev/BasePureFriendlyEnterpriseAssistance`, | |
| 204 | + method: 'get', | |
| 205 | + params: query | |
| 206 | + }).then(res => { | |
| 207 | + this.list = res.data.list | |
| 208 | + this.total = res.data.pagination.total | |
| 209 | + this.listLoading = false | |
| 210 | + }) | |
| 211 | + }, | |
| 212 | + handleDel(id) { | |
| 213 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 214 | + type: 'warning' | |
| 215 | + }).then(() => { | |
| 216 | + request({ | |
| 217 | + url: `/SubDev/BasePureFriendlyEnterpriseAssistance/${id}`, | |
| 218 | + method: 'DELETE' | |
| 219 | + }).then(res => { | |
| 220 | + this.$message({ | |
| 221 | + type: 'success', | |
| 222 | + message: res.msg, | |
| 223 | + onClose: () => { | |
| 224 | + this.initData() | |
| 225 | + } | |
| 226 | + }); | |
| 227 | + }) | |
| 228 | + }).catch(() => { | |
| 229 | + }); | |
| 230 | + }, | |
| 231 | + addOrUpdateHandle(id, isDetail) { | |
| 232 | + this.formVisible = true | |
| 233 | + this.$nextTick(() => { | |
| 234 | + this.$refs.NCCForm.init(id, isDetail) | |
| 235 | + }) | |
| 236 | + }, | |
| 237 | + exportData(type) { | |
| 238 | + let obj = {}; | |
| 239 | + if(type) { | |
| 240 | + obj = { | |
| 241 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/5', | |
| 242 | + params: {type:5}, | |
| 243 | + method: "GET", | |
| 244 | + responseType: 'blob', | |
| 245 | + } | |
| 246 | + request(obj).then((res) => { | |
| 247 | + if(type) { | |
| 248 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 249 | + const url = window.URL.createObjectURL(blob); | |
| 250 | + let link = document.createElement('a'); | |
| 251 | + link.style.display = 'none'; | |
| 252 | + link.href = url; | |
| 253 | + link.download = '清亲助企.xlsx'; | |
| 254 | + link.click(); | |
| 255 | + } else { | |
| 256 | + if(res.code != 200) return; | |
| 257 | + const url = define.APIURl + res.data.url; | |
| 258 | + const link = document.createElement("a"); | |
| 259 | + link.href = url; | |
| 260 | + link.download = res.data.name; | |
| 261 | + link.click(); | |
| 262 | + } | |
| 263 | + }) | |
| 264 | + } else { | |
| 265 | + this.exportBoxVisible = true | |
| 266 | + this.$nextTick(() => { | |
| 267 | + this.$refs.ExportBox.init(this.columnList) | |
| 268 | + }) | |
| 269 | + }; | |
| 270 | + | |
| 271 | + }, | |
| 272 | + // exportData() { | |
| 273 | + // this.exportBoxVisible = true | |
| 274 | + // this.$nextTick(() => { | |
| 275 | + // this.$refs.ExportBox.init(this.columnList) | |
| 276 | + // }) | |
| 277 | + // }, | |
| 278 | + download(data) { | |
| 279 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 280 | + request({ | |
| 281 | + url: `/SubDev/BasePureFriendlyEnterpriseAssistance/Actions/Export`, | |
| 282 | + method: 'get', | |
| 283 | + params: query | |
| 284 | + }).then(res => { | |
| 285 | + if (!res.data.url) return | |
| 286 | + window.location.href = this.define.comUrl + res.data.url | |
| 287 | + this.$refs.ExportBox.visible = false | |
| 288 | + this.exportBoxVisible = false | |
| 289 | + }) | |
| 290 | + }, | |
| 291 | + search() { | |
| 292 | + this.listQuery = { | |
| 293 | + currentPage: 1, | |
| 294 | + pageSize: 20, | |
| 295 | + sort: "desc", | |
| 296 | + sidx: "", | |
| 297 | + } | |
| 298 | + this.initData() | |
| 299 | + }, | |
| 300 | + refresh(isrRefresh) { | |
| 301 | + this.formVisible = false | |
| 302 | + if (isrRefresh) this.reset() | |
| 303 | + }, | |
| 304 | + reset() { | |
| 305 | + for (let key in this.query) { | |
| 306 | + this.query[key] = undefined | |
| 307 | + } | |
| 308 | + this.listQuery = { | |
| 309 | + currentPage: 1, | |
| 310 | + pageSize: 20, | |
| 311 | + sort: "desc", | |
| 312 | + sidx: "", | |
| 313 | + } | |
| 314 | + this.initData() | |
| 315 | + } | |
| 316 | + } | |
| 317 | + } | |
| 318 | +</script> | |
| 0 | 319 | \ No newline at end of file | ... | ... |
src/views/new/baseRecentKeyConcerns/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseRecentKeyConcerns/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="标题" prop="tittle"> | |
| 13 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="来源" prop="source"> | |
| 19 | + <el-input v-model="dataForm.source" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="内容" prop="content"> | |
| 25 | + <el-input v-model="dataForm.content" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="图片" prop="imageUrl"> | |
| 31 | + <NCC-UploadImg v-model="dataForm.imageUrl" :fileSize="5" sizeUnit="MB" :limit="9" > | |
| 32 | + </NCC-UploadImg> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + </el-form> | |
| 36 | + </el-row> | |
| 37 | + <span slot="footer" class="dialog-footer"> | |
| 38 | + <el-button @click="visible = false">取 消</el-button> | |
| 39 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 40 | + </span> | |
| 41 | + </el-dialog> | |
| 42 | +</template> | |
| 43 | +<script> | |
| 44 | + import request from '@/utils/request' | |
| 45 | + export default { | |
| 46 | + components: {}, | |
| 47 | + props: [], | |
| 48 | + data() { | |
| 49 | + return { | |
| 50 | + loading: false, | |
| 51 | + visible: false, | |
| 52 | + isDetail: false, | |
| 53 | + dataForm: { | |
| 54 | + id:'', | |
| 55 | + date:undefined, | |
| 56 | + tittle:undefined, | |
| 57 | + source:undefined, | |
| 58 | + content:undefined, | |
| 59 | + imageUrl:[], | |
| 60 | + }, | |
| 61 | + rules: { | |
| 62 | + }, | |
| 63 | + } | |
| 64 | + }, | |
| 65 | + computed: {}, | |
| 66 | + watch: {}, | |
| 67 | + created() { | |
| 68 | + }, | |
| 69 | + mounted() { | |
| 70 | + }, | |
| 71 | + methods: { | |
| 72 | + goBack() { | |
| 73 | + this.$emit('refresh') | |
| 74 | + }, | |
| 75 | + init(id, isDetail) { | |
| 76 | + this.dataForm.id = id || 0; | |
| 77 | + this.visible = true; | |
| 78 | + this.isDetail = isDetail || false; | |
| 79 | + this.$nextTick(() => { | |
| 80 | + this.$refs['elForm'].resetFields(); | |
| 81 | + if (this.dataForm.id) { | |
| 82 | + request({ | |
| 83 | + url: '/SubDev/BaseRecentKeyConcerns/' + this.dataForm.id, | |
| 84 | + method: 'get' | |
| 85 | + }).then(res =>{ | |
| 86 | + this.dataForm = res.data; | |
| 87 | + if(!this.dataForm.imageUrl)this.dataForm.imageUrl=[]; | |
| 88 | + }) | |
| 89 | + } | |
| 90 | + }) | |
| 91 | + }, | |
| 92 | + dataFormSubmit() { | |
| 93 | + this.$refs['elForm'].validate((valid) => { | |
| 94 | + if (valid) { | |
| 95 | + if (!this.dataForm.id) { | |
| 96 | + request({ | |
| 97 | + url: `/SubDev/BaseRecentKeyConcerns`, | |
| 98 | + method: 'post', | |
| 99 | + data: this.dataForm, | |
| 100 | + }).then((res) => { | |
| 101 | + this.$message({ | |
| 102 | + message: res.msg, | |
| 103 | + type: 'success', | |
| 104 | + duration: 1000, | |
| 105 | + onClose: () => { | |
| 106 | + this.visible = false, | |
| 107 | + this.$emit('refresh', true) | |
| 108 | + } | |
| 109 | + }) | |
| 110 | + }) | |
| 111 | + } else { | |
| 112 | + request({ | |
| 113 | + url: '/SubDev/BaseRecentKeyConcerns/' + this.dataForm.id, | |
| 114 | + method: 'PUT', | |
| 115 | + data: this.dataForm | |
| 116 | + }).then((res) => { | |
| 117 | + this.$message({ | |
| 118 | + message: res.msg, | |
| 119 | + type: 'success', | |
| 120 | + duration: 1000, | |
| 121 | + onClose: () => { | |
| 122 | + this.visible = false | |
| 123 | + this.$emit('refresh', true) | |
| 124 | + } | |
| 125 | + }) | |
| 126 | + }) | |
| 127 | + } | |
| 128 | + } | |
| 129 | + }) | |
| 130 | + }, | |
| 131 | + } | |
| 132 | + } | |
| 133 | +</script> | ... | ... |
src/views/new/baseRecentKeyConcerns/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">近期重点关注</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-input v-model="query.content" placeholder="内容" clearable /> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label=""> | |
| 16 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 17 | + </el-date-picker> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <el-input v-model="query.source" placeholder="来源" clearable /> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + </template> | |
| 32 | + <el-col :span="6"> | |
| 33 | + <el-form-item> | |
| 34 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 35 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 36 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 37 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-form> | |
| 41 | + </el-row> | |
| 42 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 43 | + <div class="NCC-common-head"> | |
| 44 | + <div style="display: flex;"> | |
| 45 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 46 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 47 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 48 | + <div style="margin-left: 10px;"> | |
| 49 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseRecentKeyConcerns/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 50 | + <div class="avatar-box"> | |
| 51 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 52 | + </div> | |
| 53 | + </el-upload> | |
| 54 | + </div> | |
| 55 | + </div> | |
| 56 | + <div class="NCC-common-head-right"> | |
| 57 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 58 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 59 | + </el-tooltip> | |
| 60 | + <screenfull isContainer /> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 64 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 65 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 66 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 67 | + <el-table-column prop="source" label="来源" align="left" /> | |
| 68 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 69 | + <template slot-scope="scope"> | |
| 70 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 71 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 72 | + </template> | |
| 73 | + </el-table-column> | |
| 74 | + </NCC-table> | |
| 75 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 79 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 80 | + </div> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | +</template> | |
| 84 | +<script> | |
| 85 | +import define from '@/utils/define' | |
| 86 | + import request from '@/utils/request' | |
| 87 | + import NCCForm from './Form' | |
| 88 | + import ExportBox from './ExportBox' | |
| 89 | + export default { | |
| 90 | + components: { NCCForm, ExportBox }, | |
| 91 | + data() { | |
| 92 | + return { | |
| 93 | + uploadHeaders: { | |
| 94 | + Authorization: this.$store.getters.token, | |
| 95 | + IsLogin: true, | |
| 96 | + }, | |
| 97 | + showAll: false, | |
| 98 | + query: { | |
| 99 | + content:undefined, | |
| 100 | + date:undefined, | |
| 101 | + tittle:undefined, | |
| 102 | + source:undefined, | |
| 103 | + }, | |
| 104 | + list: [], | |
| 105 | + listLoading: true, | |
| 106 | + multipleSelection: [], total: 0, | |
| 107 | + listQuery: { | |
| 108 | + currentPage: 1, | |
| 109 | + pageSize: 20, | |
| 110 | + sort: "desc", | |
| 111 | + sidx: "", | |
| 112 | + }, | |
| 113 | + formVisible: false, | |
| 114 | + exportBoxVisible: false, | |
| 115 | + columnList: [ | |
| 116 | + { prop: 'content', label: '内容' }, | |
| 117 | + { prop: 'date', label: '时间' }, | |
| 118 | + { prop: 'tittle', label: '标题' }, | |
| 119 | + { prop: 'source', label: '来源' }, | |
| 120 | + ], | |
| 121 | + } | |
| 122 | + }, | |
| 123 | + computed: {}, | |
| 124 | + created() { | |
| 125 | + this.initData() | |
| 126 | + }, | |
| 127 | + methods: { | |
| 128 | + | |
| 129 | + uploadSuccess(response, file, fileList) { | |
| 130 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 131 | + this.$message({ | |
| 132 | + type: type, | |
| 133 | + message: response.msg, | |
| 134 | + }); | |
| 135 | + // this.initList(); | |
| 136 | + }, | |
| 137 | + initData() { | |
| 138 | + this.listLoading = true; | |
| 139 | + let _query = { | |
| 140 | + ...this.listQuery, | |
| 141 | + ...this.query | |
| 142 | + }; | |
| 143 | + let query = {} | |
| 144 | + for (let key in _query) { | |
| 145 | + if (Array.isArray(_query[key])) { | |
| 146 | + query[key] = _query[key].join() | |
| 147 | + } else { | |
| 148 | + query[key] = _query[key] | |
| 149 | + } | |
| 150 | + } | |
| 151 | + request({ | |
| 152 | + url: `/SubDev/BaseRecentKeyConcerns`, | |
| 153 | + method: 'get', | |
| 154 | + params: query | |
| 155 | + }).then(res => { | |
| 156 | + this.list = res.data.list | |
| 157 | + this.total = res.data.pagination.total | |
| 158 | + this.listLoading = false | |
| 159 | + }) | |
| 160 | + }, | |
| 161 | + handleDel(id) { | |
| 162 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 163 | + type: 'warning' | |
| 164 | + }).then(() => { | |
| 165 | + request({ | |
| 166 | + url: `/SubDev/BaseRecentKeyConcerns/${id}`, | |
| 167 | + method: 'DELETE' | |
| 168 | + }).then(res => { | |
| 169 | + this.$message({ | |
| 170 | + type: 'success', | |
| 171 | + message: res.msg, | |
| 172 | + onClose: () => { | |
| 173 | + this.initData() | |
| 174 | + } | |
| 175 | + }); | |
| 176 | + }) | |
| 177 | + }).catch(() => { | |
| 178 | + }); | |
| 179 | + }, | |
| 180 | + addOrUpdateHandle(id, isDetail) { | |
| 181 | + this.formVisible = true | |
| 182 | + this.$nextTick(() => { | |
| 183 | + this.$refs.NCCForm.init(id, isDetail) | |
| 184 | + }) | |
| 185 | + }, | |
| 186 | + exportData(type) { | |
| 187 | + let obj = {}; | |
| 188 | + if(type) { | |
| 189 | + obj = { | |
| 190 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/1', | |
| 191 | + params: {type:1}, | |
| 192 | + method: "GET", | |
| 193 | + responseType: 'blob', | |
| 194 | + } | |
| 195 | + request(obj).then((res) => { | |
| 196 | + if(type) { | |
| 197 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 198 | + const url = window.URL.createObjectURL(blob); | |
| 199 | + let link = document.createElement('a'); | |
| 200 | + link.style.display = 'none'; | |
| 201 | + link.href = url; | |
| 202 | + link.download = '近期重点关注导入模板.xlsx'; | |
| 203 | + link.click(); | |
| 204 | + } else { | |
| 205 | + if(res.code != 200) return; | |
| 206 | + const url = define.APIURl + res.data.url; | |
| 207 | + const link = document.createElement("a"); | |
| 208 | + link.href = url; | |
| 209 | + link.download = res.data.name; | |
| 210 | + link.click(); | |
| 211 | + } | |
| 212 | + }) | |
| 213 | + } else { | |
| 214 | + this.exportBoxVisible = true | |
| 215 | + this.$nextTick(() => { | |
| 216 | + this.$refs.ExportBox.init(this.columnList) | |
| 217 | + }) | |
| 218 | + }; | |
| 219 | + | |
| 220 | + }, | |
| 221 | + // exportData() { | |
| 222 | + // this.exportBoxVisible = true | |
| 223 | + // this.$nextTick(() => { | |
| 224 | + // this.$refs.ExportBox.init(this.columnList) | |
| 225 | + // }) | |
| 226 | + // }, | |
| 227 | + download(data) { | |
| 228 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 229 | + request({ | |
| 230 | + url: `/SubDev/BaseRecentKeyConcerns/Actions/Export`, | |
| 231 | + method: 'get', | |
| 232 | + params: query | |
| 233 | + }).then(res => { | |
| 234 | + if (!res.data.url) return | |
| 235 | + window.location.href = this.define.comUrl + res.data.url | |
| 236 | + this.$refs.ExportBox.visible = false | |
| 237 | + this.exportBoxVisible = false | |
| 238 | + }) | |
| 239 | + }, | |
| 240 | + search() { | |
| 241 | + this.listQuery = { | |
| 242 | + currentPage: 1, | |
| 243 | + pageSize: 20, | |
| 244 | + sort: "desc", | |
| 245 | + sidx: "", | |
| 246 | + } | |
| 247 | + this.initData() | |
| 248 | + }, | |
| 249 | + refresh(isrRefresh) { | |
| 250 | + this.formVisible = false | |
| 251 | + if (isrRefresh) this.reset() | |
| 252 | + }, | |
| 253 | + reset() { | |
| 254 | + for (let key in this.query) { | |
| 255 | + this.query[key] = undefined | |
| 256 | + } | |
| 257 | + this.listQuery = { | |
| 258 | + currentPage: 1, | |
| 259 | + pageSize: 20, | |
| 260 | + sort: "desc", | |
| 261 | + sidx: "", | |
| 262 | + } | |
| 263 | + this.initData() | |
| 264 | + } | |
| 265 | + } | |
| 266 | + } | |
| 267 | +</script> | |
| 0 | 268 | \ No newline at end of file | ... | ... |
src/views/new/baseReportHarmfulPoliticalInformation/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseReportHarmfulPoliticalInformation/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="排查量" prop="investigationVolume"> | |
| 13 | + <el-input-number v-model="dataForm.investigationVolume" placeholder="数字文本" :step="1" > | |
| 14 | + </el-input-number> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="上报量" prop="reportingVolume"> | |
| 19 | + <el-input-number v-model="dataForm.reportingVolume" placeholder="数字文本" :step="1" > | |
| 20 | + </el-input-number> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="附件" prop="annex"> | |
| 25 | + <NCC-UploadFz v-model="dataForm.annex" :fileSize="1024" sizeUnit="MB" :limit="9" buttonText="点击上传" > | |
| 26 | + </NCC-UploadFz> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="操作" prop="operation"> | |
| 31 | + <el-input v-model="dataForm.operation" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 32 | + </el-input> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + <el-col :span="24"> | |
| 36 | + <el-form-item label="备注" prop="remark"> | |
| 37 | + <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 38 | + </el-input> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="24"> | |
| 42 | + <el-form-item label="标题" prop="tittle"> | |
| 43 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 44 | + </el-input> | |
| 45 | + </el-form-item> | |
| 46 | + </el-col> | |
| 47 | + <el-col :span="24"> | |
| 48 | + <el-form-item label="内容" prop="content"> | |
| 49 | + <el-input v-model="dataForm.content" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 50 | + </el-input> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + </el-form> | |
| 54 | + </el-row> | |
| 55 | + <span slot="footer" class="dialog-footer"> | |
| 56 | + <el-button @click="visible = false">取 消</el-button> | |
| 57 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 58 | + </span> | |
| 59 | + </el-dialog> | |
| 60 | +</template> | |
| 61 | +<script> | |
| 62 | + import request from '@/utils/request' | |
| 63 | + export default { | |
| 64 | + components: {}, | |
| 65 | + props: [], | |
| 66 | + data() { | |
| 67 | + return { | |
| 68 | + loading: false, | |
| 69 | + visible: false, | |
| 70 | + isDetail: false, | |
| 71 | + dataForm: { | |
| 72 | + id:'', | |
| 73 | + date:undefined, | |
| 74 | + investigationVolume:undefined, | |
| 75 | + reportingVolume:undefined, | |
| 76 | + annex:[], | |
| 77 | + operation:undefined, | |
| 78 | + remark:undefined, | |
| 79 | + tittle:undefined, | |
| 80 | + content:undefined, | |
| 81 | + }, | |
| 82 | + rules: { | |
| 83 | + }, | |
| 84 | + } | |
| 85 | + }, | |
| 86 | + computed: {}, | |
| 87 | + watch: {}, | |
| 88 | + created() { | |
| 89 | + }, | |
| 90 | + mounted() { | |
| 91 | + }, | |
| 92 | + methods: { | |
| 93 | + goBack() { | |
| 94 | + this.$emit('refresh') | |
| 95 | + }, | |
| 96 | + init(id, isDetail) { | |
| 97 | + this.dataForm.id = id || 0; | |
| 98 | + this.visible = true; | |
| 99 | + this.isDetail = isDetail || false; | |
| 100 | + this.$nextTick(() => { | |
| 101 | + this.$refs['elForm'].resetFields(); | |
| 102 | + if (this.dataForm.id) { | |
| 103 | + request({ | |
| 104 | + url: '/SubDev/BaseReportHarmfulPoliticalInformation/' + this.dataForm.id, | |
| 105 | + method: 'get' | |
| 106 | + }).then(res =>{ | |
| 107 | + this.dataForm = res.data; | |
| 108 | + if(!this.dataForm.annex)this.dataForm.annex=[]; | |
| 109 | + }) | |
| 110 | + } | |
| 111 | + }) | |
| 112 | + }, | |
| 113 | + dataFormSubmit() { | |
| 114 | + this.$refs['elForm'].validate((valid) => { | |
| 115 | + if (valid) { | |
| 116 | + if (!this.dataForm.id) { | |
| 117 | + request({ | |
| 118 | + url: `/SubDev/BaseReportHarmfulPoliticalInformation`, | |
| 119 | + method: 'post', | |
| 120 | + data: this.dataForm, | |
| 121 | + }).then((res) => { | |
| 122 | + this.$message({ | |
| 123 | + message: res.msg, | |
| 124 | + type: 'success', | |
| 125 | + duration: 1000, | |
| 126 | + onClose: () => { | |
| 127 | + this.visible = false, | |
| 128 | + this.$emit('refresh', true) | |
| 129 | + } | |
| 130 | + }) | |
| 131 | + }) | |
| 132 | + } else { | |
| 133 | + request({ | |
| 134 | + url: '/SubDev/BaseReportHarmfulPoliticalInformation/' + this.dataForm.id, | |
| 135 | + method: 'PUT', | |
| 136 | + data: this.dataForm | |
| 137 | + }).then((res) => { | |
| 138 | + this.$message({ | |
| 139 | + message: res.msg, | |
| 140 | + type: 'success', | |
| 141 | + duration: 1000, | |
| 142 | + onClose: () => { | |
| 143 | + this.visible = false | |
| 144 | + this.$emit('refresh', true) | |
| 145 | + } | |
| 146 | + }) | |
| 147 | + }) | |
| 148 | + } | |
| 149 | + } | |
| 150 | + }) | |
| 151 | + }, | |
| 152 | + } | |
| 153 | + } | |
| 154 | +</script> | ... | ... |
src/views/new/baseReportHarmfulPoliticalInformation/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">上报涉政有害信息</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label=""> | |
| 16 | + <el-input v-model="query.content" placeholder="内容" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label=""> | |
| 21 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 22 | + </el-date-picker> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <num-range v-model="query.investigationVolume"></num-range> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item label=""> | |
| 33 | + <num-range v-model="query.reportingVolume"></num-range> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + <el-col :span="6"> | |
| 37 | + <el-form-item label=""> | |
| 38 | + <el-input v-model="query.operation" placeholder="操作" clearable /> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="6"> | |
| 42 | + <el-form-item label=""> | |
| 43 | + <el-input v-model="query.remark" placeholder="备注" clearable /> | |
| 44 | + </el-form-item> | |
| 45 | + </el-col> | |
| 46 | + </template> | |
| 47 | + <el-col :span="6"> | |
| 48 | + <el-form-item> | |
| 49 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 50 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 51 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 52 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 53 | + </el-form-item> | |
| 54 | + </el-col> | |
| 55 | + </el-form> | |
| 56 | + </el-row> | |
| 57 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 58 | + <div class="NCC-common-head"> | |
| 59 | + <div style="display: flex;"> | |
| 60 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 61 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 62 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 63 | + <div style="margin-left: 10px;"> | |
| 64 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseReportHarmfulPoliticalInformation/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 65 | + <div class="avatar-box"> | |
| 66 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 67 | + </div> | |
| 68 | + </el-upload> | |
| 69 | + </div> | |
| 70 | + </div> | |
| 71 | + <div class="NCC-common-head-right"> | |
| 72 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 73 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 74 | + </el-tooltip> | |
| 75 | + <screenfull isContainer /> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 79 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 80 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 81 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 82 | + <el-table-column prop="investigationVolume" label="排查量" align="left" /> | |
| 83 | + <el-table-column prop="reportingVolume" label="上报量" align="left" /> | |
| 84 | + <el-table-column prop="operation" label="操作" align="left" /> | |
| 85 | + <el-table-column prop="remark" label="备注" align="left" /> | |
| 86 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 87 | + <template slot-scope="scope"> | |
| 88 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 89 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 90 | + </template> | |
| 91 | + </el-table-column> | |
| 92 | + </NCC-table> | |
| 93 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 94 | + </div> | |
| 95 | + </div> | |
| 96 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 97 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 98 | + </div> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | +</template> | |
| 102 | +<script> | |
| 103 | +import define from '@/utils/define' | |
| 104 | + import request from '@/utils/request' | |
| 105 | + import NCCForm from './Form' | |
| 106 | + import ExportBox from './ExportBox' | |
| 107 | + export default { | |
| 108 | + components: { NCCForm, ExportBox }, | |
| 109 | + data() { | |
| 110 | + return { | |
| 111 | + uploadHeaders: { | |
| 112 | + Authorization: this.$store.getters.token, | |
| 113 | + IsLogin: true, | |
| 114 | + }, | |
| 115 | + showAll: false, | |
| 116 | + query: { | |
| 117 | + tittle:undefined, | |
| 118 | + content:undefined, | |
| 119 | + date:undefined, | |
| 120 | + investigationVolume:undefined, | |
| 121 | + reportingVolume:undefined, | |
| 122 | + operation:undefined, | |
| 123 | + remark:undefined, | |
| 124 | + }, | |
| 125 | + list: [], | |
| 126 | + listLoading: true, | |
| 127 | + multipleSelection: [], total: 0, | |
| 128 | + listQuery: { | |
| 129 | + currentPage: 1, | |
| 130 | + pageSize: 20, | |
| 131 | + sort: "desc", | |
| 132 | + sidx: "", | |
| 133 | + }, | |
| 134 | + formVisible: false, | |
| 135 | + exportBoxVisible: false, | |
| 136 | + columnList: [ | |
| 137 | + { prop: 'tittle', label: '标题' }, | |
| 138 | + { prop: 'content', label: '内容' }, | |
| 139 | + { prop: 'date', label: '时间' }, | |
| 140 | + { prop: 'investigationVolume', label: '排查量' }, | |
| 141 | + { prop: 'reportingVolume', label: '上报量' }, | |
| 142 | + { prop: 'operation', label: '操作' }, | |
| 143 | + { prop: 'remark', label: '备注' }, | |
| 144 | + ], | |
| 145 | + } | |
| 146 | + }, | |
| 147 | + computed: {}, | |
| 148 | + created() { | |
| 149 | + this.initData() | |
| 150 | + }, | |
| 151 | + methods: { | |
| 152 | + uploadSuccess(response, file, fileList) { | |
| 153 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 154 | + this.$message({ | |
| 155 | + type: type, | |
| 156 | + message: response.msg, | |
| 157 | + }); | |
| 158 | + // this.initList(); | |
| 159 | + }, | |
| 160 | + initData() { | |
| 161 | + this.listLoading = true; | |
| 162 | + let _query = { | |
| 163 | + ...this.listQuery, | |
| 164 | + ...this.query | |
| 165 | + }; | |
| 166 | + let query = {} | |
| 167 | + for (let key in _query) { | |
| 168 | + if (Array.isArray(_query[key])) { | |
| 169 | + query[key] = _query[key].join() | |
| 170 | + } else { | |
| 171 | + query[key] = _query[key] | |
| 172 | + } | |
| 173 | + } | |
| 174 | + request({ | |
| 175 | + url: `/SubDev/BaseReportHarmfulPoliticalInformation`, | |
| 176 | + method: 'get', | |
| 177 | + params: query | |
| 178 | + }).then(res => { | |
| 179 | + this.list = res.data.list | |
| 180 | + this.total = res.data.pagination.total | |
| 181 | + this.listLoading = false | |
| 182 | + }) | |
| 183 | + }, | |
| 184 | + handleDel(id) { | |
| 185 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 186 | + type: 'warning' | |
| 187 | + }).then(() => { | |
| 188 | + request({ | |
| 189 | + url: `/SubDev/BaseReportHarmfulPoliticalInformation/${id}`, | |
| 190 | + method: 'DELETE' | |
| 191 | + }).then(res => { | |
| 192 | + this.$message({ | |
| 193 | + type: 'success', | |
| 194 | + message: res.msg, | |
| 195 | + onClose: () => { | |
| 196 | + this.initData() | |
| 197 | + } | |
| 198 | + }); | |
| 199 | + }) | |
| 200 | + }).catch(() => { | |
| 201 | + }); | |
| 202 | + }, | |
| 203 | + addOrUpdateHandle(id, isDetail) { | |
| 204 | + this.formVisible = true | |
| 205 | + this.$nextTick(() => { | |
| 206 | + this.$refs.NCCForm.init(id, isDetail) | |
| 207 | + }) | |
| 208 | + }, | |
| 209 | + exportData(type) { | |
| 210 | + let obj = {}; | |
| 211 | + if(type) { | |
| 212 | + obj = { | |
| 213 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/3', | |
| 214 | + params: {type:3}, | |
| 215 | + method: "GET", | |
| 216 | + responseType: 'blob', | |
| 217 | + } | |
| 218 | + request(obj).then((res) => { | |
| 219 | + if(type) { | |
| 220 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 221 | + const url = window.URL.createObjectURL(blob); | |
| 222 | + let link = document.createElement('a'); | |
| 223 | + link.style.display = 'none'; | |
| 224 | + link.href = url; | |
| 225 | + link.download = '上报涉政有害信息.xlsx'; | |
| 226 | + link.click(); | |
| 227 | + } else { | |
| 228 | + if(res.code != 200) return; | |
| 229 | + const url = define.APIURl + res.data.url; | |
| 230 | + const link = document.createElement("a"); | |
| 231 | + link.href = url; | |
| 232 | + link.download = res.data.name; | |
| 233 | + link.click(); | |
| 234 | + } | |
| 235 | + }) | |
| 236 | + } else { | |
| 237 | + this.exportBoxVisible = true | |
| 238 | + this.$nextTick(() => { | |
| 239 | + this.$refs.ExportBox.init(this.columnList) | |
| 240 | + }) | |
| 241 | + }; | |
| 242 | + | |
| 243 | + }, | |
| 244 | + // exportData() { | |
| 245 | + // this.exportBoxVisible = true | |
| 246 | + // this.$nextTick(() => { | |
| 247 | + // this.$refs.ExportBox.init(this.columnList) | |
| 248 | + // }) | |
| 249 | + // }, | |
| 250 | + download(data) { | |
| 251 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 252 | + request({ | |
| 253 | + url: `/SubDev/BaseReportHarmfulPoliticalInformation/Actions/Export`, | |
| 254 | + method: 'get', | |
| 255 | + params: query | |
| 256 | + }).then(res => { | |
| 257 | + if (!res.data.url) return | |
| 258 | + window.location.href = this.define.comUrl + res.data.url | |
| 259 | + this.$refs.ExportBox.visible = false | |
| 260 | + this.exportBoxVisible = false | |
| 261 | + }) | |
| 262 | + }, | |
| 263 | + search() { | |
| 264 | + this.listQuery = { | |
| 265 | + currentPage: 1, | |
| 266 | + pageSize: 20, | |
| 267 | + sort: "desc", | |
| 268 | + sidx: "", | |
| 269 | + } | |
| 270 | + this.initData() | |
| 271 | + }, | |
| 272 | + refresh(isrRefresh) { | |
| 273 | + this.formVisible = false | |
| 274 | + if (isrRefresh) this.reset() | |
| 275 | + }, | |
| 276 | + reset() { | |
| 277 | + for (let key in this.query) { | |
| 278 | + this.query[key] = undefined | |
| 279 | + } | |
| 280 | + this.listQuery = { | |
| 281 | + currentPage: 1, | |
| 282 | + pageSize: 20, | |
| 283 | + sort: "desc", | |
| 284 | + sidx: "", | |
| 285 | + } | |
| 286 | + this.initData() | |
| 287 | + } | |
| 288 | + } | |
| 289 | + } | |
| 290 | +</script> | |
| 0 | 291 | \ No newline at end of file | ... | ... |
src/views/new/baseReportPornAndGamblingWebsitesInCustoms/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseReportPornAndGamblingWebsitesInCustoms/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="备案号" prop="recordNumber"> | |
| 13 | + <el-input v-model="dataForm.recordNumber" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="域名" prop="domainName"> | |
| 19 | + <el-input v-model="dataForm.domainName" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="域名解析" prop="dns"> | |
| 25 | + <el-input v-model="dataForm.dns" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="接入地" prop="accessLocation"> | |
| 31 | + <el-input v-model="dataForm.accessLocation" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 32 | + </el-input> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + <el-col :span="24"> | |
| 36 | + <el-form-item label="违法违规事项" prop="illegalAndViolationMatters"> | |
| 37 | + <el-input v-model="dataForm.illegalAndViolationMatters" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 38 | + </el-input> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="24"> | |
| 42 | + <el-form-item label="内容" prop="content"> | |
| 43 | + <el-input v-model="dataForm.content" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 44 | + </el-input> | |
| 45 | + </el-form-item> | |
| 46 | + </el-col> | |
| 47 | + <el-col :span="24"> | |
| 48 | + <el-form-item label="标题" prop="tittle"> | |
| 49 | + <el-input v-model="dataForm.tittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 50 | + </el-input> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + </el-form> | |
| 54 | + </el-row> | |
| 55 | + <span slot="footer" class="dialog-footer"> | |
| 56 | + <el-button @click="visible = false">取 消</el-button> | |
| 57 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 58 | + </span> | |
| 59 | + </el-dialog> | |
| 60 | +</template> | |
| 61 | +<script> | |
| 62 | + import request from '@/utils/request' | |
| 63 | + export default { | |
| 64 | + components: {}, | |
| 65 | + props: [], | |
| 66 | + data() { | |
| 67 | + return { | |
| 68 | + loading: false, | |
| 69 | + visible: false, | |
| 70 | + isDetail: false, | |
| 71 | + dataForm: { | |
| 72 | + id:'', | |
| 73 | + date:undefined, | |
| 74 | + recordNumber:undefined, | |
| 75 | + domainName:undefined, | |
| 76 | + dns:undefined, | |
| 77 | + accessLocation:undefined, | |
| 78 | + illegalAndViolationMatters:undefined, | |
| 79 | + content:undefined, | |
| 80 | + tittle:undefined, | |
| 81 | + }, | |
| 82 | + rules: { | |
| 83 | + }, | |
| 84 | + } | |
| 85 | + }, | |
| 86 | + computed: {}, | |
| 87 | + watch: {}, | |
| 88 | + created() { | |
| 89 | + }, | |
| 90 | + mounted() { | |
| 91 | + }, | |
| 92 | + methods: { | |
| 93 | + goBack() { | |
| 94 | + this.$emit('refresh') | |
| 95 | + }, | |
| 96 | + init(id, isDetail) { | |
| 97 | + this.dataForm.id = id || 0; | |
| 98 | + this.visible = true; | |
| 99 | + this.isDetail = isDetail || false; | |
| 100 | + this.$nextTick(() => { | |
| 101 | + this.$refs['elForm'].resetFields(); | |
| 102 | + if (this.dataForm.id) { | |
| 103 | + request({ | |
| 104 | + url: '/SubDev/BaseReportPornAndGamblingWebsitesInCustoms/' + this.dataForm.id, | |
| 105 | + method: 'get' | |
| 106 | + }).then(res =>{ | |
| 107 | + this.dataForm = res.data; | |
| 108 | + }) | |
| 109 | + } | |
| 110 | + }) | |
| 111 | + }, | |
| 112 | + dataFormSubmit() { | |
| 113 | + this.$refs['elForm'].validate((valid) => { | |
| 114 | + if (valid) { | |
| 115 | + if (!this.dataForm.id) { | |
| 116 | + request({ | |
| 117 | + url: `/SubDev/BaseReportPornAndGamblingWebsitesInCustoms`, | |
| 118 | + method: 'post', | |
| 119 | + data: this.dataForm, | |
| 120 | + }).then((res) => { | |
| 121 | + this.$message({ | |
| 122 | + message: res.msg, | |
| 123 | + type: 'success', | |
| 124 | + duration: 1000, | |
| 125 | + onClose: () => { | |
| 126 | + this.visible = false, | |
| 127 | + this.$emit('refresh', true) | |
| 128 | + } | |
| 129 | + }) | |
| 130 | + }) | |
| 131 | + } else { | |
| 132 | + request({ | |
| 133 | + url: '/SubDev/BaseReportPornAndGamblingWebsitesInCustoms/' + this.dataForm.id, | |
| 134 | + method: 'PUT', | |
| 135 | + data: this.dataForm | |
| 136 | + }).then((res) => { | |
| 137 | + this.$message({ | |
| 138 | + message: res.msg, | |
| 139 | + type: 'success', | |
| 140 | + duration: 1000, | |
| 141 | + onClose: () => { | |
| 142 | + this.visible = false | |
| 143 | + this.$emit('refresh', true) | |
| 144 | + } | |
| 145 | + }) | |
| 146 | + }) | |
| 147 | + } | |
| 148 | + } | |
| 149 | + }) | |
| 150 | + }, | |
| 151 | + } | |
| 152 | + } | |
| 153 | +</script> | ... | ... |
src/views/new/baseReportPornAndGamblingWebsitesInCustoms/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">报关涉黄涉赌网站</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-input v-model="query.tittle" placeholder="标题" clearable /> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label=""> | |
| 16 | + <el-input v-model="query.content" placeholder="内容" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label=""> | |
| 21 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 22 | + </el-date-picker> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <el-input v-model="query.recordNumber" placeholder="备案号" clearable /> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item label=""> | |
| 33 | + <el-input v-model="query.domainName" placeholder="域名" clearable /> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + <el-col :span="6"> | |
| 37 | + <el-form-item label=""> | |
| 38 | + <el-input v-model="query.dns" placeholder="域名解析" clearable /> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="6"> | |
| 42 | + <el-form-item label=""> | |
| 43 | + <el-input v-model="query.accessLocation" placeholder="接入地" clearable /> | |
| 44 | + </el-form-item> | |
| 45 | + </el-col> | |
| 46 | + <el-col :span="6"> | |
| 47 | + <el-form-item label=""> | |
| 48 | + <el-input v-model="query.illegalAndViolationMatters" placeholder="违法违规事项" clearable /> | |
| 49 | + </el-form-item> | |
| 50 | + </el-col> | |
| 51 | + </template> | |
| 52 | + <el-col :span="6"> | |
| 53 | + <el-form-item> | |
| 54 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 55 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 56 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 57 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 58 | + </el-form-item> | |
| 59 | + </el-col> | |
| 60 | + </el-form> | |
| 61 | + </el-row> | |
| 62 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 63 | + <div class="NCC-common-head"> | |
| 64 | + <div style="display: flex;"> | |
| 65 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 66 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 67 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 68 | + <div style="margin-left: 10px;"> | |
| 69 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseReportPornAndGamblingWebsitesInCustoms/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 70 | + <div class="avatar-box"> | |
| 71 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 72 | + </div> | |
| 73 | + </el-upload> | |
| 74 | + </div> | |
| 75 | + </div> | |
| 76 | + <div class="NCC-common-head-right"> | |
| 77 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 78 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 79 | + </el-tooltip> | |
| 80 | + <screenfull isContainer /> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | + <!-- <div class="NCC-common-head"> | |
| 84 | + <div> | |
| 85 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 86 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 87 | + </div> | |
| 88 | + <div class="NCC-common-head-right"> | |
| 89 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 90 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 91 | + </el-tooltip> | |
| 92 | + <screenfull isContainer /> | |
| 93 | + </div> | |
| 94 | + </div> --> | |
| 95 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 96 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 97 | + <el-table-column prop="recordNumber" label="备案号" align="left" /> | |
| 98 | + <el-table-column prop="domainName" label="域名" align="left" /> | |
| 99 | + <el-table-column prop="dns" label="域名解析" align="left" /> | |
| 100 | + <el-table-column prop="accessLocation" label="接入地" align="left" /> | |
| 101 | + <el-table-column prop="illegalAndViolationMatters" label="违法违规事项" align="left" /> | |
| 102 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 103 | + <el-table-column prop="tittle" label="标题" align="left" /> | |
| 104 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 105 | + <template slot-scope="scope"> | |
| 106 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 107 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 108 | + </template> | |
| 109 | + </el-table-column> | |
| 110 | + </NCC-table> | |
| 111 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 112 | + </div> | |
| 113 | + </div> | |
| 114 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 115 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 116 | + </div> | |
| 117 | + </div> | |
| 118 | + </div> | |
| 119 | +</template> | |
| 120 | +<script> | |
| 121 | +import define from '@/utils/define' | |
| 122 | + import request from '@/utils/request' | |
| 123 | + import NCCForm from './Form' | |
| 124 | + import ExportBox from './ExportBox' | |
| 125 | + export default { | |
| 126 | + components: { NCCForm, ExportBox }, | |
| 127 | + data() { | |
| 128 | + return { | |
| 129 | + uploadHeaders: { | |
| 130 | + Authorization: this.$store.getters.token, | |
| 131 | + IsLogin: true, | |
| 132 | + }, | |
| 133 | + showAll: false, | |
| 134 | + query: { | |
| 135 | + tittle:undefined, | |
| 136 | + content:undefined, | |
| 137 | + date:undefined, | |
| 138 | + recordNumber:undefined, | |
| 139 | + domainName:undefined, | |
| 140 | + dns:undefined, | |
| 141 | + accessLocation:undefined, | |
| 142 | + illegalAndViolationMatters:undefined, | |
| 143 | + }, | |
| 144 | + list: [], | |
| 145 | + listLoading: true, | |
| 146 | + multipleSelection: [], total: 0, | |
| 147 | + listQuery: { | |
| 148 | + currentPage: 1, | |
| 149 | + pageSize: 20, | |
| 150 | + sort: "desc", | |
| 151 | + sidx: "", | |
| 152 | + }, | |
| 153 | + formVisible: false, | |
| 154 | + exportBoxVisible: false, | |
| 155 | + columnList: [ | |
| 156 | + { prop: 'date', label: '时间' }, | |
| 157 | + { prop: 'recordNumber', label: '备案号' }, | |
| 158 | + { prop: 'domainName', label: '域名' }, | |
| 159 | + { prop: 'dns', label: '域名解析' }, | |
| 160 | + { prop: 'accessLocation', label: '接入地' }, | |
| 161 | + { prop: 'illegalAndViolationMatters', label: '违法违规事项' }, | |
| 162 | + { prop: 'content', label: '内容' }, | |
| 163 | + { prop: 'tittle', label: '标题' }, | |
| 164 | + ], | |
| 165 | + } | |
| 166 | + }, | |
| 167 | + computed: {}, | |
| 168 | + created() { | |
| 169 | + this.initData() | |
| 170 | + }, | |
| 171 | + methods: { | |
| 172 | + uploadSuccess(response, file, fileList) { | |
| 173 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 174 | + this.$message({ | |
| 175 | + type: type, | |
| 176 | + message: response.msg, | |
| 177 | + }); | |
| 178 | + // this.initList(); | |
| 179 | + }, | |
| 180 | + initData() { | |
| 181 | + this.listLoading = true; | |
| 182 | + let _query = { | |
| 183 | + ...this.listQuery, | |
| 184 | + ...this.query | |
| 185 | + }; | |
| 186 | + let query = {} | |
| 187 | + for (let key in _query) { | |
| 188 | + if (Array.isArray(_query[key])) { | |
| 189 | + query[key] = _query[key].join() | |
| 190 | + } else { | |
| 191 | + query[key] = _query[key] | |
| 192 | + } | |
| 193 | + } | |
| 194 | + request({ | |
| 195 | + url: `/SubDev/BaseReportPornAndGamblingWebsitesInCustoms`, | |
| 196 | + method: 'get', | |
| 197 | + params: query | |
| 198 | + }).then(res => { | |
| 199 | + this.list = res.data.list | |
| 200 | + this.total = res.data.pagination.total | |
| 201 | + this.listLoading = false | |
| 202 | + }) | |
| 203 | + }, | |
| 204 | + handleDel(id) { | |
| 205 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 206 | + type: 'warning' | |
| 207 | + }).then(() => { | |
| 208 | + request({ | |
| 209 | + url: `/SubDev/BaseReportPornAndGamblingWebsitesInCustoms/${id}`, | |
| 210 | + method: 'DELETE' | |
| 211 | + }).then(res => { | |
| 212 | + this.$message({ | |
| 213 | + type: 'success', | |
| 214 | + message: res.msg, | |
| 215 | + onClose: () => { | |
| 216 | + this.initData() | |
| 217 | + } | |
| 218 | + }); | |
| 219 | + }) | |
| 220 | + }).catch(() => { | |
| 221 | + }); | |
| 222 | + }, | |
| 223 | + addOrUpdateHandle(id, isDetail) { | |
| 224 | + this.formVisible = true | |
| 225 | + this.$nextTick(() => { | |
| 226 | + this.$refs.NCCForm.init(id, isDetail) | |
| 227 | + }) | |
| 228 | + }, | |
| 229 | + exportData(type) { | |
| 230 | + let obj = {}; | |
| 231 | + if(type) { | |
| 232 | + obj = { | |
| 233 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/2', | |
| 234 | + params: {type:2}, | |
| 235 | + method: "GET", | |
| 236 | + responseType: 'blob', | |
| 237 | + } | |
| 238 | + request(obj).then((res) => { | |
| 239 | + if(type) { | |
| 240 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 241 | + const url = window.URL.createObjectURL(blob); | |
| 242 | + let link = document.createElement('a'); | |
| 243 | + link.style.display = 'none'; | |
| 244 | + link.href = url; | |
| 245 | + link.download = '报关涉黄涉赌网站.xlsx'; | |
| 246 | + link.click(); | |
| 247 | + } else { | |
| 248 | + if(res.code != 200) return; | |
| 249 | + const url = define.APIURl + res.data.url; | |
| 250 | + const link = document.createElement("a"); | |
| 251 | + link.href = url; | |
| 252 | + link.download = res.data.name; | |
| 253 | + link.click(); | |
| 254 | + } | |
| 255 | + }) | |
| 256 | + } else { | |
| 257 | + this.exportBoxVisible = true | |
| 258 | + this.$nextTick(() => { | |
| 259 | + this.$refs.ExportBox.init(this.columnList) | |
| 260 | + }) | |
| 261 | + }; | |
| 262 | + | |
| 263 | + }, | |
| 264 | + // exportData() { | |
| 265 | + // this.exportBoxVisible = true | |
| 266 | + // this.$nextTick(() => { | |
| 267 | + // this.$refs.ExportBox.init(this.columnList) | |
| 268 | + // }) | |
| 269 | + // }, | |
| 270 | + download(data) { | |
| 271 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 272 | + request({ | |
| 273 | + url: `/SubDev/BaseReportPornAndGamblingWebsitesInCustoms/Actions/Export`, | |
| 274 | + method: 'get', | |
| 275 | + params: query | |
| 276 | + }).then(res => { | |
| 277 | + if (!res.data.url) return | |
| 278 | + window.location.href = this.define.comUrl + res.data.url | |
| 279 | + this.$refs.ExportBox.visible = false | |
| 280 | + this.exportBoxVisible = false | |
| 281 | + }) | |
| 282 | + }, | |
| 283 | + search() { | |
| 284 | + this.listQuery = { | |
| 285 | + currentPage: 1, | |
| 286 | + pageSize: 20, | |
| 287 | + sort: "desc", | |
| 288 | + sidx: "", | |
| 289 | + } | |
| 290 | + this.initData() | |
| 291 | + }, | |
| 292 | + refresh(isrRefresh) { | |
| 293 | + this.formVisible = false | |
| 294 | + if (isrRefresh) this.reset() | |
| 295 | + }, | |
| 296 | + reset() { | |
| 297 | + for (let key in this.query) { | |
| 298 | + this.query[key] = undefined | |
| 299 | + } | |
| 300 | + this.listQuery = { | |
| 301 | + currentPage: 1, | |
| 302 | + pageSize: 20, | |
| 303 | + sort: "desc", | |
| 304 | + sidx: "", | |
| 305 | + } | |
| 306 | + this.initData() | |
| 307 | + } | |
| 308 | + } | |
| 309 | + } | |
| 310 | +</script> | |
| 0 | 311 | \ No newline at end of file | ... | ... |
src/views/new/baseReportingPlatform/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseReportingPlatform/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="应用名称" prop="systemId"> | |
| 7 | + <el-input v-model="dataForm.systemId" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 8 | + </el-input> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="受理状态" prop="handlingStatus"> | |
| 13 | + <el-input v-model="dataForm.handlingStatus" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="受理情况" prop="handlingConten"> | |
| 19 | + <el-input v-model="dataForm.handlingConten" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="分类" prop="handlingClasee"> | |
| 25 | + <el-input v-model="dataForm.handlingClasee" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + </el-form> | |
| 30 | + </el-row> | |
| 31 | + <span slot="footer" class="dialog-footer"> | |
| 32 | + <el-button @click="visible = false">取 消</el-button> | |
| 33 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 34 | + </span> | |
| 35 | + </el-dialog> | |
| 36 | +</template> | |
| 37 | +<script> | |
| 38 | + import request from '@/utils/request' | |
| 39 | + export default { | |
| 40 | + components: {}, | |
| 41 | + props: [], | |
| 42 | + data() { | |
| 43 | + return { | |
| 44 | + loading: false, | |
| 45 | + visible: false, | |
| 46 | + isDetail: false, | |
| 47 | + dataForm: { | |
| 48 | + id:'', | |
| 49 | + systemId:undefined, | |
| 50 | + handlingStatus:undefined, | |
| 51 | + handlingConten:undefined, | |
| 52 | + handlingClasee:undefined, | |
| 53 | + }, | |
| 54 | + rules: { | |
| 55 | + }, | |
| 56 | + } | |
| 57 | + }, | |
| 58 | + computed: {}, | |
| 59 | + watch: {}, | |
| 60 | + created() { | |
| 61 | + }, | |
| 62 | + mounted() { | |
| 63 | + }, | |
| 64 | + methods: { | |
| 65 | + goBack() { | |
| 66 | + this.$emit('refresh') | |
| 67 | + }, | |
| 68 | + init(id, isDetail) { | |
| 69 | + this.dataForm.id = id || 0; | |
| 70 | + this.visible = true; | |
| 71 | + this.isDetail = isDetail || false; | |
| 72 | + this.$nextTick(() => { | |
| 73 | + this.$refs['elForm'].resetFields(); | |
| 74 | + if (this.dataForm.id) { | |
| 75 | + request({ | |
| 76 | + url: '/SubDev/BaseReportingPlatform/' + this.dataForm.id, | |
| 77 | + method: 'get' | |
| 78 | + }).then(res =>{ | |
| 79 | + this.dataForm = res.data; | |
| 80 | + }) | |
| 81 | + } | |
| 82 | + }) | |
| 83 | + }, | |
| 84 | + dataFormSubmit() { | |
| 85 | + this.$refs['elForm'].validate((valid) => { | |
| 86 | + if (valid) { | |
| 87 | + if (!this.dataForm.id) { | |
| 88 | + request({ | |
| 89 | + url: `/SubDev/BaseReportingPlatform`, | |
| 90 | + method: 'post', | |
| 91 | + data: this.dataForm, | |
| 92 | + }).then((res) => { | |
| 93 | + this.$message({ | |
| 94 | + message: res.msg, | |
| 95 | + type: 'success', | |
| 96 | + duration: 1000, | |
| 97 | + onClose: () => { | |
| 98 | + this.visible = false, | |
| 99 | + this.$emit('refresh', true) | |
| 100 | + } | |
| 101 | + }) | |
| 102 | + }) | |
| 103 | + } else { | |
| 104 | + request({ | |
| 105 | + url: '/SubDev/BaseReportingPlatform/' + this.dataForm.id, | |
| 106 | + method: 'PUT', | |
| 107 | + data: this.dataForm | |
| 108 | + }).then((res) => { | |
| 109 | + this.$message({ | |
| 110 | + message: res.msg, | |
| 111 | + type: 'success', | |
| 112 | + duration: 1000, | |
| 113 | + onClose: () => { | |
| 114 | + this.visible = false | |
| 115 | + this.$emit('refresh', true) | |
| 116 | + } | |
| 117 | + }) | |
| 118 | + }) | |
| 119 | + } | |
| 120 | + } | |
| 121 | + }) | |
| 122 | + }, | |
| 123 | + } | |
| 124 | + } | |
| 125 | +</script> | ... | ... |
src/views/new/baseReportingPlatform/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">报表平台</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-input v-model="query.systemId" placeholder="应用名称" clearable /> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label=""> | |
| 16 | + <el-input v-model="query.handlingStatus" placeholder="受理状态" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label=""> | |
| 21 | + <el-input v-model="query.handlingConten" placeholder="受理情况" clearable /> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <template v-if="showAll"> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item label=""> | |
| 27 | + <el-input v-model="query.handlingClasee" placeholder="分类" clearable /> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + </template> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item> | |
| 33 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 34 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 35 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 36 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 37 | + </el-form-item> | |
| 38 | + </el-col> | |
| 39 | + </el-form> | |
| 40 | + </el-row> | |
| 41 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 42 | + <div class="NCC-common-head"> | |
| 43 | + <div> | |
| 44 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 45 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 46 | + </div> | |
| 47 | + <div class="NCC-common-head-right"> | |
| 48 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 49 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 50 | + </el-tooltip> | |
| 51 | + <screenfull isContainer /> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 55 | + <el-table-column prop="systemId" label="应用名称" align="left" /> | |
| 56 | + <el-table-column prop="handlingStatus" label="受理状态" align="left" /> | |
| 57 | + <el-table-column prop="handlingConten" label="受理情况" align="left" /> | |
| 58 | + <el-table-column prop="handlingClasee" label="分类" align="left" /> | |
| 59 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 60 | + <template slot-scope="scope"> | |
| 61 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 62 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 63 | + </template> | |
| 64 | + </el-table-column> | |
| 65 | + </NCC-table> | |
| 66 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 67 | + </div> | |
| 68 | + </div> | |
| 69 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 70 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | + </div> | |
| 74 | +</template> | |
| 75 | +<script> | |
| 76 | + import request from '@/utils/request' | |
| 77 | + import NCCForm from './Form' | |
| 78 | + import ExportBox from './ExportBox' | |
| 79 | + export default { | |
| 80 | + components: { NCCForm, ExportBox }, | |
| 81 | + data() { | |
| 82 | + return { | |
| 83 | + showAll: false, | |
| 84 | + query: { | |
| 85 | + systemId:undefined, | |
| 86 | + handlingStatus:undefined, | |
| 87 | + handlingConten:undefined, | |
| 88 | + handlingClasee:undefined, | |
| 89 | + }, | |
| 90 | + list: [], | |
| 91 | + listLoading: true, | |
| 92 | + multipleSelection: [], total: 0, | |
| 93 | + listQuery: { | |
| 94 | + currentPage: 1, | |
| 95 | + pageSize: 20, | |
| 96 | + sort: "desc", | |
| 97 | + sidx: "", | |
| 98 | + }, | |
| 99 | + formVisible: false, | |
| 100 | + exportBoxVisible: false, | |
| 101 | + columnList: [ | |
| 102 | + { prop: 'systemId', label: '应用名称' }, | |
| 103 | + { prop: 'handlingStatus', label: '受理状态' }, | |
| 104 | + { prop: 'handlingConten', label: '受理情况' }, | |
| 105 | + { prop: 'handlingClasee', label: '分类' }, | |
| 106 | + ], | |
| 107 | + } | |
| 108 | + }, | |
| 109 | + computed: {}, | |
| 110 | + created() { | |
| 111 | + this.initData() | |
| 112 | + }, | |
| 113 | + methods: { | |
| 114 | + initData() { | |
| 115 | + this.listLoading = true; | |
| 116 | + let _query = { | |
| 117 | + ...this.listQuery, | |
| 118 | + ...this.query | |
| 119 | + }; | |
| 120 | + let query = {} | |
| 121 | + for (let key in _query) { | |
| 122 | + if (Array.isArray(_query[key])) { | |
| 123 | + query[key] = _query[key].join() | |
| 124 | + } else { | |
| 125 | + query[key] = _query[key] | |
| 126 | + } | |
| 127 | + } | |
| 128 | + request({ | |
| 129 | + url: `/SubDev/BaseReportingPlatform`, | |
| 130 | + method: 'get', | |
| 131 | + params: query | |
| 132 | + }).then(res => { | |
| 133 | + this.list = res.data.list | |
| 134 | + this.total = res.data.pagination.total | |
| 135 | + this.listLoading = false | |
| 136 | + }) | |
| 137 | + }, | |
| 138 | + handleDel(id) { | |
| 139 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 140 | + type: 'warning' | |
| 141 | + }).then(() => { | |
| 142 | + request({ | |
| 143 | + url: `/SubDev/BaseReportingPlatform/${id}`, | |
| 144 | + method: 'DELETE' | |
| 145 | + }).then(res => { | |
| 146 | + this.$message({ | |
| 147 | + type: 'success', | |
| 148 | + message: res.msg, | |
| 149 | + onClose: () => { | |
| 150 | + this.initData() | |
| 151 | + } | |
| 152 | + }); | |
| 153 | + }) | |
| 154 | + }).catch(() => { | |
| 155 | + }); | |
| 156 | + }, | |
| 157 | + addOrUpdateHandle(id, isDetail) { | |
| 158 | + this.formVisible = true | |
| 159 | + this.$nextTick(() => { | |
| 160 | + this.$refs.NCCForm.init(id, isDetail) | |
| 161 | + }) | |
| 162 | + }, | |
| 163 | + exportData() { | |
| 164 | + this.exportBoxVisible = true | |
| 165 | + this.$nextTick(() => { | |
| 166 | + this.$refs.ExportBox.init(this.columnList) | |
| 167 | + }) | |
| 168 | + }, | |
| 169 | + download(data) { | |
| 170 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 171 | + request({ | |
| 172 | + url: `/SubDev/BaseReportingPlatform/Actions/Export`, | |
| 173 | + method: 'get', | |
| 174 | + params: query | |
| 175 | + }).then(res => { | |
| 176 | + if (!res.data.url) return | |
| 177 | + window.location.href = this.define.comUrl + res.data.url | |
| 178 | + this.$refs.ExportBox.visible = false | |
| 179 | + this.exportBoxVisible = false | |
| 180 | + }) | |
| 181 | + }, | |
| 182 | + search() { | |
| 183 | + this.listQuery = { | |
| 184 | + currentPage: 1, | |
| 185 | + pageSize: 20, | |
| 186 | + sort: "desc", | |
| 187 | + sidx: "", | |
| 188 | + } | |
| 189 | + this.initData() | |
| 190 | + }, | |
| 191 | + refresh(isrRefresh) { | |
| 192 | + this.formVisible = false | |
| 193 | + if (isrRefresh) this.reset() | |
| 194 | + }, | |
| 195 | + reset() { | |
| 196 | + for (let key in this.query) { | |
| 197 | + this.query[key] = undefined | |
| 198 | + } | |
| 199 | + this.listQuery = { | |
| 200 | + currentPage: 1, | |
| 201 | + pageSize: 20, | |
| 202 | + sort: "desc", | |
| 203 | + sidx: "", | |
| 204 | + } | |
| 205 | + this.initData() | |
| 206 | + } | |
| 207 | + } | |
| 208 | + } | |
| 209 | +</script> | |
| 0 | 210 | \ No newline at end of file | ... | ... |
src/views/new/baseService12345HandlingStatus/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseService12345HandlingStatus/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="工单编号" prop="handlingCode"> | |
| 13 | + <el-input v-model="dataForm.handlingCode" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="来信人" prop="letterSender"> | |
| 19 | + <el-input v-model="dataForm.letterSender" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="来信主题" prop="letterTittle"> | |
| 25 | + <el-input v-model="dataForm.letterTittle" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="回复" prop="content"> | |
| 31 | + <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 32 | + </el-input> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + </el-form> | |
| 36 | + </el-row> | |
| 37 | + <span slot="footer" class="dialog-footer"> | |
| 38 | + <el-button @click="visible = false">取 消</el-button> | |
| 39 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 40 | + </span> | |
| 41 | + </el-dialog> | |
| 42 | +</template> | |
| 43 | +<script> | |
| 44 | + import request from '@/utils/request' | |
| 45 | + export default { | |
| 46 | + components: {}, | |
| 47 | + props: [], | |
| 48 | + data() { | |
| 49 | + return { | |
| 50 | + loading: false, | |
| 51 | + visible: false, | |
| 52 | + isDetail: false, | |
| 53 | + dataForm: { | |
| 54 | + id:'', | |
| 55 | + date:undefined, | |
| 56 | + handlingCode:undefined, | |
| 57 | + letterSender:undefined, | |
| 58 | + letterTittle:undefined, | |
| 59 | + content:undefined, | |
| 60 | + }, | |
| 61 | + rules: { | |
| 62 | + }, | |
| 63 | + } | |
| 64 | + }, | |
| 65 | + computed: {}, | |
| 66 | + watch: {}, | |
| 67 | + created() { | |
| 68 | + }, | |
| 69 | + mounted() { | |
| 70 | + }, | |
| 71 | + methods: { | |
| 72 | + goBack() { | |
| 73 | + this.$emit('refresh') | |
| 74 | + }, | |
| 75 | + init(id, isDetail) { | |
| 76 | + this.dataForm.id = id || 0; | |
| 77 | + this.visible = true; | |
| 78 | + this.isDetail = isDetail || false; | |
| 79 | + this.$nextTick(() => { | |
| 80 | + this.$refs['elForm'].resetFields(); | |
| 81 | + if (this.dataForm.id) { | |
| 82 | + request({ | |
| 83 | + url: '/SubDev/BaseService12345HandlingStatus/' + this.dataForm.id, | |
| 84 | + method: 'get' | |
| 85 | + }).then(res =>{ | |
| 86 | + this.dataForm = res.data; | |
| 87 | + }) | |
| 88 | + } | |
| 89 | + }) | |
| 90 | + }, | |
| 91 | + dataFormSubmit() { | |
| 92 | + this.$refs['elForm'].validate((valid) => { | |
| 93 | + if (valid) { | |
| 94 | + if (!this.dataForm.id) { | |
| 95 | + request({ | |
| 96 | + url: `/SubDev/BaseService12345HandlingStatus`, | |
| 97 | + method: 'post', | |
| 98 | + data: this.dataForm, | |
| 99 | + }).then((res) => { | |
| 100 | + this.$message({ | |
| 101 | + message: res.msg, | |
| 102 | + type: 'success', | |
| 103 | + duration: 1000, | |
| 104 | + onClose: () => { | |
| 105 | + this.visible = false, | |
| 106 | + this.$emit('refresh', true) | |
| 107 | + } | |
| 108 | + }) | |
| 109 | + }) | |
| 110 | + } else { | |
| 111 | + request({ | |
| 112 | + url: '/SubDev/BaseService12345HandlingStatus/' + this.dataForm.id, | |
| 113 | + method: 'PUT', | |
| 114 | + data: this.dataForm | |
| 115 | + }).then((res) => { | |
| 116 | + this.$message({ | |
| 117 | + message: res.msg, | |
| 118 | + type: 'success', | |
| 119 | + duration: 1000, | |
| 120 | + onClose: () => { | |
| 121 | + this.visible = false | |
| 122 | + this.$emit('refresh', true) | |
| 123 | + } | |
| 124 | + }) | |
| 125 | + }) | |
| 126 | + } | |
| 127 | + } | |
| 128 | + }) | |
| 129 | + }, | |
| 130 | + } | |
| 131 | + } | |
| 132 | +</script> | ... | ... |
src/views/new/baseService12345HandlingStatus/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">12345办理情况</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.handlingCode" placeholder="工单编号" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-input v-model="query.content" placeholder="回复" /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <el-input v-model="query.letterTittle" placeholder="来信主题" clearable /> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item label=""> | |
| 33 | + <el-input v-model="query.letterSender" placeholder="来信人" clearable /> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + </template> | |
| 37 | + <el-col :span="6"> | |
| 38 | + <el-form-item> | |
| 39 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 40 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 41 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 42 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 43 | + </el-form-item> | |
| 44 | + </el-col> | |
| 45 | + </el-form> | |
| 46 | + </el-row> | |
| 47 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 48 | + <div class="NCC-common-head"> | |
| 49 | + <div style="display: flex;"> | |
| 50 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 51 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 52 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 53 | + <div style="margin-left: 10px;"> | |
| 54 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseService12345HandlingStatus/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 55 | + <div class="avatar-box"> | |
| 56 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 57 | + </div> | |
| 58 | + </el-upload> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + <div class="NCC-common-head-right"> | |
| 62 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 63 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 64 | + </el-tooltip> | |
| 65 | + <screenfull isContainer /> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 69 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 70 | + <el-table-column prop="handlingCode" label="工单编号" align="left" /> | |
| 71 | + <el-table-column prop="letterSender" label="来信人" align="left" /> | |
| 72 | + <el-table-column prop="letterTittle" label="来信主题" align="left" /> | |
| 73 | + <el-table-column prop="content" label="回复" align="left" /> | |
| 74 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 75 | + <template slot-scope="scope"> | |
| 76 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 77 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 78 | + </template> | |
| 79 | + </el-table-column> | |
| 80 | + </NCC-table> | |
| 81 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 82 | + </div> | |
| 83 | + </div> | |
| 84 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 85 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 86 | + </div> | |
| 87 | + </div> | |
| 88 | + </div> | |
| 89 | +</template> | |
| 90 | +<script> | |
| 91 | + import request from '@/utils/request' | |
| 92 | + import NCCForm from './Form' | |
| 93 | + import ExportBox from './ExportBox' | |
| 94 | + export default { | |
| 95 | + components: { NCCForm, ExportBox }, | |
| 96 | + data() { | |
| 97 | + return { | |
| 98 | + uploadHeaders: { | |
| 99 | + Authorization: this.$store.getters.token, | |
| 100 | + IsLogin: true, | |
| 101 | + }, | |
| 102 | + showAll: false, | |
| 103 | + query: { | |
| 104 | + date:undefined, | |
| 105 | + handlingCode:undefined, | |
| 106 | + letterSender:undefined, | |
| 107 | + letterTittle:undefined, | |
| 108 | + content:undefined, | |
| 109 | + }, | |
| 110 | + list: [], | |
| 111 | + listLoading: true, | |
| 112 | + multipleSelection: [], total: 0, | |
| 113 | + listQuery: { | |
| 114 | + currentPage: 1, | |
| 115 | + pageSize: 20, | |
| 116 | + sort: "desc", | |
| 117 | + sidx: "", | |
| 118 | + }, | |
| 119 | + formVisible: false, | |
| 120 | + exportBoxVisible: false, | |
| 121 | + columnList: [ | |
| 122 | + { prop: 'date', label: '时间' }, | |
| 123 | + { prop: 'handlingCode', label: '工单编号' }, | |
| 124 | + { prop: 'letterSender', label: '来信人' }, | |
| 125 | + { prop: 'letterTittle', label: '来信主题' }, | |
| 126 | + { prop: 'content', label: '回复' }, | |
| 127 | + ], | |
| 128 | + } | |
| 129 | + }, | |
| 130 | + computed: {}, | |
| 131 | + created() { | |
| 132 | + this.initData() | |
| 133 | + }, | |
| 134 | + methods: { | |
| 135 | + uploadSuccess(response, file, fileList) { | |
| 136 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 137 | + this.$message({ | |
| 138 | + type: type, | |
| 139 | + message: response.msg, | |
| 140 | + }); | |
| 141 | + // this.initList(); | |
| 142 | + }, | |
| 143 | + initData() { | |
| 144 | + this.listLoading = true; | |
| 145 | + let _query = { | |
| 146 | + ...this.listQuery, | |
| 147 | + ...this.query | |
| 148 | + }; | |
| 149 | + let query = {} | |
| 150 | + for (let key in _query) { | |
| 151 | + if (Array.isArray(_query[key])) { | |
| 152 | + query[key] = _query[key].join() | |
| 153 | + } else { | |
| 154 | + query[key] = _query[key] | |
| 155 | + } | |
| 156 | + } | |
| 157 | + request({ | |
| 158 | + url: `/SubDev/BaseService12345HandlingStatus`, | |
| 159 | + method: 'get', | |
| 160 | + params: query | |
| 161 | + }).then(res => { | |
| 162 | + this.list = res.data.list | |
| 163 | + this.total = res.data.pagination.total | |
| 164 | + this.listLoading = false | |
| 165 | + }) | |
| 166 | + }, | |
| 167 | + handleDel(id) { | |
| 168 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 169 | + type: 'warning' | |
| 170 | + }).then(() => { | |
| 171 | + request({ | |
| 172 | + url: `/SubDev/BaseService12345HandlingStatus/${id}`, | |
| 173 | + method: 'DELETE' | |
| 174 | + }).then(res => { | |
| 175 | + this.$message({ | |
| 176 | + type: 'success', | |
| 177 | + message: res.msg, | |
| 178 | + onClose: () => { | |
| 179 | + this.initData() | |
| 180 | + } | |
| 181 | + }); | |
| 182 | + }) | |
| 183 | + }).catch(() => { | |
| 184 | + }); | |
| 185 | + }, | |
| 186 | + addOrUpdateHandle(id, isDetail) { | |
| 187 | + this.formVisible = true | |
| 188 | + this.$nextTick(() => { | |
| 189 | + this.$refs.NCCForm.init(id, isDetail) | |
| 190 | + }) | |
| 191 | + }, | |
| 192 | + exportData(type) { | |
| 193 | + let obj = {}; | |
| 194 | + if(type) { | |
| 195 | + obj = { | |
| 196 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/9', | |
| 197 | + params: {type:9}, | |
| 198 | + method: "GET", | |
| 199 | + responseType: 'blob', | |
| 200 | + } | |
| 201 | + request(obj).then((res) => { | |
| 202 | + if(type) { | |
| 203 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 204 | + const url = window.URL.createObjectURL(blob); | |
| 205 | + let link = document.createElement('a'); | |
| 206 | + link.style.display = 'none'; | |
| 207 | + link.href = url; | |
| 208 | + link.download = '12345办理情况.xlsx'; | |
| 209 | + link.click(); | |
| 210 | + } else { | |
| 211 | + if(res.code != 200) return; | |
| 212 | + const url = define.APIURl + res.data.url; | |
| 213 | + const link = document.createElement("a"); | |
| 214 | + link.href = url; | |
| 215 | + link.download = res.data.name; | |
| 216 | + link.click(); | |
| 217 | + } | |
| 218 | + }) | |
| 219 | + } else { | |
| 220 | + this.exportBoxVisible = true | |
| 221 | + this.$nextTick(() => { | |
| 222 | + this.$refs.ExportBox.init(this.columnList) | |
| 223 | + }) | |
| 224 | + }; | |
| 225 | + | |
| 226 | + }, | |
| 227 | + // exportData() { | |
| 228 | + // this.exportBoxVisible = true | |
| 229 | + // this.$nextTick(() => { | |
| 230 | + // this.$refs.ExportBox.init(this.columnList) | |
| 231 | + // }) | |
| 232 | + // }, | |
| 233 | + download(data) { | |
| 234 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 235 | + request({ | |
| 236 | + url: `/SubDev/BaseService12345HandlingStatus/Actions/Export`, | |
| 237 | + method: 'get', | |
| 238 | + params: query | |
| 239 | + }).then(res => { | |
| 240 | + if (!res.data.url) return | |
| 241 | + window.location.href = this.define.comUrl + res.data.url | |
| 242 | + this.$refs.ExportBox.visible = false | |
| 243 | + this.exportBoxVisible = false | |
| 244 | + }) | |
| 245 | + }, | |
| 246 | + search() { | |
| 247 | + this.listQuery = { | |
| 248 | + currentPage: 1, | |
| 249 | + pageSize: 20, | |
| 250 | + sort: "desc", | |
| 251 | + sidx: "", | |
| 252 | + } | |
| 253 | + this.initData() | |
| 254 | + }, | |
| 255 | + refresh(isrRefresh) { | |
| 256 | + this.formVisible = false | |
| 257 | + if (isrRefresh) this.reset() | |
| 258 | + }, | |
| 259 | + reset() { | |
| 260 | + for (let key in this.query) { | |
| 261 | + this.query[key] = undefined | |
| 262 | + } | |
| 263 | + this.listQuery = { | |
| 264 | + currentPage: 1, | |
| 265 | + pageSize: 20, | |
| 266 | + sort: "desc", | |
| 267 | + sidx: "", | |
| 268 | + } | |
| 269 | + this.initData() | |
| 270 | + } | |
| 271 | + } | |
| 272 | + } | |
| 273 | +</script> | |
| 0 | 274 | \ No newline at end of file | ... | ... |
src/views/new/baseWeeklySummary/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseWeeklySummary/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="内容" prop="content"> | |
| 13 | + <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + </el-form> | |
| 18 | + </el-row> | |
| 19 | + <span slot="footer" class="dialog-footer"> | |
| 20 | + <el-button @click="visible = false">取 消</el-button> | |
| 21 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 22 | + </span> | |
| 23 | + </el-dialog> | |
| 24 | +</template> | |
| 25 | +<script> | |
| 26 | + import request from '@/utils/request' | |
| 27 | + export default { | |
| 28 | + components: {}, | |
| 29 | + props: [], | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + loading: false, | |
| 33 | + visible: false, | |
| 34 | + isDetail: false, | |
| 35 | + dataForm: { | |
| 36 | + id:'', | |
| 37 | + date:undefined, | |
| 38 | + content:undefined, | |
| 39 | + }, | |
| 40 | + rules: { | |
| 41 | + }, | |
| 42 | + } | |
| 43 | + }, | |
| 44 | + computed: {}, | |
| 45 | + watch: {}, | |
| 46 | + created() { | |
| 47 | + }, | |
| 48 | + mounted() { | |
| 49 | + }, | |
| 50 | + methods: { | |
| 51 | + goBack() { | |
| 52 | + this.$emit('refresh') | |
| 53 | + }, | |
| 54 | + init(id, isDetail) { | |
| 55 | + this.dataForm.id = id || 0; | |
| 56 | + this.visible = true; | |
| 57 | + this.isDetail = isDetail || false; | |
| 58 | + this.$nextTick(() => { | |
| 59 | + this.$refs['elForm'].resetFields(); | |
| 60 | + if (this.dataForm.id) { | |
| 61 | + request({ | |
| 62 | + url: '/SubDev/BaseWeeklySummary/' + this.dataForm.id, | |
| 63 | + method: 'get' | |
| 64 | + }).then(res =>{ | |
| 65 | + this.dataForm = res.data; | |
| 66 | + }) | |
| 67 | + } | |
| 68 | + }) | |
| 69 | + }, | |
| 70 | + dataFormSubmit() { | |
| 71 | + this.$refs['elForm'].validate((valid) => { | |
| 72 | + if (valid) { | |
| 73 | + if (!this.dataForm.id) { | |
| 74 | + request({ | |
| 75 | + url: `/SubDev/BaseWeeklySummary`, | |
| 76 | + method: 'post', | |
| 77 | + data: this.dataForm, | |
| 78 | + }).then((res) => { | |
| 79 | + this.$message({ | |
| 80 | + message: res.msg, | |
| 81 | + type: 'success', | |
| 82 | + duration: 1000, | |
| 83 | + onClose: () => { | |
| 84 | + this.visible = false, | |
| 85 | + this.$emit('refresh', true) | |
| 86 | + } | |
| 87 | + }) | |
| 88 | + }) | |
| 89 | + } else { | |
| 90 | + request({ | |
| 91 | + url: '/SubDev/BaseWeeklySummary/' + this.dataForm.id, | |
| 92 | + method: 'PUT', | |
| 93 | + data: this.dataForm | |
| 94 | + }).then((res) => { | |
| 95 | + this.$message({ | |
| 96 | + message: res.msg, | |
| 97 | + type: 'success', | |
| 98 | + duration: 1000, | |
| 99 | + onClose: () => { | |
| 100 | + this.visible = false | |
| 101 | + this.$emit('refresh', true) | |
| 102 | + } | |
| 103 | + }) | |
| 104 | + }) | |
| 105 | + } | |
| 106 | + } | |
| 107 | + }) | |
| 108 | + }, | |
| 109 | + } | |
| 110 | + } | |
| 111 | +</script> | ... | ... |
src/views/new/baseWeeklySummary/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">周总结</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.content" placeholder="内容" /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item> | |
| 22 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 23 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 24 | + </el-form-item> | |
| 25 | + </el-col> | |
| 26 | + </el-form> | |
| 27 | + </el-row> | |
| 28 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 29 | + <div class="NCC-common-head"> | |
| 30 | + <div style="display: flex;"> | |
| 31 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 32 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 33 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 34 | + <div style="margin-left: 10px;"> | |
| 35 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseWeeklySummary/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 36 | + <div class="avatar-box"> | |
| 37 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 38 | + </div> | |
| 39 | + </el-upload> | |
| 40 | + </div> | |
| 41 | + </div> | |
| 42 | + <div class="NCC-common-head-right"> | |
| 43 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 44 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 45 | + </el-tooltip> | |
| 46 | + <screenfull isContainer /> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 50 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 51 | + <el-table-column prop="content" label="内容" align="left" /> | |
| 52 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 53 | + <template slot-scope="scope"> | |
| 54 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 55 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 56 | + </template> | |
| 57 | + </el-table-column> | |
| 58 | + </NCC-table> | |
| 59 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 63 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + </div> | |
| 67 | +</template> | |
| 68 | +<script> | |
| 69 | + import request from '@/utils/request' | |
| 70 | + import NCCForm from './Form' | |
| 71 | + import ExportBox from './ExportBox' | |
| 72 | + export default { | |
| 73 | + components: { NCCForm, ExportBox }, | |
| 74 | + data() { | |
| 75 | + return { | |
| 76 | + uploadHeaders: { | |
| 77 | + Authorization: this.$store.getters.token, | |
| 78 | + IsLogin: true, | |
| 79 | + }, | |
| 80 | + query: { | |
| 81 | + date:undefined, | |
| 82 | + content:undefined, | |
| 83 | + }, | |
| 84 | + list: [], | |
| 85 | + listLoading: true, | |
| 86 | + multipleSelection: [], total: 0, | |
| 87 | + listQuery: { | |
| 88 | + currentPage: 1, | |
| 89 | + pageSize: 20, | |
| 90 | + sort: "desc", | |
| 91 | + sidx: "", | |
| 92 | + }, | |
| 93 | + formVisible: false, | |
| 94 | + exportBoxVisible: false, | |
| 95 | + columnList: [ | |
| 96 | + { prop: 'date', label: '时间' }, | |
| 97 | + { prop: 'content', label: '内容' }, | |
| 98 | + ], | |
| 99 | + } | |
| 100 | + }, | |
| 101 | + computed: {}, | |
| 102 | + created() { | |
| 103 | + this.initData() | |
| 104 | + }, | |
| 105 | + methods: { | |
| 106 | + uploadSuccess(response, file, fileList) { | |
| 107 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 108 | + this.$message({ | |
| 109 | + type: type, | |
| 110 | + message: response.msg, | |
| 111 | + }); | |
| 112 | + // this.initList(); | |
| 113 | + }, | |
| 114 | + initData() { | |
| 115 | + this.listLoading = true; | |
| 116 | + let _query = { | |
| 117 | + ...this.listQuery, | |
| 118 | + ...this.query | |
| 119 | + }; | |
| 120 | + let query = {} | |
| 121 | + for (let key in _query) { | |
| 122 | + if (Array.isArray(_query[key])) { | |
| 123 | + query[key] = _query[key].join() | |
| 124 | + } else { | |
| 125 | + query[key] = _query[key] | |
| 126 | + } | |
| 127 | + } | |
| 128 | + request({ | |
| 129 | + url: `/SubDev/BaseWeeklySummary`, | |
| 130 | + method: 'get', | |
| 131 | + params: query | |
| 132 | + }).then(res => { | |
| 133 | + this.list = res.data.list | |
| 134 | + this.total = res.data.pagination.total | |
| 135 | + this.listLoading = false | |
| 136 | + }) | |
| 137 | + }, | |
| 138 | + handleDel(id) { | |
| 139 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 140 | + type: 'warning' | |
| 141 | + }).then(() => { | |
| 142 | + request({ | |
| 143 | + url: `/SubDev/BaseWeeklySummary/${id}`, | |
| 144 | + method: 'DELETE' | |
| 145 | + }).then(res => { | |
| 146 | + this.$message({ | |
| 147 | + type: 'success', | |
| 148 | + message: res.msg, | |
| 149 | + onClose: () => { | |
| 150 | + this.initData() | |
| 151 | + } | |
| 152 | + }); | |
| 153 | + }) | |
| 154 | + }).catch(() => { | |
| 155 | + }); | |
| 156 | + }, | |
| 157 | + addOrUpdateHandle(id, isDetail) { | |
| 158 | + this.formVisible = true | |
| 159 | + this.$nextTick(() => { | |
| 160 | + this.$refs.NCCForm.init(id, isDetail) | |
| 161 | + }) | |
| 162 | + }, | |
| 163 | + exportData(type) { | |
| 164 | + let obj = {}; | |
| 165 | + if(type) { | |
| 166 | + obj = { | |
| 167 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/8', | |
| 168 | + params: {type:8}, | |
| 169 | + method: "GET", | |
| 170 | + responseType: 'blob', | |
| 171 | + } | |
| 172 | + request(obj).then((res) => { | |
| 173 | + if(type) { | |
| 174 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 175 | + const url = window.URL.createObjectURL(blob); | |
| 176 | + let link = document.createElement('a'); | |
| 177 | + link.style.display = 'none'; | |
| 178 | + link.href = url; | |
| 179 | + link.download = '周总结.xlsx'; | |
| 180 | + link.click(); | |
| 181 | + } else { | |
| 182 | + if(res.code != 200) return; | |
| 183 | + const url = define.APIURl + res.data.url; | |
| 184 | + const link = document.createElement("a"); | |
| 185 | + link.href = url; | |
| 186 | + link.download = res.data.name; | |
| 187 | + link.click(); | |
| 188 | + } | |
| 189 | + }) | |
| 190 | + } else { | |
| 191 | + this.exportBoxVisible = true | |
| 192 | + this.$nextTick(() => { | |
| 193 | + this.$refs.ExportBox.init(this.columnList) | |
| 194 | + }) | |
| 195 | + }; | |
| 196 | + | |
| 197 | + }, | |
| 198 | + // exportData() { | |
| 199 | + // this.exportBoxVisible = true | |
| 200 | + // this.$nextTick(() => { | |
| 201 | + // this.$refs.ExportBox.init(this.columnList) | |
| 202 | + // }) | |
| 203 | + // }, | |
| 204 | + download(data) { | |
| 205 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 206 | + request({ | |
| 207 | + url: `/SubDev/BaseWeeklySummary/Actions/Export`, | |
| 208 | + method: 'get', | |
| 209 | + params: query | |
| 210 | + }).then(res => { | |
| 211 | + if (!res.data.url) return | |
| 212 | + window.location.href = this.define.comUrl + res.data.url | |
| 213 | + this.$refs.ExportBox.visible = false | |
| 214 | + this.exportBoxVisible = false | |
| 215 | + }) | |
| 216 | + }, | |
| 217 | + search() { | |
| 218 | + this.listQuery = { | |
| 219 | + currentPage: 1, | |
| 220 | + pageSize: 20, | |
| 221 | + sort: "desc", | |
| 222 | + sidx: "", | |
| 223 | + } | |
| 224 | + this.initData() | |
| 225 | + }, | |
| 226 | + refresh(isrRefresh) { | |
| 227 | + this.formVisible = false | |
| 228 | + if (isrRefresh) this.reset() | |
| 229 | + }, | |
| 230 | + reset() { | |
| 231 | + for (let key in this.query) { | |
| 232 | + this.query[key] = undefined | |
| 233 | + } | |
| 234 | + this.listQuery = { | |
| 235 | + currentPage: 1, | |
| 236 | + pageSize: 20, | |
| 237 | + sort: "desc", | |
| 238 | + sidx: "", | |
| 239 | + } | |
| 240 | + this.initData() | |
| 241 | + } | |
| 242 | + } | |
| 243 | + } | |
| 244 | +</script> | |
| 0 | 245 | \ No newline at end of file | ... | ... |
src/views/new/baseWpardl/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
src/views/new/baseWpardl/Form.vue
0 → 100644
| 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="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="时间" prop="date"> | |
| 7 | + <el-date-picker v-model="dataForm.date" placeholder="请选择" clearable :style='{"width":"100%"}' type='date' format="yyyy-MM-dd" value-format="timestamp" > | |
| 8 | + </el-date-picker> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="平台" prop="platform"> | |
| 13 | + <el-input v-model="dataForm.platform" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="账号名称" prop="accountName"> | |
| 19 | + <el-input v-model="dataForm.accountName" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="域名" prop="domain"> | |
| 25 | + <el-input v-model="dataForm.domain" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="问题描述" prop="problemDescription"> | |
| 31 | + <el-input v-model="dataForm.problemDescription" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 32 | + </el-input> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + <el-col :span="24"> | |
| 36 | + <el-form-item label="处置建议" prop="disposalSuggestions"> | |
| 37 | + <el-input v-model="dataForm.disposalSuggestions" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 38 | + </el-input> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="24"> | |
| 42 | + <el-form-item label="是否取证" prop="whetherCollect"> | |
| 43 | + <el-select v-model="dataForm.whetherCollect" placeholder="请选择" clearable :style='{"width":"100%"}' > | |
| 44 | + <el-option v-for="(item, index) in whetherCollectOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option> | |
| 45 | + </el-select> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="24"> | |
| 49 | + <el-form-item label="取证链接" prop="evidenceCollectionLink"> | |
| 50 | + <el-input v-model="dataForm.evidenceCollectionLink" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 51 | + </el-input> | |
| 52 | + </el-form-item> | |
| 53 | + </el-col> | |
| 54 | + <el-col :span="24"> | |
| 55 | + <el-form-item label="备注" prop="remark"> | |
| 56 | + <el-input v-model="dataForm.remark" placeholder="请输入" show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 57 | + </el-input> | |
| 58 | + </el-form-item> | |
| 59 | + </el-col> | |
| 60 | + <el-col :span="24"> | |
| 61 | + <el-form-item label="附件" prop="annex"> | |
| 62 | + <NCC-UploadFz v-model="dataForm.annex" :fileSize="1024" sizeUnit="MB" :limit="9" buttonText="点击上传" > | |
| 63 | + </NCC-UploadFz> | |
| 64 | + </el-form-item> | |
| 65 | + </el-col> | |
| 66 | + </el-form> | |
| 67 | + </el-row> | |
| 68 | + <span slot="footer" class="dialog-footer"> | |
| 69 | + <el-button @click="visible = false">取 消</el-button> | |
| 70 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 71 | + </span> | |
| 72 | + </el-dialog> | |
| 73 | +</template> | |
| 74 | +<script> | |
| 75 | + import request from '@/utils/request' | |
| 76 | + export default { | |
| 77 | + components: {}, | |
| 78 | + props: [], | |
| 79 | + data() { | |
| 80 | + return { | |
| 81 | + loading: false, | |
| 82 | + visible: false, | |
| 83 | + isDetail: false, | |
| 84 | + dataForm: { | |
| 85 | + id:'', | |
| 86 | + date:undefined, | |
| 87 | + platform:undefined, | |
| 88 | + accountName:undefined, | |
| 89 | + domain:undefined, | |
| 90 | + problemDescription:undefined, | |
| 91 | + disposalSuggestions:undefined, | |
| 92 | + whetherCollect:"1", | |
| 93 | + evidenceCollectionLink:undefined, | |
| 94 | + remark:undefined, | |
| 95 | + annex:[], | |
| 96 | + }, | |
| 97 | + rules: { | |
| 98 | + }, | |
| 99 | + whetherCollectOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}], | |
| 100 | + } | |
| 101 | + }, | |
| 102 | + computed: {}, | |
| 103 | + watch: {}, | |
| 104 | + created() { | |
| 105 | + }, | |
| 106 | + mounted() { | |
| 107 | + }, | |
| 108 | + methods: { | |
| 109 | + goBack() { | |
| 110 | + this.$emit('refresh') | |
| 111 | + }, | |
| 112 | + init(id, isDetail) { | |
| 113 | + this.dataForm.id = id || 0; | |
| 114 | + this.visible = true; | |
| 115 | + this.isDetail = isDetail || false; | |
| 116 | + this.$nextTick(() => { | |
| 117 | + this.$refs['elForm'].resetFields(); | |
| 118 | + if (this.dataForm.id) { | |
| 119 | + request({ | |
| 120 | + url: '/SubDev/BaseWpardl/' + this.dataForm.id, | |
| 121 | + method: 'get' | |
| 122 | + }).then(res =>{ | |
| 123 | + this.dataForm = res.data; | |
| 124 | + if(!this.dataForm.annex)this.dataForm.annex=[]; | |
| 125 | + }) | |
| 126 | + } | |
| 127 | + }) | |
| 128 | + }, | |
| 129 | + dataFormSubmit() { | |
| 130 | + this.$refs['elForm'].validate((valid) => { | |
| 131 | + if (valid) { | |
| 132 | + if (!this.dataForm.id) { | |
| 133 | + request({ | |
| 134 | + url: `/SubDev/BaseWpardl`, | |
| 135 | + method: 'post', | |
| 136 | + data: this.dataForm, | |
| 137 | + }).then((res) => { | |
| 138 | + this.$message({ | |
| 139 | + message: res.msg, | |
| 140 | + type: 'success', | |
| 141 | + duration: 1000, | |
| 142 | + onClose: () => { | |
| 143 | + this.visible = false, | |
| 144 | + this.$emit('refresh', true) | |
| 145 | + } | |
| 146 | + }) | |
| 147 | + }) | |
| 148 | + } else { | |
| 149 | + request({ | |
| 150 | + url: '/SubDev/BaseWpardl/' + this.dataForm.id, | |
| 151 | + method: 'PUT', | |
| 152 | + data: this.dataForm | |
| 153 | + }).then((res) => { | |
| 154 | + this.$message({ | |
| 155 | + message: res.msg, | |
| 156 | + type: 'success', | |
| 157 | + duration: 1000, | |
| 158 | + onClose: () => { | |
| 159 | + this.visible = false | |
| 160 | + this.$emit('refresh', true) | |
| 161 | + } | |
| 162 | + }) | |
| 163 | + }) | |
| 164 | + } | |
| 165 | + } | |
| 166 | + }) | |
| 167 | + }, | |
| 168 | + } | |
| 169 | + } | |
| 170 | +</script> | ... | ... |
src/views/new/baseWpardl/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="SystemInfo item-box common-info-box"> | |
| 3 | + <div class="item-title">上报处置网站平台、账号台账</div> | |
| 4 | + <div class="item-body"> | |
| 5 | + <div class="NCC-common-layout"> | |
| 6 | + <div class="NCC-common-layout-center"> | |
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 8 | + <el-form @submit.native.prevent> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-form-item label=""> | |
| 11 | + <el-date-picker v-model="query.date" type="daterange" value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> | |
| 12 | + </el-date-picker> | |
| 13 | + </el-form-item> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-form-item label=""> | |
| 17 | + <el-input v-model="query.platform" placeholder="平台" clearable /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="6"> | |
| 21 | + <el-form-item label=""> | |
| 22 | + <el-input v-model="query.accountName" placeholder="账号名称" clearable /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <template v-if="showAll"> | |
| 26 | + <el-col :span="6"> | |
| 27 | + <el-form-item label=""> | |
| 28 | + <el-input v-model="query.domain" placeholder="域名" clearable /> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item label=""> | |
| 33 | + <el-input v-model="query.problemDescription" placeholder="问题描述" /> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + <el-col :span="6"> | |
| 37 | + <el-form-item label=""> | |
| 38 | + <el-input v-model="query.disposalSuggestions" placeholder="处置建议" /> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="6"> | |
| 42 | + <el-form-item label=""> | |
| 43 | + <el-select v-model="query.whetherCollect" placeholder="是否取证" clearable > | |
| 44 | + <el-option v-for="(item, index) in whetherCollectOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 45 | + </el-select> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="6"> | |
| 49 | + <el-form-item label=""> | |
| 50 | + <el-input v-model="query.evidenceCollectionLink" placeholder="取证链接" clearable /> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + <el-col :span="6"> | |
| 54 | + <el-form-item label=""> | |
| 55 | + <el-input v-model="query.remark" placeholder="备注" /> | |
| 56 | + </el-form-item> | |
| 57 | + </el-col> | |
| 58 | + </template> | |
| 59 | + <el-col :span="6"> | |
| 60 | + <el-form-item> | |
| 61 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 62 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 63 | + <!-- <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 64 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> --> | |
| 65 | + </el-form-item> | |
| 66 | + </el-col> | |
| 67 | + </el-form> | |
| 68 | + </el-row> | |
| 69 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 70 | + <div class="NCC-common-head"> | |
| 71 | + <div style="display: flex;"> | |
| 72 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 73 | + <el-button type="success" icon="el-icon-download" @click="exportData('demo')">导出模板</el-button> | |
| 74 | + <el-button type="warning" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 75 | + <div style="margin-left: 10px;"> | |
| 76 | + <el-upload class="uploadXlax" :action="define.APIURl + '/api/SubDev/baseWpardl/Actions/Import'" :headers="uploadHeaders" :on-success="uploadSuccess" :show-file-list="false" name="excelfile"> | |
| 77 | + <div class="avatar-box"> | |
| 78 | + <el-button type="warning" icon="el-icon-upload">导入</el-button> | |
| 79 | + </div> | |
| 80 | + </el-upload> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | + <div class="NCC-common-head-right"> | |
| 84 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 85 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 86 | + </el-tooltip> | |
| 87 | + <screenfull isContainer /> | |
| 88 | + </div> | |
| 89 | + </div> | |
| 90 | + <NCC-table v-loading="listLoading" :data="list"> | |
| 91 | + <el-table-column prop="date" label="时间" align="left" :formatter="ncc.tableDateFormatDay"/> | |
| 92 | + <el-table-column prop="platform" label="平台" align="left" /> | |
| 93 | + <el-table-column prop="accountName" label="账号名称" align="left" /> | |
| 94 | + <el-table-column prop="domain" label="域名" align="left" /> | |
| 95 | + <el-table-column prop="problemDescription" label="问题描述" align="left" /> | |
| 96 | + <el-table-column prop="disposalSuggestions" label="处置建议" align="left" /> | |
| 97 | + <el-table-column label="是否取证" prop="whetherCollect" align="left"> | |
| 98 | + <template slot-scope="scope">{{ scope.row.whetherCollect | dynamicText(whetherCollectOptions) }}</template> | |
| 99 | + </el-table-column> | |
| 100 | + <el-table-column prop="evidenceCollectionLink" label="取证链接" align="left" /> | |
| 101 | + <el-table-column prop="remark" label="备注" align="left" /> | |
| 102 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 103 | + <template slot-scope="scope"> | |
| 104 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 105 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 106 | + </template> | |
| 107 | + </el-table-column> | |
| 108 | + </NCC-table> | |
| 109 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 113 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 114 | + </div> | |
| 115 | + </div> | |
| 116 | + </div> | |
| 117 | +</template> | |
| 118 | +<script> | |
| 119 | + import request from '@/utils/request' | |
| 120 | + import NCCForm from './Form' | |
| 121 | + import ExportBox from './ExportBox' | |
| 122 | + export default { | |
| 123 | + components: { NCCForm, ExportBox }, | |
| 124 | + data() { | |
| 125 | + return { | |
| 126 | + uploadHeaders: { | |
| 127 | + Authorization: this.$store.getters.token, | |
| 128 | + IsLogin: true, | |
| 129 | + }, | |
| 130 | + showAll: false, | |
| 131 | + query: { | |
| 132 | + date:undefined, | |
| 133 | + platform:undefined, | |
| 134 | + accountName:undefined, | |
| 135 | + domain:undefined, | |
| 136 | + problemDescription:undefined, | |
| 137 | + disposalSuggestions:undefined, | |
| 138 | + whetherCollect:undefined, | |
| 139 | + evidenceCollectionLink:undefined, | |
| 140 | + remark:undefined, | |
| 141 | + }, | |
| 142 | + list: [], | |
| 143 | + listLoading: true, | |
| 144 | + multipleSelection: [], total: 0, | |
| 145 | + listQuery: { | |
| 146 | + currentPage: 1, | |
| 147 | + pageSize: 20, | |
| 148 | + sort: "desc", | |
| 149 | + sidx: "", | |
| 150 | + }, | |
| 151 | + formVisible: false, | |
| 152 | + exportBoxVisible: false, | |
| 153 | + columnList: [ | |
| 154 | + { prop: 'date', label: '时间' }, | |
| 155 | + { prop: 'platform', label: '平台' }, | |
| 156 | + { prop: 'accountName', label: '账号名称' }, | |
| 157 | + { prop: 'domain', label: '域名' }, | |
| 158 | + { prop: 'problemDescription', label: '问题描述' }, | |
| 159 | + { prop: 'disposalSuggestions', label: '处置建议' }, | |
| 160 | + { prop: 'whetherCollect', label: '是否取证' }, | |
| 161 | + { prop: 'evidenceCollectionLink', label: '取证链接' }, | |
| 162 | + { prop: 'remark', label: '备注' }, | |
| 163 | + ], | |
| 164 | + whetherCollectOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}], | |
| 165 | + } | |
| 166 | + }, | |
| 167 | + computed: {}, | |
| 168 | + created() { | |
| 169 | + this.initData() | |
| 170 | + }, | |
| 171 | + methods: { | |
| 172 | + uploadSuccess(response, file, fileList) { | |
| 173 | + let type = response.code == 200 ? 'success' : 'error'; | |
| 174 | + this.$message({ | |
| 175 | + type: type, | |
| 176 | + message: response.msg, | |
| 177 | + }); | |
| 178 | + // this.initList(); | |
| 179 | + }, | |
| 180 | + initData() { | |
| 181 | + this.listLoading = true; | |
| 182 | + let _query = { | |
| 183 | + ...this.listQuery, | |
| 184 | + ...this.query | |
| 185 | + }; | |
| 186 | + let query = {} | |
| 187 | + for (let key in _query) { | |
| 188 | + if (Array.isArray(_query[key])) { | |
| 189 | + query[key] = _query[key].join() | |
| 190 | + } else { | |
| 191 | + query[key] = _query[key] | |
| 192 | + } | |
| 193 | + } | |
| 194 | + request({ | |
| 195 | + url: `/SubDev/BaseWpardl`, | |
| 196 | + method: 'get', | |
| 197 | + params: query | |
| 198 | + }).then(res => { | |
| 199 | + this.list = res.data.list | |
| 200 | + this.total = res.data.pagination.total | |
| 201 | + this.listLoading = false | |
| 202 | + }) | |
| 203 | + }, | |
| 204 | + handleDel(id) { | |
| 205 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 206 | + type: 'warning' | |
| 207 | + }).then(() => { | |
| 208 | + request({ | |
| 209 | + url: `/SubDev/BaseWpardl/${id}`, | |
| 210 | + method: 'DELETE' | |
| 211 | + }).then(res => { | |
| 212 | + this.$message({ | |
| 213 | + type: 'success', | |
| 214 | + message: res.msg, | |
| 215 | + onClose: () => { | |
| 216 | + this.initData() | |
| 217 | + } | |
| 218 | + }); | |
| 219 | + }) | |
| 220 | + }).catch(() => { | |
| 221 | + }); | |
| 222 | + }, | |
| 223 | + addOrUpdateHandle(id, isDetail) { | |
| 224 | + this.formVisible = true | |
| 225 | + this.$nextTick(() => { | |
| 226 | + this.$refs.NCCForm.init(id, isDetail) | |
| 227 | + }) | |
| 228 | + }, | |
| 229 | + exportData(type) { | |
| 230 | + let obj = {}; | |
| 231 | + if(type) { | |
| 232 | + obj = { | |
| 233 | + url: '/SubDev/BaseCollectAndPreserveEvidence/Actions/GenerateImportTemplate/14', | |
| 234 | + params: {type:14}, | |
| 235 | + method: "GET", | |
| 236 | + responseType: 'blob', | |
| 237 | + } | |
| 238 | + request(obj).then((res) => { | |
| 239 | + if(type) { | |
| 240 | + const blob = new Blob([res], {type: 'application/json'}); | |
| 241 | + const url = window.URL.createObjectURL(blob); | |
| 242 | + let link = document.createElement('a'); | |
| 243 | + link.style.display = 'none'; | |
| 244 | + link.href = url; | |
| 245 | + link.download = '上报处置网站平台、账号台账.xlsx'; | |
| 246 | + link.click(); | |
| 247 | + } else { | |
| 248 | + if(res.code != 200) return; | |
| 249 | + const url = define.APIURl + res.data.url; | |
| 250 | + const link = document.createElement("a"); | |
| 251 | + link.href = url; | |
| 252 | + link.download = res.data.name; | |
| 253 | + link.click(); | |
| 254 | + } | |
| 255 | + }) | |
| 256 | + } else { | |
| 257 | + this.exportBoxVisible = true | |
| 258 | + this.$nextTick(() => { | |
| 259 | + this.$refs.ExportBox.init(this.columnList) | |
| 260 | + }) | |
| 261 | + }; | |
| 262 | + | |
| 263 | + }, | |
| 264 | + // exportData() { | |
| 265 | + // this.exportBoxVisible = true | |
| 266 | + // this.$nextTick(() => { | |
| 267 | + // this.$refs.ExportBox.init(this.columnList) | |
| 268 | + // }) | |
| 269 | + // }, | |
| 270 | + download(data) { | |
| 271 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 272 | + request({ | |
| 273 | + url: `/SubDev/BaseWpardl/Actions/Export`, | |
| 274 | + method: 'GET', | |
| 275 | + data: query | |
| 276 | + }).then(res => { | |
| 277 | + if (!res.data.url) return | |
| 278 | + window.location.href = this.define.comUrl + res.data.url | |
| 279 | + this.$refs.ExportBox.visible = false | |
| 280 | + this.exportBoxVisible = false | |
| 281 | + }) | |
| 282 | + }, | |
| 283 | + search() { | |
| 284 | + this.listQuery = { | |
| 285 | + currentPage: 1, | |
| 286 | + pageSize: 20, | |
| 287 | + sort: "desc", | |
| 288 | + sidx: "", | |
| 289 | + } | |
| 290 | + this.initData() | |
| 291 | + }, | |
| 292 | + refresh(isrRefresh) { | |
| 293 | + this.formVisible = false | |
| 294 | + if (isrRefresh) this.reset() | |
| 295 | + }, | |
| 296 | + reset() { | |
| 297 | + for (let key in this.query) { | |
| 298 | + this.query[key] = undefined | |
| 299 | + } | |
| 300 | + this.listQuery = { | |
| 301 | + currentPage: 1, | |
| 302 | + pageSize: 20, | |
| 303 | + sort: "desc", | |
| 304 | + sidx: "", | |
| 305 | + } | |
| 306 | + this.initData() | |
| 307 | + } | |
| 308 | + } | |
| 309 | + } | |
| 310 | +</script> | |
| 0 | 311 | \ No newline at end of file | ... | ... |
src/views/overView/msgForm.vue
| ... | ... | @@ -79,6 +79,16 @@ |
| 79 | 79 | </div> |
| 80 | 80 | </el-form-item> |
| 81 | 81 | </el-col> |
| 82 | + <el-col :span="24"> | |
| 83 | + <el-form-item label="发布人" prop="creater"> | |
| 84 | + <el-input v-model="dataForm.creater"></el-input> | |
| 85 | + </el-form-item> | |
| 86 | + </el-col> | |
| 87 | + <el-col :span="24"> | |
| 88 | + <el-form-item label="联系方式" prop="createrPhone"> | |
| 89 | + <el-input v-model="dataForm.createrPhone"></el-input> | |
| 90 | + </el-form-item> | |
| 91 | + </el-col> | |
| 82 | 92 | </el-form> |
| 83 | 93 | </div> |
| 84 | 94 | <div |
| ... | ... | @@ -89,6 +99,7 @@ |
| 89 | 99 | > |
| 90 | 100 | <div class="msg-title">{{ dataForm.title }}</div> |
| 91 | 101 | <div class="content" v-html="dataForm.bodyContent"></div> |
| 102 | + | |
| 92 | 103 | <div class="files"> |
| 93 | 104 | <h4>附件</h4> |
| 94 | 105 | <div style="margin-bottom: 10px;"> |
| ... | ... | @@ -120,6 +131,9 @@ |
| 120 | 131 | </el-tag> |
| 121 | 132 | </div> |
| 122 | 133 | </div> |
| 134 | + <div style="font-size: 12px;margin-top: 10px;">时间:{{ncc.dateFormat(dataForm.createTime) }}</div> | |
| 135 | + <div style="font-size: 12px;margin-top: 10px;">发布人:{{dataForm.creater || '--'}}</div> | |
| 136 | + <div style="font-size: 12px;margin-top: 10px;">联系方式:{{dataForm.createrPhone || '--'}}</div> | |
| 123 | 137 | </div> |
| 124 | 138 | </div> |
| 125 | 139 | <span slot="footer" class="dialog-footer"> |
| ... | ... | @@ -155,6 +169,8 @@ export default { |
| 155 | 169 | dataForm: { |
| 156 | 170 | id: "", |
| 157 | 171 | title: "", |
| 172 | + createrPhone:'', | |
| 173 | + creater:'', | |
| 158 | 174 | bodyContent: "", |
| 159 | 175 | imgUrl: [], |
| 160 | 176 | categoryId: "cc225c68421644f79037aaf624ccccc0", |
| ... | ... | @@ -272,6 +288,8 @@ export default { |
| 272 | 288 | this.$forceUpdate(); |
| 273 | 289 | }, |
| 274 | 290 | dataFormSubmit() { |
| 291 | + console.error(this.dataForm) | |
| 292 | + // return | |
| 275 | 293 | this.$refs["elForm"].validate((valid) => { |
| 276 | 294 | if (valid) { |
| 277 | 295 | !this.dataForm.id ? this.toPostForm('/SubDev/ZyOaArticle', 'post') : this.toPostForm(`/SubDev/ZyOaArticle/${this.dataForm.id}`, 'put'); | ... | ... |