| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935 |
- <template>
- <el-container class="rectify_reform">
- <el-main>
- <el-card class="box-card" :style="{'height': cardHeight + 'px','overflow-y':'auto'}">
- <!--20191220bytanghy-->
- <el-row :gutter="20" type="flex" justify="start">
- <el-col :span="16">
- <el-form :inline="true" size="mini" class="demo-form-inline" label-width="120px">
- <el-form-item label="选择年度">
- <el-select
- v-model="addForm.year"
- clearable
- collapse-tags
- @change="changeYear">
- <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.batch"
- clearable
- collapse-tags>
- <el-option
- v-for="item in pcList"
- :key="item.id"
- :label="item.batch"
- :value="item.batch">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </el-col>
- <el-col :span="2" :offset=6 style="text-align: end;">
- <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="50"
- prop="year"
- label="年度"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="50"
- prop="batch"
- label="批次"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- prop="title"
- label="通知名称"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="nub"
- label="整改意见通知文号"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="printTm"
- label="整改通知印发时间"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span>{{formatDate(scope.row.printTm)}}</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="closeTm"
- label="整改反馈截止期限"
- >
- <template slot-scope="scope">
- <span>{{formatDate(scope.row.closeTm)}}</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="sendAll"
- label="是否全部下发"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.sendAll == '0'">否</span>
- <span v-if="scope.row.sendAll == '1'">是</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- min-width="180"
- label="操作"
- fixed="right"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.sendAll == '1'">
- <el-button type="success" size="mini" @click.stop="lookOver(scope.row)">查看</el-button>
- </span>
- <span v-if="scope.row.sendAll == '0'">
- <el-button type="primary" size="mini" @click.stop="editorRow(scope.row)">编辑</el-button>
- <el-button type="danger" size="mini" @click.stop="deleteRow(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="70%" @close="closeDialog">
- <h3>
- <span>年度</span>
- <el-select
- v-model="tongZhiForm.year"
- clearable
- collapse-tags
- @change="changeYear" :disabled="yearBatchSelect">
- <el-option
- v-for="item in yearList"
- :key="item.id"
- :label="item.year"
- :value="item.year">
- </el-option>
- </el-select> 
- <span>批次</span>
- <el-select
- v-model="tongZhiForm.batch"
- clearable
- collapse-tags :disabled="yearBatchSelect">
- <el-option
- v-for="item in pcList"
- :key="item.id"
- :label="item.batch"
- :value="item.batch">
- </el-option>
- </el-select>
- </h3>
- <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="title">
- <el-input v-model="tongZhiForm.title" placeholder="请输入通知名称"
- :disabled="zgButton"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="通知印发时间" prop="printTm">
- <el-date-picker
- v-model="tongZhiForm.printTm"
- 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-form-item label="通知文号" prop="nub">
- <el-input v-model="tongZhiForm.nub" placeholder="请输入通知文号"
- :disabled="zgButton"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="整改截止期限" prop="closeTm">
- <el-date-picker
- v-model="tongZhiForm.closeTm"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择整改截止期限" :disabled="zgButton">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-form-item label="整改说明" prop="planCnt">
- <el-input type="textarea" rows="6" v-model="tongZhiForm.explain" 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="removeNewSupervisionPiCi"
- ></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>
- <el-divider></el-divider>
- <div>
- <el-row :gutter="20" type="flex" style="margin-bottom: 10px;">
- <el-col :span="20">
- <el-form :inline="true" size="mini" class="demo-form-inline">
- <el-form-item label="选择接收单位">
- <el-select
- v-model="editorForm.rectOrgId"
- clearable
- collapse-tags style="width: 8vw;">
- <el-option
- v-for="item in provincesList"
- :key="item.orgId"
- :label="item.orgNm"
- :value="item.orgId">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="是否上传附件">
- <el-select v-model="editorForm.fileState" clearable style="width: 8vw">
- <el-option label="未上传" value="0"></el-option>
- <el-option label="已上传" value="1"></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>
- <el-table
- :data="yiShengyiDanList"
- :height="tableHeight1"
- style="width: 100%"
- border
- tooltip-effect="dark">
- <el-table-column
- prop="year"
- label="年度"
- min-width="50">
- </el-table-column>
- <el-table-column
- prop="batch"
- label="批次"
- min-width="50">
- </el-table-column>
- <el-table-column
- prop="rectOrgNm"
- label="接收单位"
- min-width="50">
- </el-table-column>
- <el-table-column
- prop="prjctSize"
- label="工程数量"
- min-width="60">
- </el-table-column>
- <el-table-column
- prop="pblmSize"
- label="问题数量"
- min-width="60">
- </el-table-column>
- <el-table-column
- prop="state"
- label="下发状态"
- min-width="60">
- <template slot-scope="scope">
- <span v-if="scope.row.state == '0'">未下发</span>
- <span v-if="scope.row.state == '1'">已下发</span>
- <span v-if="scope.row.state == '2'">已反馈</span>
- </template>
- </el-table-column>
- <!-- <el-table-column
- prop="fileName"
- label="一省一单"
- min-width="200">
- <template slot-scope="scope">
- <p v-if="scope.row.fileName" class="rowClassP">
- <span>{{scope.row.fileName}}</span>
- <el-button type="text" size="small" @click="rowPreview(scope.row)">预览</el-button>
- <el-button type="text" size="small" @click="rowDelete(scope.row)" :disabled="zgButton">删除</el-button>
- </p>
- <el-button v-else @click="shengRowUpload(scope.row)" type="text" size="small" :disabled="zgButton">上传</el-button>
- </template>
- </el-table-column> -->
- <el-table-column
- label="操作"
- min-width="100">
- <template slot-scope="scope">
- <!--<el-button v-if="scope.row.state == '1'" type="text" size="small">已下发</el-button>-->
- <el-button v-if="scope.row.state == '0'" @click="xiaFaClick(scope.row)" type="text" size="small" :disabled="zgButton">下发</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-dialog>
- <!--一省一单上传文件-->
- <el-dialog title="文件上传" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="40%">
- <upload
- ref="uploadFileRow"
- :url="`/pdcApi/file/insert?bizId=`"
- accept=".doc,.docx,.pdf"
- @uploadOver="removeNewSupervision"
- ></upload>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible = false">取 消</el-button>
- <el-button type="primary" @click="addFileSave">保 存</el-button>
- </div>
- </el-dialog>
- </el-main>
- </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 {getZgYearList, getZgPiciList} from '@api/jcOneMapApi.js'
- export default {
- props: [],
- data() {
- return {
- cardHeight: window.innerHeight - 120,
- currentPage: 1,
- tableData: [],
- tableHeight: window.innerHeight - 300,
- tableHeight1: window.innerHeight * .2,
- loading: false,
- pageSize: 20,
- pageNum: 1,
- dialogFaTitle: "",
- formLabelWidth: '120px',
- tongZhiForm: {
- "year": null,//年度
- "batch": null,//批次
- "nub": "",//发文文号
- "persId": "",//创建人ID
- "printTm": "",//印发时间
- "title": "",//标题
- "explain": "",//整改说明
- "closeTm": ""//整改截止期限
- },
- 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: [],
- year: '',
- province: '',
- addForm: {
- year: '',
- batch: ''
- },
- editorForm: {
- rectOrgId: null,
- fileState: null,
- state: null
- },
- yearList: [],
- pcList: [],
- 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,
- TzRules:{
- title:[{ required: true, message: '通知名称不能为空'}],
- printTm: [{ required: true, message: '通知印发时间不能为空'}],
- nub: [{ required: true, message: '通知文号不能为空'}],
- closeTm: [{ required: true, message: '整改截止期限不能为空'}],
- rectOrgId: [{ required: true, message: '接收单位不能为空'}],
- },
- }
- },
- components: {
- upload: resolve => {
- require(["@widget/uploadFile.vue"], resolve);
- }
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.$nextTick(() => {
- this.getYear();
- this.getNoticeList();
- this.getByPid();
- })
- },
- 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.provincesList = res.data;
- }
- })
- .catch(err =>{
- console.log(err);
- })
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.getNoticeList();
- },
- handleCurrentChange(val) {
- this.pageNum = val;
- this.getNoticeList();
- },
- //-----------------------------------
- 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;
- request.get(`/tac/pblm/rect/${row.id}`)
- .then(res => {
- if (res.success) {
- this.tongZhiForm = res.data;
- this.tongZhiForm.printTm = dateFormat(res.data.printTm, "yyyy-MM-dd");
- this.tongZhiForm.closeTm = dateFormat(res.data.closeTm, "yyyy-MM-dd");
- this.dialogFormEditorVisible = true;
- this.editorForm.year = res.data.year;
- this.editorForm.batch = res.data.batch;
- 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.getYiShengYiDanList();
- this.zgButton = true;
- this.yearBatchSelect = true;
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- uploadAfter(data){
- let obj = {
- "id": this.yiShengyiDanRowId,//数据ID
- "fileId": data.id,//附件ID
- "fileName": data.fileName,//附件名称
- "filePath": data.filePath
- }
- request.post(`/tac/pblm/rect/org/update`,obj)
- .then(res =>{
- if(res.success){
- this.dialogFormVisible = false;
- this.$message.success('上传成功');
- this.getYiShengYiDanList();
- }
- })
- .catch(err =>{
- })
- },
- //获取一省一单List
- getYiShengYiDanList() {
- let obj = {
- "batch": this.tongZhiForm.batch,
- "state": this.editorForm.state,
- "year": this.tongZhiForm.year,
- "rectOrgId": this.editorForm.rectOrgId,
- "fileState": this.editorForm.fileState
- }
- request.post(`/tac/pblm/rect/org/findList`, obj)
- .then(res => {
- if (res.success) {
- this.$nextTick(() => {
- this.yiShengyiDanList = 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;
- this.yiShengyiDanList = [];
- 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.yearBatchSelect = true;
- this.fileListPiCi = [];
- this.ifFileList = true;
- request.get(`/tac/pblm/rect/${row.id}`)
- .then(res => {
- if (res.success) {
- this.$nextTick(()=>{
- this.tongZhiForm = res.data;
- this.tongZhiForm.printTm = dateFormat(res.data.printTm, "yyyy-MM-dd");
- this.tongZhiForm.closeTm = dateFormat(res.data.closeTm, "yyyy-MM-dd");
- this.dialogFormEditorVisible = true;
- this.editorForm.year = res.data.year;
- this.editorForm.batch = res.data.batch;
- 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}
- )
- );
- }
- this.getYiShengYiDanList();
- })
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- deleteRow(row) {
- this.$confirm('确定要删除该数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/tac/pblm/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,
- "state": "1"
- }
- request.post(`/tac/pblm/rect/org/update`, obj)
- .then(res => {
- if (res.success) {
- this.$message.success("下发成功");
- this.getYiShengYiDanList();
- this.zgButton = true;
- } else {
- this.$message.warning(res.message);
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消下发'
- });
- });
- },
- //通知List
- getNoticeList() {
- let obj = {
- "batch": this.addForm.batch,
- "year": this.addForm.year,
- "pageSize": this.pageSize,
- "pageNum": this.pageNum
- }
- request.post(`/tac/pblm/rect/findList`, obj)
- .then(res => {
- if (res.success) {
- this.tableData = res.data;
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- // 通知保存
- tongZhiSave(formName) {
- if (this.titleText == '新建') {
- this.yearBatchSelect = false;
- this.$refs[formName].validate((valid) => {
- if (valid) {
- let obj = this.tongZhiForm;
- obj.persId = localStorage.getItem("userid");
- request.post('/tac/pblm/rect/add', obj).then((res) => {
- if (res.success) {
- this.$nextTick(function () {
- if (this.$refs.uploadFile.submitUpload(res.data.id)) {
- this.removeNewSupervisionPiCi();
- this.$message.success('新建通知成功');
- }
- // 整改通知新建成功后赋值刷新下发列表
- this.tongZhiForm.year = res.data.year
- this.tongZhiForm.batch = res.data.batch
- this.getYiShengYiDanList()
- })
- } 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('/tac/pblm/rect/update', obj).then((res) => {
- if (res.success) {
- this.$nextTick(() => {
- if (this.$refs.uploadFile.submitUpload(res.data.id)) {
- this.removeNewSupervisionPiCi();
- this.$message.success('编辑通知成功');
- }
- })
- } else {
- this.$message.warning(res.message);
- }
- })
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- }
- },
- searchClick() {
- this.$nextTick(() => {
- this.getYiShengYiDanList();
- })
- },
- // dialog通知弹窗关闭
- closeDialog(){
- this.getNoticeList();
- },
- //一省一单上传
- shengRowUpload(row) {
- this.yiShengyiDanRowId = row.id;
- this.dialogFormVisible = true;
- },
- addFileSave(){
- this.gwComFileList = [];
- if (this.$refs.uploadFileRow.submitUpload(this.yiShengyiDanRowId)) {
- this.removeNewSupervision();
- this.$message.success('保存成功');
- this.getYiShengYiDanList();
- }
- },
- removeNewSupervision(arg) {
- console.log(arg);
- let data = arg[arg.length - 1]
- this.uploadAfter(data);
- },
- removeNewSupervisionPiCi(arg) {
- if (arg) {
- console.log(arg);
- this.$message.success('上传成功');
- }
- this.editorRow(this.PcData);
- this.$refs.uploadFile.init();
- },
- // 文件上传
- submitUpload() {
- this.$refs.upload.submit();
- },
- // 文件预览
- 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(`/file/${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: '已取消删除'
- });
- });
- }
- },
- watch: {
- 'addForm': {
- deep: true,
- handler: function () {
- this.getNoticeList();
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- h3 {
- text-align: center;
- overflow: hidden;
- margin-bottom: 20px;
- .el-button--mini {
- float: right;
- margin-left: 10px;
- }
- }
- .rowClassP{
- span {
- color: #3399ff;
- margin-left: 15px;
- cursor: pointer;
- }
- span:first-child{
- cursor: default;
- margin-left: 0;
- color: rgb(51, 51, 51);
- }
- }
- </style>
|