| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026 |
- <template>
- <el-container class="rectify_reform">
- <el-main>
- <el-card class="box-card" :style="{'height': cardHeight + 'px','overflow-y':'auto'}">
- <!--20191226bytanghy-->
- <el-row :gutter="20" type="flex" justify="start" class="notice_title">
- <el-col :span="16">
- <el-form :inline="true" size="mini" class="demo-form-inline" label-width="80px">
- <el-form-item label="行政区">
- <el-select
- v-model="addForm.rectOrgId"
- clearable
- collapse-tags ref="selectProvince" @change="select_handler_province">
- <el-option
- v-for="item in pidList"
- :key="item.orgId"
- :label="item.orgNm"
- :value="item.orgId">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="选择年度">
- <el-select
- v-model="addForm.year"
- clearable
- collapse-tags>
- <el-option
- v-for="item in yearList"
- :key="item.id"
- :label="item.year"
- :value="item.year">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="督查类型">
- <el-select
- v-model="addForm.sndType "
- clearable
- collapse-tags>
- <el-option
- v-for="item in typesList"
- :key="item.code"
- :label="item.name"
- :value="item.code">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="下发状态">
- <el-select
- v-model="addForm.state"
- clearable
- collapse-tags>
- <el-option label="已下发" value="1"></el-option>
- <el-option label="未下发" value="0"></el-option>
- <el-option label="已反馈" value="2"></el-option>
- <el-option label="审核通过" value="3"></el-option>
- <el-option label="驳回" value="4"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </el-col>
- <el-col :span="8" style="text-align: end;">
- <el-button type="primary" @click="searchNotice">查询</el-button>
- <el-button type="primary" @click="addZgTz">新建问责通知</el-button>
- <!--<el-button type="primary" @click="addZgTz">导出Excel</el-button>-->
- <!--<el-button type="primary" @click="addZgTz">批量导入</el-button>-->
- </el-col>
- </el-row>
- <div>
- <el-table
- border
- ref="multipleTable"
- :height="tableHeight"
- :data="tableData"
- tooltip-effect="dark"
- style="width: 100%"
- >
- <el-table-column align="center" type="index" label="序号" min-width="25">
- <template slot-scope="scope">{{ (pageNum - 1) * pageSize + (scope.$index + 1) }}</template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- prop="sndTitle"
- label="通知标题"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- prop="sndType"
- label="督查类型"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{typesListFy(scope.row.sndType)}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- prop="sndNub"
- label="文号"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="rectOrgName"
- label="接收地区"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="crrtTm"
- label="整改截止时间"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span>{{formatDate(scope.row.crrtTm)}}</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="note"
- label="备注"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="160"
- prop="fileName"
- label="附件"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-button type="text" size="mini" @click="previewAttachment(scope.row)">{{scope.row.fileName}}</el-button>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="pjctSize"
- label="工程"
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="pblmSize"
- label="问题数"
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="rectTm"
- label="下发时间"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span v-if="scope.row.rectTm">{{formatDate(scope.row.rectTm)}}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- min-width="350"
- label="操作"
- fixed="right"
- >
- <template slot-scope="scope">
- <span v-if="Number(scope.row.state) > 0">
- <el-button type="success" size="mini" @click="lookOver(scope.row)">查看</el-button>
- <el-button type="danger" size="mini" @click="deleteRow(scope.row)">删除</el-button>
- </span>
- <span v-if="scope.row.state == '0'">
- <el-button type="primary" size="mini" @click="editorRow(scope.row)">编辑</el-button>
- <el-button type="primary" size="mini" @click="wzJyClick(scope.row)">问责建议</el-button>
- <el-button type="primary" size="mini" @click="xiaFaClick(scope.row)">下发</el-button>
- </span>
- </template>
- </el-table-column>
- </el-table>
- <!--<el-pagination-->
- <!--style="margin: 10px auto"-->
- <!--background-->
- <!--:pager-count="5"-->
- <!--:current-page="pageNum"-->
- <!--:page-size="pageSize"-->
- <!--:page-sizes="[10, 20, 30, 40, 50, 100]"-->
- <!--layout="sizes, total, prev, pager, next"-->
- <!--:total="tableData.length"-->
- <!--@current-change="handleCurrentChange"-->
- <!--@size-change="handleSizeChange"-->
- <!--></el-pagination>-->
- </div>
- </el-card>
- <el-dialog :title="titleText + '问责通知'" :visible.sync="dialogFormEditorVisible" :close-on-click-modal="false" width="50%" @close="closeDialog">
- <el-form :model="tongZhiForm" ref="tongZhiForm" :label-width="formLabelWidth" :rules="TzRules" v-if="dialogFormEditorVisible">
- <el-row :gutter="20" type="flex" justify="start">
- <el-col :span="12">
- <el-form-item label="督查类型" prop="sndType">
- <el-select v-model="tongZhiForm.sndType" placeholder="请选择督查类型" :disabled="zgButton" clearable>
- <el-option
- v-for="item in typesList"
- :key="item.code"
- :label="item.name"
- :value="item.code">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20" type="flex" justify="start">
- <el-col :span="12">
- <el-form-item label="通知标题" prop="sndTitle">
- <el-input v-model="tongZhiForm.sndTitle" placeholder="请输入通知标题" :disabled="zgButton"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="文号" prop="sndNub">
- <el-input v-model="tongZhiForm.sndNub" placeholder="请输入文号" :disabled="zgButton"></el-input>
- </el-form-item>
- <!--<el-form-item label="整改截止时间" prop="crrtTm">-->
- <!--<el-date-picker-->
- <!--v-model="tongZhiForm.crrtTm"-->
- <!--type="date"-->
- <!--value-format="yyyy-MM-dd"-->
- <!--placeholder="选择整改截止时间" :disabled="zgButton">-->
- <!--</el-date-picker>-->
- <!--</el-form-item>-->
- </el-col>
- </el-row>
- <el-row :gutter="20" type="flex" justify="start">
- <!--<el-col :span="12">-->
- <!--</el-col>-->
- <el-col :span="12">
- <el-form-item label="接收单位" prop="rectOrgId">
- <el-select v-model="tongZhiForm.rectOrgId" placeholder="请选择接收单位" :disabled="zgButton">
- <el-option
- v-for="item in pidList"
- :key="item.orgId"
- :label="item.orgNm"
- :value="item.orgId">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-form-item label="备注">
- <el-input type="textarea" rows="6" v-model="tongZhiForm.note" clearable placeholder="请输入备注" :disabled="zgButton"></el-input>
- </el-form-item>
- <el-form-item label="附件">
- <div v-show="ifFileList">
- <upload
- ref="uploadFile"
- :url="`/pdcApi/file/insert?bizId=`"
- accept=".doc,.docx,.pdf"
- @uploadOver="removeNewSupervision"
- ></upload>
- </div>
- <div v-show="!ifFileList">
- <el-table
- :data="fileListPiCi"
- style="width: 100%">
- <el-table-column
- prop="name"
- label="附件名称"
- min-width="200">
- </el-table-column>
- <el-table-column
- label="操作"
- min-width="150">
- <template slot-scope="scope">
- <el-button @click="deleteFiles(scope.row)" type="text" size="small" :disabled="zgButton">删除
- </el-button>
- <el-button type="text" size="small" @click="toPreview(scope.row)">预览</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-form-item>
- </el-form>
- <div style="text-align: end;">
- <el-button type="primary" @click="tongZhiSave('tongZhiForm')" :disabled="zgButton">保 存</el-button>
- </div>
- <div v-if="titleText =='查看'">
- <el-divider></el-divider>
- <el-row :gutter="20" type="flex" style="margin-bottom: 10px;">
- <el-col :span="20">
- <h3>问责建议</h3>
- <!--<el-form :inline="true" size="mini" class="demo-form-inline">-->
- <!--<el-form-item label="工程">-->
- <!--<el-input v-model="editorForm.name" clearable placeholder="请输入工程" style="width: 8vw"></el-input>-->
- <!--</el-form-item>-->
- <!--<el-form-item label="问题类别">-->
- <!--<el-input v-model="editorForm.inspPblmName" clearable placeholder="请输入问题类别" style="width: 8vw"></el-input>-->
- <!--</el-form-item>-->
- <!--<el-form-item label="严重程度">-->
- <!--<el-select v-model="editorForm.inspPblmCate" clearable placeholder="请选择">-->
- <!--<el-option-->
- <!--v-for="item in supervisionState"-->
- <!--:key="item.value"-->
- <!--:label="item.label"-->
- <!--:value="item.value"-->
- <!--></el-option>-->
- <!--</el-select>-->
- <!--</el-form-item>-->
- <!--<!–<el-form-item label="是否典型">–>-->
- <!--<!–<el-select v-model="editorForm.state" clearable style="width: 8vw">–>-->
- <!--<!–<el-option label="未下发" value="0"></el-option>–>-->
- <!--<!–<el-option label="已下发" value="1"></el-option>–>-->
- <!--<!–<el-option label="已反馈" value="2"></el-option>–>-->
- <!--<!–</el-select>–>-->
- <!--<!–</el-form-item>–>-->
- <!--</el-form>-->
- </el-col>
- <el-col :span="2" :offset=2 style="text-align: end;">
- <el-button @click="searchClick" type="success">导出</el-button>
- </el-col>
- </el-row>
- <div class="dialog-body" style="width: 100%;height: 40vh;">
- <iframe
- v-show="iframeState"
- id="iframeEleView"
- :src="tableSrc"
- frameborder="0"
- width="100%"
- height="100%"
- style="overflow: auto"
- ></iframe>
- </div>
- </div>
- </el-dialog>
- <!--问责建议-->
- <el-dialog title="问责建议" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="50%">
- <div class="dialog-body" style="width: 100%;height: 50vh;">
- <iframe
- v-show="iframeState"
- id="iframeEle"
- :src="tableSrc"
- frameborder="0"
- width="100%"
- height="100%"
- style="overflow: auto"
- ></iframe>
- </div>
- </el-dialog>
- </el-main>
- <addPblm v-if="addPblmDialog" @closeDialog="closeDialogAddPblm" :RowId="RowId" :supervisionState="supervisionState" :objType="objType" :rectId="rectId"></addPblm>
- <!-- 详情弹框 -->
- <el-dialog
- class="outerDialog custom_dialog"
- title="问题详情"
- width="60%"
- v-if="supervisionDetailsVisible"
- :visible.sync="supervisionDetailsVisible"
- >
- <supervision-details ref="xianqing" :problemId="currentProblemId" :objType="objType"></supervision-details>
- <span slot="footer">
- <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
- </span>
- </el-dialog>
- </el-container>
- </template>
- <script>
- import request from '@util/gw_ajax_request'
- import {dateFormat} from '@util/gw_date';
- import {hostUrl} from '@util/global_variable.js'
- import addPblm from './addPblm'
- export default {
- name: "rectificationNotice",
- props: [],
- data() {
- return {
- cardHeight: window.innerHeight - 120,
- currentPage: 1,
- tableData: [],
- tableHeight: window.innerHeight - 220,
- tableHeight1: window.innerHeight * .2,
- loading: false,
- pageSize: 20,
- pageNum: 1,
- dialogFaTitle: "",
- formLabelWidth: '120px',
- tongZhiForm:{
- "sndType": "",//发文类型 '1','小型水库', '2','人饮工程', '3','水毁工程', '4','工程建设', '5','地下水', '7','运行管理', '6','水闸', '9','特定飞检', '10','其他填报', '11','淤地坝', '12','取水口','13','重要水源地', '14','分水及管控', '15','节水管理与评价', '16','用水单位抽查'
- "sndTitle": "", //通知标题
- "sndNub": "", //通知文号
- "rectOrgId": "", //接收单位ID
- "rectOrgName": "", //接收单位名称
- // "crrtTm": "", //整改截止时间
- "note": "", //备注
- "persId": "" //插入人ID
- },
- curStatus: '编辑',
- zgButton: false,
- zgfkDialog: false,
- ifMinistriesAgencies: false,
- groupId: '',
- addvcd: '',
- treeDataLists: [],
- defaultExpanded: [],
- defaultProps: {
- children: 'children',
- label: 'pnm'
- },
- distributeState: false, //false 未下发 true 已下发
- dialogFormVisible: false, //上传文件弹窗
- dialogFormEditorVisible: false,
- gwComFileList: [],
- yiShengyiDanList: [],
- PblmList:[],
- year: '',
- province: '',
- addForm: {
- "state":"", // 状态 0 未下发 1 已下发 2 已反馈 3审核通过 4 驳回 ,
- "rectOrgId":"", // 单位 非必须
- "year":"", //年度
- "sndType": "",
- "sndOrgId":localStorage.getItem('currentOrgId')
- },
- //问责编辑
- wenzeForm:{ // 单位 非必须
- "year":"", //年度
- "sndType": "",
- "state": ""
- },
- editorForm: {
- "rectId":null,
- "name": null,
- "inspPblmName": null,//问题类别
- "inspPblmCate": null,//严重程度
- },
- yearList: [],
- pidList: [],
- sfType: [
- {
- label: '是',
- value: "1"
- },
- {
- label: '否',
- value: "2"
- }
- ],
- titleText: '新建',
- header: {
- 'persId': localStorage.getItem('userid'),
- 'accessToken': localStorage.getItem('accessToken')
- },
- fileList: [],
- provincesList: [],
- url: null,
- yiShengyiDanRowId: null,
- yearBatchSelect: false,
- ifFileList: true,
- fileListPiCi:[],
- PcData: null,
- typesList: [],
- tongZhiRowId: null,
- supervisionState: [
- {
- value: "0",
- label: "一般"
- },
- {
- value: "1",
- label: "较重"
- },
- {
- value: "2",
- label: "严重"
- },
- {
- value: "3",
- label: "特别严重"
- }
- ],
- supervision: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- addPblmDialog: false,
- RowId: null,
- rectId: null,
- objType: null,
- supervisionDetailsVisible: false,
- currentProblemId: null,
- TzRules:{
- sndType:[{ required: true, message: '督查类型不能为空'}],
- sndTitle: [{ required: true, message: '通知标题不能为空'}],
- // crrtTm: [{ required: true, message: '整改截止时间不能为空'}],
- sndNub: [{ required: true, message: '文号不能为空'}],
- rectOrgId: [{ required: true, message: '接收单位不能为空'}],
- },
- tableSrc: "pageofficePath/dc/pageoffice/zgwz/show?id=",
- iframeState: true,
- // http://10.1.102.140:9002/dc/pageoffice/zgwz/show?id=bb2562f77de94ab5aa116f5df2141b80
- }
- },
- components: {
- upload: resolve => {
- require(["@widget/uploadFile.vue"], resolve);
- },
- addPblm,
- //详情页
- supervisionDetails: resolve => {
- require(["./supervisionDetails.vue"], resolve);
- }
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.$nextTick(() => {
- this.getYear();
- this.getByPid();
- this.getTypes();
- this.getNoticeList();
- })
- },
- methods: {
- getYear(){
- request.get(`/tac/pblm/rect/getYear/${this.persId}`)
- .then(res =>{
- if(res.success){
- this.yearList = res.data;
- }
- })
- .catch(err =>{
- console.log(err);
- })
- },
- getByPid(){
- request.get(`/dc/bis/insp/org/getByPid?pid=${localStorage.getItem('currentOrgId')}`)
- .then(res =>{
- if(res.success){
- this.pidList = res.data;
- }
- })
- .catch(err =>{
- console.log(err);
- })
- },
- getTypes(){
- request.post(`/att/insp/type/getTypes`,{})
- .then(res =>{
- if(res.success){
- this.typesList = res.data;
- }
- })
- },
- //-----------------------------------
- formatDate(timestamp) {
- return timestamp ? dateFormat(timestamp, 'yyyy-MM-dd') : "";
- },
- changeYear(item) {
- let _self = this;
- request.get(`tac/pblm/rect/getBatchByYearPersId/${_self.persId}/${item}`)
- .then(res =>{
- _self.pcList = res.data;
- })
- .catch(err =>{
- console.log(err);
- })
- if (item == "" || item == undefined) {
- _self.pcList = null;
- _self.addForm.batch = "";
- }
- },
- lookOver(row) {
- this.titleText = "查看";
- this.ifFileList = false;
- this.RowId = row.id;
- this.objType = row.sndType;
- this.getPblmList();
- request.get(`/bis/insp/rect/${row.id}`)
- .then(res => {
- if (res.success) {
- this.tongZhiForm = res.data;
- this.tongZhiForm.crrtTm = dateFormat(res.data.crrtTm, "yyyy-MM-dd");
- this.dialogFormEditorVisible = true;
- this.$nextTick(() => {
- let iframe = document.getElementById("iframeEleView");
- iframe.src = this.tableSrc + res.data.id;
- })
- if(res.data.fileName && res.data.filePath && res.data.id){
- this.ifFileList = false;
- this.fileListPiCi = [];
- this.fileListPiCi.push(
- Object.assign({},
- {'name':res.data.fileName},
- {'url':res.data.filePath},
- {'id':res.data.id},
- {'fileId':res.data.fileId}
- )
- );
- }
- this.zgButton = true;
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- uploadAfter(data){
- let obj = {
- "id": this.tongZhiRowId,//数据ID
- "fileId": data.id,//附件ID
- "fileName": data.fileName,//附件名称
- "filePath": data.filePath
- }
- request.post(`/bis/insp/rect/update`,obj)
- .then(res =>{
- if(res.success){
- this.dialogFormVisible = false;
- this.$message.success('上传成功');
- this.getNoticeList();
- }
- })
- .catch(err =>{
- })
- },
- //获取当前督查对象下问题List
- getPblmList() {
- let obj = {
- "rectId": this.RowId,//通知ID 必须
- "name": this.editorForm.name,//工程名称 非必传
- "inspPblmName": this.editorForm.inspPblmName,
- "inspPblmCate": this.editorForm.inspPblmCate
- }
- request.post(`/bis/insp/rect/pblm/findList`, obj)
- .then(res => {
- if (res.success) {
- this.$nextTick(() => {
- this.PblmList = res.data;
- this.provincesList = res.data;
- })
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- addZgTz() {
- this.titleText = '新建';
- this.zgButton = false;
- this.yearBatchSelect = false;
- this.dialogFormEditorVisible = true;
- this.fileListPiCi = [];
- this.ifFileList = true;
- for (let obj in this.editorForm) {
- this.editorForm[obj] = '';
- }
- for (let obj in this.tongZhiForm) {
- this.tongZhiForm[obj] = '';
- }
- },
- editorRow(row) {
- this.PcData = row;
- this.titleText = '编辑';
- this.zgButton = false;
- this.fileListPiCi = [];
- this.ifFileList = true;
- request.get(`/bis/insp/rect/${row.id}`)
- .then(res => {
- if (res.success) {
- this.$nextTick(()=>{
- this.tongZhiForm = res.data;
- this.tongZhiForm.crrtTm = dateFormat(res.data.crrtTm, "yyyy-MM-dd");
- this.dialogFormEditorVisible = true;
- if(res.data.fileName && res.data.filePath && res.data.id){
- this.ifFileList = false;
- this.fileListPiCi.push(
- Object.assign({},
- {'name':res.data.fileName},
- {'url':res.data.filePath},
- {'id':res.data.id},
- {'fileId':res.data.fileId}
- )
- );
- }
- })
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- //问责通知
- addPblmRow(row){
- this.RowId = row.id;
- this.rectId = row.rectOrgId;
- this.objType = row.sndType;
- this.addPblmDialog = true;
- },
- deleteRow(row) {
- this.$confirm('确定要删除该数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/bis/insp/rect/delete/${row.id}`)
- .then(res => {
- if (res.success) {
- this.$message.success("删除成功");
- this.getNoticeList();
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- xiaFaClick(row) {
- this.$confirm('下发后通知内容无法更改?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let obj = {
- "id": row.id,
- "persId": this.persId,
- "state": "1"
- }
- request.post(`/bis/insp/rect/update`, obj)
- .then(res => {
- if (res.success) {
- this.$message.success("下发成功");
- this.getNoticeList();
- } else {
- this.$message.warning(res.message);
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消下发'
- });
- });
- },
- //通知List
- getNoticeList() {
- let obj = this.addForm;
- request.post(`/bis/insp/rect/province/findList`, obj)
- .then(res => {
- if (res.success) {
- this.tableData = res.data;
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- // 通知保存
- tongZhiSave(formName) {
- if (this.titleText == '新建') {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- let obj = this.tongZhiForm;
- obj.persId = localStorage.getItem("userid");
- request.post('/bis/insp/rect/add', obj).then((res) => {
- if (res.success) {
- this.tongZhiRowId = res.data.id;
- this.$nextTick(function () {
- if (this.$refs.uploadFile.submitUpload(res.data.id)) {
- this.removeNewSupervision();
- this.$message.success('新建通知成功');
- }
- })
- } else {
- this.$message.warning(res.message);
- }
- })
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- } else if (this.titleText == '编辑') {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- let obj = this.tongZhiForm;
- obj.persId = localStorage.getItem("userid");
- request.post('/bis/insp/rect/update', obj).then((res) => {
- if (res.success) {
- this.tongZhiRowId = res.data.id;
- this.$nextTick(() => {
- if (this.$refs.uploadFile.submitUpload(res.data.id)) {
- this.removeNewSupervision();
- this.$message.success('编辑通知成功');
- }
- })
- } else {
- this.$message.warning(res.message);
- }
- })
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- }
- },
- searchClick() {
- this.$nextTick(() => {
- this.getPblmList();
- })
- },
- // dialog通知弹窗关闭
- closeDialog(){
- this.getNoticeList();
- },
- removeNewSupervision(arg) {
- if(arg){
- console.log(arg);
- let data = arg[arg.length - 1];
- this.uploadAfter(data);
- }
- },
- // 文件预览
- rowPreview(row){
- window.open(`${hostUrl}${row.filePath}`, "_blank");
- },
- //批次预览
- toPreview(row) {
- window.open(`${hostUrl}${row.url}`, "_blank");
- },
- //删除批次附件
- deleteFiles(row) {
- this.$confirm('确定删除该附件吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/bis/insp/rect/setFileNull/${row.fileId}`).then(res => {
- if (res.success) {
- this.fileListPiCi = [];
- this.ifFileList = true;
- this.$message.success('附件删除成功');
- }
- })
- }).catch(() => {
- })
- },
- //删除下发附件
- deleteFile(rowId){
- request.post(`/tac/pblm/rect/org/setFileNull/${rowId}`)
- .then(res =>{
- if(res.success){
- this.$message({
- type: 'success',
- message: '删除成功'
- })
- this.getYiShengYiDanList();
- }else{
- this.$message.warning(res.message);
- }
- })
- },
- //文件删除
- rowDelete(row){
- return this.$confirm(`确定移除 ${row.fileName}?`).then(() => {
- if(row.fileId){
- request.post(`/file/${row.fileId}`).then((res) => {
- if (res.success) {
- this.deleteFile(row.id);
- } else {
- this.$alert("删除失败!", '提示', {
- confirmButtonText: '确定',
- type: 'warning'
- })
- }
- })
- }else{
- this.$message.warning('fileId不能为空');
- }
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- }
- ,
- //通知查询
- searchNotice(){
- this.getNoticeList();
- },
- select_handler_province() {
- this.$nextTick(() => {
- this.tongZhiForm.rectOrgName = this.$refs.selectProvince.selectedLabel;
- });
- },
- typesListFy(row){
- if(row){
- this.typesList.forEach(ele => {
- if (ele.code == row) {
- row = ele.name;
- }
- });
- return row;
- }else{
- return '';
- }
- },
- // 通知表格里附件预览
- previewAttachment(row){
- window.open(`${hostUrl}${row.filePath}`, "_blank");
- },
- closeDialogAddPblm(){
- this.addPblmDialog = false;
- },
- //问题查看
- toViewRow(row){
- this.currentProblemId = row.pblmId;
- this.supervisionDetailsVisible = true;
- },
- //问责建议
- wzJyClick(row){
- this.dialogFormVisible = true;
- this.$nextTick(() => {
- let iframe = document.getElementById("iframeEle");
- iframe.src = this.tableSrc + row.id;
- })
- }
- },
- watch: {
- // 'addForm': {
- // deep: true,
- // handler: function () {
- // this.getNoticeList();
- // }
- // }
- }
- }
- </script>
- <style lang="scss">
- .rectify_reform{
- .inspPblmCate{
- padding: 2px 10px;
- color: #fff;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- }
- .notice_title{
- .el-input--mini .el-input__inner,.el-select-dropdown__list{
- width: 8vw;
- }
- }
- .wenze_title{
- .el-input--mini .el-input__inner,.el-select-dropdown__list{
- width: 6vw;
- }
- }
- .rowClassP{
- span {
- color: #3399ff;
- margin-left: 15px;
- cursor: pointer;
- }
- span:first-child{
- cursor: default;
- margin-left: 0;
- color: rgb(51, 51, 51);
- }
- span:last-child{
- color: red;
- }
- }
- }
- </style>
|