| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378 |
- <template>
- <el-container>
- <el-main>
- <div v-loading="loading">
- <div style="margin-bottom: 15px;">
- <el-row style="margin-top: 10px;">
- <el-col :span="24" style="text-align: right;">
- <el-button type="primary" icon="el-icon-plus" @click="addDcFa" v-show="!ifMinistriesAgencies">新建通知</el-button>
- </el-col>
- </el-row>
- </div>
- <div style="margin-top:10px;">
- <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="100"
- prop="title"
- label="发文标题"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="rectSugg"
- label="整改说明"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="intm"
- label="通知下发时间"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="rectTerm"
- label="整改时间"
- ></el-table-column>
- <el-table-column
- align="center"
- min-width="200"
- label="操作"
- fixed="right"
- >
- <template slot-scope="scope">
- <!--省级-->
- <span v-if="ifMinistriesAgencies">
- <el-button v-show="Number(scope.row.state)" type="primary" size="mini" @click.stop="lookOver(scope.row)">查看</el-button>
- <el-button v-show="Number(scope.row.state)" type="info" size="mini" @click.stop="zgClick(scope.row)">整改反馈</el-button>
- <el-button v-show="!Number(scope.row.state)" type="primary" size="mini" @click.stop="fangAnModifyThe(scope.row)">编辑</el-button>
- <el-button v-show="!Number(scope.row.state)" type="warning" size="mini" @click.stop="issuedByThe(scope.row)">下发</el-button>
- <el-button v-show="!Number(scope.row.state)" type="danger" size="mini" @click.stop="fangAnDelete(scope.row)">删除</el-button>
- </span>
- <!--建安中心-->
- <span v-else-if="!ifMinistriesAgencies">
- <el-button v-show="Number(scope.row.state)" type="primary" size="mini" @click.stop="lookOver(scope.row)">查看</el-button>
- <el-button v-show="Number(scope.row.state)" type="info" size="mini" @click.stop="zgClick(scope.row)">整改反馈</el-button>
- <el-button v-show="!Number(scope.row.state)" type="primary" size="mini" @click.stop="fangAnModifyThe(scope.row)">编辑</el-button>
- <el-button v-show="!Number(scope.row.state)" type="warning" size="mini" @click.stop="issuedByThe(scope.row)">下发</el-button>
- <el-button v-show="!Number(scope.row.state)" type="danger" size="mini" @click.stop="fangAnDelete(scope.row)">删除</el-button>
- </span>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-main>
- <!-- 新建督查方案框 -->
- <el-dialog :title="dialogFaTitle" :visible.sync="addPlanDialogVisible" v-if="addPlanDialogVisible" width="60%" append-to-body :close-on-click-modal="false" >
- <el-form :model="zhengGaiForm" ref="zhengGaiForm" :label-width="formLabelWidth" class="zhenggai_form">
- <el-form-item label="通知名称" prop="plnNm">
- <el-input v-model="zhengGaiForm.title" placeholder="请输入通知名称" :disabled="zgButton"></el-input>
- </el-form-item>
- <el-form-item label="整改截止期限" prop="planYr">
- <el-date-picker
- v-model="zhengGaiForm.rectTerm"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择整改截止期限"
- :disabled="zgButton">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="整改说明" prop="planCnt">
- <el-input type="textarea" rows="10" v-model="zhengGaiForm.rectSugg" clearable placeholder="请输入整改说明" :disabled="zgButton"></el-input>
- </el-form-item>
- <el-form-item label="一省一单">
- <div class="show_wrapper" :style="{'height':tableHeight1 + 'px','overflow':'hidden'}">
- <zgfc :currentNodeId="groupId" :type="type"></zgfc>
- </div>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addPlanDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="appendPlan('zhengGaiForm')" >保 存</el-button>
- </div>
- </el-dialog>
- <!--整改反馈-->
- <el-dialog width="80%" title="整改反馈" :visible.sync="zgfkDialog" v-if="zgfkDialog">
- <reformFeedback :rectId="rectId" :ifMinistriesAgencies="ifMinistriesAgencies" ref="updateQk"></reformFeedback>
- <div slot="footer" class="dialog-footer" style="text-align: right">
- <el-button size="mini" type="primary" @click="addFile">保 存</el-button>
- </div>
- </el-dialog>
- </el-container>
- </template>
- <script>
- import addProblem from './addProblem.vue'
- import problemDetail from './problemDetail.vue'
- import addRectify from './addRectify.vue'
- import zgfc from '../../export/pageoffice/jc/zhenggaifankui/zgfk.vue'
- import reformFeedback from './reformFeedback'
- import request from '../../../utils/gw_ajax_request'
- import { dateFormat } from '../../../utils/gw_date';
- export default {
- props:["groupId","addvcd"],
- data(){
- return{
- tableHeight: window.innerHeight - 250,
- tableHeight1: window.innerHeight * .5,
- currentPage: 1,
- addProblemDialog: false,
- dialogDetailVisible: false,
- showRectifyDialog: false,
- currentNodeId:'',
- type:'1',
- tableData: [],
- loading: false,
- pageSize: 20,
- pageNum: 1,
- addPlanDialogVisible:false,
- dialogFaTitle: "",
- formLabelWidth:'200px',
- zhengGaiForm:{
- title: '',
- rectTerm: '',
- rectSugg: ""
- },
- zgButton: false,
- zgfkDialog: false,
- rectId:"",
- ifMinistriesAgencies: false
- }
- },
- components:{
- addProblem,
- problemDetail,
- addRectify,
- zgfc,
- reformFeedback
- },
- mounted(){
- // this.getNoticeData();
- },
- methods:{
- getNoticeData(){
- this.loading = true;
- let data = {
- "batch": this.groupId,
- "rectAddvcd": this.addvcd
- }
- this.$nextTick(()=>{
- request.post(`/tac/pblm/rect/info/getRectInfByBatchAd`,data).then(res =>{
- if(res.success){
- this.loading = false;
- this.tableData = res.data;
- this.tableData.forEach(item =>{
- item.intm = dateFormat(item.intm, "yyyy-MM-dd");
- item.uptm = dateFormat(item.uptm, "yyyy-MM-dd");
- item.rectTerm = dateFormat(item.rectTerm, "yyyy-MM-dd");
- })
- }
- })
- })
- },
- //添加
- addDcFa(){
- this.dialogFaTitle = '新建通知';
- this.addPlanDialogVisible = true;
- for(var obj in this.zhengGaiForm){
- this.zhengGaiForm[obj] = '';
- }
- this.zgButton = false;
- },
- //添加确定
- appendPlan(formName){
- if(this.dialogFaTitle == '新建通知'){
- this.$refs[formName].validate((valid) => {
- if (valid) {
- let obj = {};
- obj.groupId = this.groupId;//督查组ID ,
- obj.rectAddvcd = this.addvcd;//整改行政区代码
- obj.title = this.zhengGaiForm.title;//发文标题
- obj.rectSugg = this.zhengGaiForm.rectSugg;//整改建议
- obj.persId = localStorage.getItem("userid");
- obj.rectTerm = this.zhengGaiForm.rectTerm;//整改时限
- request.post('/tac/pblm/rect/info/add',obj).then((res)=>{
- if(res.success){
- this.$nextTick(() =>{
- this.$message.success("新建通知成功");
- this.addPlanDialogVisible = false;
- this.getNoticeData();
- })
- }
- })
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- }
- else{
- this.$refs[formName].validate((valid) => {
- if (valid) {
- let obj = {};
- obj.groupId = this.groupId;//督查组ID ,
- obj.rectAddvcd = this.addvcd;//整改行政区代码
- obj.title = this.zhengGaiForm.title;//发文标题
- obj.rectSugg = this.zhengGaiForm.rectSugg;//整改建议
- obj.persId = localStorage.getItem("userid");
- obj.rectTerm = this.zhengGaiForm.rectTerm;//整改时限
- obj.id = this.zhengGaiForm.id;
- request.post('/tac/pblm/rect/info/update',obj).then((res)=>{
- if(res.success){
- this.$nextTick(() =>{
- this.$message.success("更改通知成功");
- this.addPlanDialogVisible = false;
- this.getNoticeData();
- })
- }
- })
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- }
- },
- toAddProblem(){
- this.addProblemDialog = true
- },
- dialogClose(){
- this.addProblemDialog = false
- this.showRectifyDialog = false
- },
- toShowDetail(){
- this.dialogDetailVisible = true
- },
- toShowRectify(){
- this.showRectifyDialog = true
- },
- exportTable(){},
- handleSizeChange(){},
- handleCurrentChange(){},
- // 查看
- lookOver(row){
- this.getIdData(row.id);
- this.dialogFaTitle = '查看通知';
- this.addPlanDialogVisible = true;
- this.zgButton = true;
- },
- //方案编辑
- fangAnModifyThe(row){
- this.dialogFaTitle = '编辑通知';
- this.getIdData(row.id);
- this.addPlanDialogVisible = true;
- this.zgButton = false;
- },
- getIdData(id){
- request.get(`/tac/pblm/rect/info/${id}`).then(res =>{
- this.zhengGaiForm = res.data;
- this.zhengGaiForm.intm = dateFormat(this.zhengGaiForm.intm, "yyyy-MM-dd");
- this.zhengGaiForm.uptm = dateFormat(this.zhengGaiForm.uptm, "yyyy-MM-dd");
- this.zhengGaiForm.rectTerm = dateFormat(this.zhengGaiForm.rectTerm, "yyyy-MM-dd");
- })
- },
- //下发
- issuedByThe(row){
- this.$confirm('确定要下发通知, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- if(row.id){
- request.post(`/tac/pblm/rect/info/rectInfo?id=${row.id}`).then((res)=>{
- if(res.success) {
- // this.ifMinistriesAgencies = true;
- this.$message({
- type: 'success',
- message: '下发成功!'
- });
- this.getNoticeData();
- }
- })
- }
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消下发'
- });
- });
- },
- //删除
- fangAnDelete(row){
- this.$confirm('确定要删除该数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/tac/pblm/rect/info/delete/${row.id}`).then(res =>{
- if(res.success){
- this.$message({
- type: 'success',
- message: '删除成功'
- })
- this.getNoticeData();
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- // 查看整改反馈
- zgClick(row){
- this.rectId = row.id;
- this.zgfkDialog = true;
- },
- //保存
- addFile(){
- this.$refs.updateQk.updateQk();
- },
- },
- watch:{
- groupId(){
- this.getNoticeData();
- }
- }
- }
- </script>
- <style lang="scss">
- .footer_btn{
- text-align: right;
- }
- .show_wrapper{
- border:1px solid gray;
- width:100%;
- overflow: hidden;
- }
- .zhenggai_form .el-input,.zhenggai_form textarea.el-textarea__inner {
- width: 20vw;
- }
- </style>
|