| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820 |
- <template>
- <div>
- <el-container>
- <el-aside
- v-if="!rowId"
- width="318px"
- style="border-right:2px solid #d5d5ff;float:left;height:calc(100vh - 100px)">
- <wt-left-tree orgType="035" :isAll="!hasPriv" @treeNodeClickHandler="treeNodeClickHandler"
- @changeYear="changeYear"
- @organList="getAllTreeData"></wt-left-tree>
- </el-aside>
- <el-main style="margin:0px;padding:10px;overflow-y:hidden;" class="shuiku" v-loading="exportLoading">
- <div class="search_wrapper">
- <el-form :inline="true" :model="problemSearch" class="demo-form-inline">
- <el-form-item label="工程名称">
- <el-input v-model="problemSearch.nm" clearable></el-input>
- </el-form-item>
- <el-form-item label="问题类别">
- <el-input v-model="problemSearch.inspPblmName" clearable></el-input>
- </el-form-item>
- <el-form-item label="是否典型">
- <el-select v-model="problemSearch.ifCasePblm" clearable placeholder="请选择">
- <el-option
- v-for="item in supervision"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="发现时间">
- <el-date-picker
- v-model="findTime"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="问题督查状态:">
- <el-select v-model="problemSearch.state" clearable placeholder="请选择">
- <el-option
- v-for="item in stateList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div>
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;"
- type="success"
- icon="el-icon-upload2"
- @click="showPlDialog"
- :disabled="uploadDisabled"> 批 量 填 报
- </el-button>
- <el-button style="color:rgba(255,255,255,1);float:right;margin-right:20px;margin-bottom:5px"
- type="primary"
- icon="el-icon-search"
- @click="search"> 查 询
- </el-button>
- <el-button style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-bottom:5px;"
- type="success"
- icon="el-icon-download"
- @click="exportWord"
- :disabled="uploadDisabled">导出WORD
- </el-button>
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;"
- type="success"
- icon="el-icon-download"
- @click="downloadTemplate"
- :disabled="uploadDisabled"
- >导出EXCEL
- </el-button>
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- @click="submitBtn"
- >问题提交
- </el-button>
- <el-button
- v-if="isGd"
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- icon="el-icon-download"
- @click="toForm"
- >导出一表一单
- </el-button>
- <YuDiBaWentiPl v-if="showTianBaoPl"
- :showTianBaoPl="showTianBaoPl"
- titleName="中小河流治理检查"
- @closePlDialog="closePlDialog">
- </YuDiBaWentiPl>
- </div>
- </div>
- <el-table
- :data="tableData"
- border
- :height="tableHeight"
- v-loading="loading"
- style="width: 100%">
- <el-table-column
- type="selection"
- min-width="55">
- </el-table-column>
- <el-table-column
- fixed
- type="index"
- label="序号"
- width="50">
- </el-table-column>
- <el-table-column
- prop="adFullName"
- show-overflow-tooltip
- label="行政区划"
- min-width="180">
- </el-table-column>
- <el-table-column
- prop="nm"
- show-overflow-tooltip
- label="督查对象名称"
- min-width="180">
- </el-table-column>
- <el-table-column
- min-width="140"
- prop="inspPblmName"
- label="问题类别"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- min-width="140"
- prop="checkPointBz"
- label="检查项目"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- show-overflow-tooltip
- prop="inspPblmDesc"
- label="督查问题描述"
- min-width="150">
- </el-table-column>
- <el-table-column
- prop="ifCasePblm"
- label="是否典型"
- min-width="90">
- <template slot-scope="scope">
- {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- prop="attachBz"
- label="附件序号"
- min-width="150">
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- prop="snNumBz"
- label="问题序号"
- min-width="150">
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="70"
- prop="persName"
- label="上报人"
- ></el-table-column>
- <el-table-column
- prop="collTime"
- label="发现时间"
- min-width="150">
- <template slot-scope="scope">
- {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
- </template>
- </el-table-column>
- <el-table-column
- fixed="right"
- label="操作"
- align="center"
- min-width="130">
- <template slot-scope="scope">
- <span style="margin-right:10px;" v-if="hasPriv">
- <el-button icon="el-icon-s-flag" type="text" v-if="scope.row.quote == '1'" title="已被督查简报引用"
- @click="changeSfYy(scope.row.pblmId,1)"></el-button>
- <i class="el-icon-s-flag" v-else title="未被督查简报引用" @click="changeSfYy(scope.row.pblmId,0)"
- style="cursor: pointer;"></i>
- </span>
- <el-button icon="el-icon-view" title="查看详情" type="text"
- @click="toShowDetail(scope.row)"></el-button>
- <el-button icon="el-icon-edit" title="修改问题" type="text" v-if="hasPriv"
- @click="toEditProblem(scope.row)"></el-button>
- <el-button icon="el-icon-delete" type="text" title="删除问题"
- @click="removeSuperviseOne(scope.row)"
- v-if="hasPriv"></el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination :pager-count="5" :current-page="pageIndex"
- :page-size="pageSize" layout="total, prev, pager, next" :total="total"
- @current-change="pageIndexChange" @size-change="handleSizeChange"
- ></el-pagination>
- </el-main>
- </el-container>
- <!-- 修改组件 -->
- <problem-edit :editId="problemId" @closeEditDialog="closeEditDialog" v-if="edit_dialogVisible"></problem-edit>
- <!-- 详情组件-->
- <el-dialog
- class="custom_dialog"
- title="问题详情"
- width="60%"
- append-to-body
- v-if="supervisionDetailsVisible"
- :visible.sync="supervisionDetailsVisible">
- <supervision-details ref="xianqing" :problemId="problemId"></supervision-details>
- <span slot="footer">
- <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
- </span>
- </el-dialog>
- <!-- 删除组件 -->
- <el-dialog class="deleteDialog" title="问题删除描述" append-to-body :visible.sync="problemDeleteVisible">
- <Problem-delete
- ref="deleteMiaoShu"
- :deleteProblemId="deleteId"
- @deleteSuccess="deleteSuccess"
- ></Problem-delete>
- <span slot="footer">
- <el-button @click="problemDeleteVisible = false">返回</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {pblmSubmit} from "@api/duChaAPI.js";
- import {formatDateTime2} from '@util/gw_date.js'
- import request from '@util/gw_ajax_request.js'
- import YuDiBaWentiPl from './problemBatchImp/tongYongWenti_piliang.vue'
- import wtLeftTree from "./wtcz_lefttree.vue"
- import { hostUrl } from "@util/global_variable.js";
- export default {
- props: ["rowId"],
- data() {
- return {
- currentRow: {},
- edit_dialogVisible: false,
- tableHeight: window.innerHeight - 250,
- tableData: [
- {
- date: '',
- name: '',
- province: '',
- city: '',
- address: '',
- zip: ''
- }
- ],
- problemSearch: {
- problemType: '',
- inspPblmCate: '',
- regid: '',
- regId: '',
- pType: '',
- pageSize: '20',
- pageNum: 1,
- nm: '',
- state: ''
- },
- stateList: [
- {
- label: '未提交',
- value: '0'
- },
- {
- label: '已提交',
- value: '2'
- },
- {
- label: '已发布',
- value: '3'
- }
- ],
- problemForm: {
- objId: '',
- objType: '',
- problemType: '',
- inspPblmDesc: '',
- pblmsTypeId: '',
- qualityTypeId: '',
- pblmsId: '',
- defectTypeId: '',
- ifCasePblm: '',
- inspPblmCate: '',
- weigui: '',
- hetong: '',
- quanlity: '',
- gongcheng: '',
- gwComFiles: []
- },
- rectifyForm: {
- rectConc: '',
- rectMeas: '',
- collTime: '',
- gwComFiles: [{
- id: "",
- filePath: "",
- bizId: ""
- }]
- },
- weigui: {
- pblmRelDics: [],
- pblmSn: ''
- },
- hetong: {
- pblmRelDics: [],
- pblmSn: ''
- },
- quanlity: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongcheng: {
- pblmRelDics: [],
- pblmSn: ''
- },
- pblmPointNum: '',
- pblmDescList: '',
- pblmDescListHetong: '',
- pblmAttach: [],
- pblmsTypeId: '',
- pblmId: '',
- imgList: [],
- videoList: [],
- audioList: [],
- pblmStat: '',
- gwComFiles: [],
- problemType: [],
- problemStatus: [
- {name: '已复查', value: '2'},
- {name: '未复查', value: '1'},
- {name: '新问题', value: '0'}
- ],
- rectifyStatus: [
- {name: '未整改', value: '0'},
- {name: '整改中', value: '1'},
- {name: '已整改', value: '2'}
- ],
- severity: [
- {name: '一般', value: '0'},
- {name: '较重', value: '1'},
- {name: '严重', value: '2'},
- // {name: '非常严重',value:'3'}
- ],
- dialogType: '添加',
- dialogVisible: true,
- add_dialogVisible: false,
- recheck_dialogVisible: false,
- chooseWeiguiProblem: false,
- chooseHeTongProblem: false,
- chooseQuanlityProblem: false,
- chooseGongchengProblem: false,
- checked: false,
- problemId: '',
- supervisionDetailsVisible: false,
- projectType: '',
- findTime: [],
- rectifyRow: {},
- isRectify: false,
- rectifyId: '',
- activeName: 'problem-detail',
- pageIndex: 1,
- pageSize: 20,
- total: 0,
- treeData: [],
- findUseOrgArray: [],
- treeNodeArray: [],
- loading: true,
- multipleSelection: [], // 已选
- rectifyProblemInfo: null,
- exportLoading: false,
- datas: {},
- showTianBaoPl: false,
- orgIds: '',
- uploadDisabled: true,
- supervision: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- problemDeleteVisible: false,
- deleteId: "",
- treeAllData: [],
- newYear: "",
- stateList: [
- {
- label: '未提交',
- value: '0'
- },
- {
- label: '已提交',
- value: '2'
- },
- {
- label: '已发布',
- value: '3'
- }
- ],
- }
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- formatDateTime() {
- return formatDateTime2
- },
- hostUrl() {
- return hostUrl
- },
- hasPriv() {
- return this.ownPriv('manage')
- },
- isGd(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
- return true;
- }else{
- return false;
- }
- }
- },
- components: {
- upload: resolve => {
- require(["../../widgets/uploadFile.vue"], resolve);
- },
- // 修改问题
- problemEdit: resolve => {
- require(["../duChaTianBao/zxhlzl/problemModify.vue"], resolve);
- },
- //详情页
- supervisionDetails: resolve => {
- require(["../duChaTianBao/zxhlzl/problemDetail.vue"], resolve);
- },
- // 删除描述页
- ProblemDelete: resolve => {
- require(["../duChaWenTi/problemDelete.vue"], resolve);
- },
- YuDiBaWentiPl: YuDiBaWentiPl,
- wtLeftTree: wtLeftTree
- },
- mounted() {
- this.search();
- // this.getproblemSmallType();
- this.findParams = {
- hasVedio: "",
- adCode: "",
- pblmStat: "",
- inspPblmCate: "",
- ifCasePblm: "",
- nm: "",
- rsName: "",
- adFullName: "",
- startTime: "",
- endTime: "",
- inspPblmName: "",
- persId: localStorage.getItem("userid"),
- state: ''
- }
- },
- activated() {
- },
- methods: {
- search() {
- this.searchList()
- },
- async searchList() {
- let _self = this;
- this.problemSearch.persId = this.persId
- this.problemSearch.pType = '35'
- this.problemSearch.pageSize = this.pageSize
- this.problemSearch.pageNum = this.pageIndex
- console.log(this.findTime)
- if (this.findTime && this.findTime.length) {
- this.problemSearch['startTime'] = this.findTime[0]
- this.problemSearch['endTime'] = this.findTime[1]
- } else {
- this.problemSearch['startTime'] = ''
- this.problemSearch['endTime'] = ''
- }
- _self.loading = true;
- let orgAllNode = this.treeAllData;
- let data = _self.problemSearch;
- _self.findUseOrgArray = [];
- _self.treeNodeArray.forEach(item => {
- if (item.id.length < 12) {
- orgAllNode.forEach(orgItem => {
- if (orgItem.id.startsWith(item.code)) {
- _self.findUseOrgArray.push(orgItem.id);
- }
- });
- }
- _self.findUseOrgArray.push(item.id);
- });
- if (_self.findUseOrgArray.length > 0) {
- data["orgIds"] = _self.findUseOrgArray.join(",");
- this.orgIds = _self.findUseOrgArray.join(",");
- } else {
- data["orgIds"] = "";
- }
- if (_self.rowId) data["orgIds"] = _self.rowId;
- data["year"] = this.newYear;
- if (!this.hasPriv) data['isAll'] = 1 //只浏览的时候增加isAll参数 左侧树和问题列表展示所有机构
- request.post(`/dc/insp/pblm/page/wiuPblm`, this.problemSearch).then(res => {
- _self.loading = false;
- this.tableData = res.data.list;
- this.total = res.data.total;
- });
- },
- async submitBtn() {
- if (this.multipleSelection.length === 0) {
- this.$message.warning('请至少选择一条问题');
- return;
- }
- let newArray = this.multipleSelection.map((item) => {
- return {
- "objId": item.objId,
- "objType": item.objType,
- "state": "3"
- }
- });
- const {success, message} = await pblmSubmit(newArray);
- if (success) {
- this.$message.success('问题发布成功');
- this.search();
- } else {
- this.$message.warning(message);
- }
- },
- toEditProblem(row) {
- this.dialogType = '修改'
- this.unitProblemInfo = row
- this.problemId = row.pblmId
- this.edit_dialogVisible = true
- },
- // 查看详情
- toShowDetail(row) {
- this.problemId = row.pblmId
- this.supervisionDetailsVisible = true
- },
- //删除问题
- removeSuperviseOne(row) {
- this.deleteId = row.pblmId
- this.problemDeleteVisible = true
- },
- deleteSuccess() {
- this.problemDeleteVisible = false;
- this.searchList();
- },
- // 文件上传
- submitUpload() {
- this.$refs.upload.submit();
- },
- updatefilelist(arg) {
- if (this.isRectify) {
- request.post('/dc/insp/rectFdbk', {
- id: this.pblmId,
- gwComFiles: arg
- }).then(res => {
- this.removeNewSupervision()
- });
- } else {
- if (this.dialogType == '修改') {
- this.problemForm.gwComFiles = this.problemForm.gwComFiles.concat(arg)
- } else {
- this.problemForm.gwComFiles = arg
- }
- request.post('/dc/insp/pblm/update', {
- pblmId: this.pblmId,
- gwComFiles: this.problemForm.gwComFiles,
- pblmStat: this.pblmStat
- }).then(res => {
- this.searchList()
- this.removeNewSupervision()
- });
- }
- },
- removeNewSupervision(arg) {
- if (arg) {
- console.log(arg);
- var args = this.gwComFiles.concat(arg);
- this.updatefilelist(args);
- }
- this.$message.success('保存成功')
- this.$emit('closeDialog')
- this.gwComFiles = [];
- this.$refs.uploadFile.init();
- },
- handleClose() {
- this.$emit('dialogClose')
- },
- handleDetailClick(tab, event) {
- console.log(tab, event);
- },
- pageIndexChange(val) {
- this.pageIndex = val;
- this.searchList();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.searchList();
- },
- closeEditDialog() {
- this.edit_dialogVisible = false;
- this.searchList()
- },
- closeRectifyEditDialog() {
- this.recheck_dialogVisible = false
- this.searchList()
- },
- async exportWord() {
- let _self = this;
- _self.exportLoading = true;
- let orgAllNode = this.treeAllData;
- let data = _self.findParams;
- data.pageNum = _self.pageIndex;
- data.pageSize = _self.pageSize;
- data.pType = "35";
- data.orgIds = _self.orgIds;
- this.datas = data;
- _self.treeNodeArray.forEach(item => {
- if (item.id.length < 12) {
- orgAllNode.forEach(orgItem => {
- if (orgItem.id.startsWith(item.id)) {
- _self.findUseOrgArray.push(orgItem.id);
- }
- });
- } else {
- _self.findUseOrgArray.push(item.id);
- }
- });
- //下载word文档2
- await request.post('/pblm/doc', this.datas).then(res => {
- if (res.success) {
- _self.exportLoading = false;
- console.log(this.response)
- var a = document.createElement('a');
- a.href = `${this.hostUrl}${res.data.downloadPath}`;
- //设置文件名称
- a.download = '中小河流治理问题详情.doc';
- a.click();
- } else {
- _self.$message.error(res.message);
- }
- }).catch(res => {
- _self.$message.error(res.message);
- })
- },
- toForm(){
- var idArr = [];
- if(this.multipleSelection && this.multipleSelection.length==0){
- this.$message.warning("请选择数据");
- return false;
- }else{
- this.multipleSelection.forEach((item)=>{
- idArr.push(item.pblmId);
- })
- }
- var ids = idArr.join(",");
- let host = hostUrl;
- let nginx = '/pageofficePath/';
- let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?ids='+ids+'&filename=pblm|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
- let a = document.createElement('a'); // 创建a标签
- a.setAttribute('href', href);// href链接
- a.click();// 自执行点击事件
- },
- // 下载模板
- async downloadTemplate() {
- await this.searchList();
- await this.downloadTemplateSet();
- this.uploadDisabled = false;
- },
- downloadTemplateSet() {
- // 根据过滤条件下载数据
- let datas = JSON.stringify(this.problemSearch);
- // let href = '/api/dc/imp/pblm/download?userId=' + this.persId + '&orgType=035&orgIds=' + this.orgIds + '&datas=' + datas;
- let href = '/dc/imp/pblm/download?userId=' + this.persId + '&orgType=035&orgIds=' + this.orgIds + '&datas=' + datas;
- const a = document.createElement('a'); // 创建a标签
- a.setAttribute('download', '中小河流治理问题.xls');// download属性
- a.setAttribute('href', href);// href链接
- a.click();// 自执行点击事件
- },
- //切换问题是否被督查简报调用
- changeSfYy(row, val) {
- this.$confirm('此问题将切换是否被督查简报引用, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- if (val) {
- request.post(`/dc/insp/pblm/update`, {
- "pblmId": row,
- "quote": 0
- }).then(res => {
- if (res.success) {
- this.search();
- }
- })
- } else {
- request.post(`/dc/insp/pblm/update`, {
- "pblmId": row,
- "quote": 1
- }).then(res => {
- if (res.success) {
- this.search();
- }
- })
- }
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消切换'
- });
- });
- },
- showPlDialog() {
- this.showTianBaoPl = true
- },
- closePlDialog(val) {
- this.showTianBaoPl = false
- this.search();
- },
- treeNodeClickHandler(data) {
- this.treeNodeArray = data;
- },
- changeYear(val) {
- this.newYear = val;
- this.search();
- },
- getAllTreeData(data) {
- this.treeAllData = data;
- }
- },
- watch: {
- rowId(val) {
- if (val) {
- this.search();
- }
- }
- },
- filters: {
- inspPblmCate(val) {
- if (!val || val == '') {
- return ''
- }
- if (val == '0') {
- return '一般'
- } else if (val == '1') {
- return '较重'
- } else if (val == '2') {
- return '严重'
- } else {
- return val
- }
- },
- }
- }
- </script>
- <style lang="scss">
- .search_wrapper {
- display: flex;
- justify-content: space-between;
- min-height: 110px;
- div:last-child {
- min-width: 160px;
- }
- }
- .slide-line {
- width: 96%;
- margin-left: 3%;
- height: 1px;
- margin-bottom: 10px;
- border-bottom: dashed 1px #DCDFE6;
- }
- .detail_dialog .el-dialog__body {
- padding: 0 20px 30px;
- }
- .inspPblmCate {
- padding: 2px 10px;
- border-radius: 10px;
- color: #ffffff;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- }
- </style>
|