| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453 |
- <template>
- <div class="add_pblm">
- <el-dialog :visible.sync="dialogFormEditorVisible" :close-on-click-modal="false" width="70%" @close="closeDialog">
- <!--<h3 v-if="ifShiJi == '1'">待分发问题</h3>-->
- <h3>问题分发</h3>
- <div>
- <el-row :gutter="20" type="flex" style="margin-bottom: 10px;">
- <el-col :span="22">
- <el-form :inline="true" size="mini" class="demo-form-inline">
- <el-form-item label="工程">
- <el-input v-model="editorForm.name" clearable placeholder="请输入工程" style="width: 6vw"></el-input>
- </el-form-item>
- <el-form-item label="问题描述">
- <el-input v-model="editorForm.inspPblmDesc" clearable placeholder="请输入问题描述" style="width: 6vw"></el-input>
- </el-form-item>
- <el-form-item label="严重程度">
- <el-select v-model="editorForm.inspPblmCate" clearable placeholder="请选择" style="width: 6vw">
- <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.isTranc" clearable placeholder="请选择" style="width: 6vw">
- <el-option label="未分发" value="0"></el-option>
- <el-option label="已分发" value="1"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="分发单位">
- <receiver
- v-model="editorForm.satOrgName"
- :maxHeight='300'
- :maxWidth='250'
- :rootAddCode="orgId"
- @provTreeSelectChange="selectJigouCodeSinglecx"
- @inputClear="inputEmptycx"
- ></receiver>
- </el-form-item>
- </el-form>
- </el-col>
- <el-col :span="2" style="text-align: end;">
- <el-button @click="search" type="success">查询</el-button>
- </el-col>
- </el-row>
- <div>
- <el-table
- :data="pblmList"
- :height="tableHeight1"
- style="width: 100%"
- border
- tooltip-effect="dark"
- @selection-change="handleSelectionChange"
- ref="multipleTable">
- <el-table-column
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column
- prop="name"
- label="工程名称"
- min-width="100"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- prop="satOrgName"
- label="分发单位"
- min-width="100"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- prop="inspPblmName"
- label="问题类别"
- min-width="100"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- prop="inspPblmDesc"
- label="问题描述"
- min-width="100"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- prop="inspPblmCate"
- label="严重程度"
- min-width="100">
- <template slot-scope="scope">
- <p v-if="scope.row.inspPblmCate == 0"><span class="inspPblmCate" style="background: #27C19F;">一般</span></p>
- <p v-if="scope.row.inspPblmCate == 1"><span class="inspPblmCate" style="background: #E6A23C;" >较重</span></p>
- <p v-if="scope.row.inspPblmCate == 2"><span class="inspPblmCate" style="background: #F56C6C;" >严重</span></p>
- <p v-if="scope.row.inspPblmCate == 3"><span class="inspPblmCate" style="background: #795548;">特别严重</span></p>
- </template>
- </el-table-column>
- <el-table-column
- prop="crrtTm"
- label="整改时限"
- min-width="100">
- <template slot-scope="scope">
- <span v-if="scope.row.crrtTm">{{formatDate(scope.row.crrtTm)}}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="inspPblmTm"
- label="上报时间"
- min-width="100">
- <template slot-scope="scope">
- <span v-if="scope.row.inspPblmTm">{{formatDate(scope.row.inspPblmTm)}}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="isTranc"
- label="分发情况"
- min-width="50">
- <template slot-scope="scope">
- <span v-if="scope.row.isTranc == '0'">未分发</span>
- <span v-if="scope.row.isTranc == '1'">已分发</span>
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- min-width="100">
- <template slot-scope="scope">
- <el-button @click="toView(scope.row)" type="text" size="small" >查看</el-button>
- <!--<el-button @click="toDelete(scope.row)" type="text" size="small" >删除</el-button>-->
- </template>
- </el-table-column>
- </el-table>
- <el-row style="margin-top: 10px;">
- <!-- 分页 -->
- <el-col :span="20" class="paginationWarpper">
- <el-pagination
- class="paginationCenter"
- background
- @size-change="handleSizeChangeEditor"
- @current-change="pageIndexChangeEditor"
- :current-page.sync="editorForm.pageNum"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="editorForm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="totalEditor"
- ></el-pagination>
- </el-col>
- <el-col :span="4" style="text-align: end;">
- <el-button type="warning" @click="changeqxdw">更改期限和单位</el-button>
- </el-col>
- </el-row>
- </div>
- </div>
- </el-dialog>
- <!-- 详情弹框 -->
- <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-dialog
- class="outerDialog custom_dialog"
- title="更改整改期限和接收单位"
- width="40%"
- :visible.sync="qixiandanweiVisible"
- >
- <el-form label-width="200px">
- <el-form-item label="整改期限">
- <el-date-picker
- v-model="qixianForm.crrtTm"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="整改期限">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="接收单位">
- <receiver
- v-model="qixianForm.rectOrgName"
- :maxHeight='400'
- :maxWidth='220'
- :rootAddCode="orgId"
- @provTreeSelectChange="selectJigouCodeSingle"
- @inputClear="inputEmpty"
- ></receiver>
- </el-form-item>
- </el-form>
- <span slot="footer">
- <el-button type="primary" @click="sureToAdd">确定分发</el-button>
- <el-button style="margin-top:5px;" @click="qixiandanweiVisible = false">取消</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import request from '@util/gw_ajax_request'
- import {dateFormat} from '@util/gw_date';
- import receiver from "./receiver"
- export default {
- name: "addPblm",
- props:['RowId','supervisionState','objType','rectId','ifShiJi'],
- data (){
- return {
- dialogFormEditorVisible: true,
- formLabelWidth: '120px',
- pblmList: [],
- pblmListAll: [],
- tableHeight1: window.innerHeight * .4,
- editorForm:
- {
- "rectId":"", //通知ID
- "isTranc":"", //是否转发 0 不转发 1 转发
- "name":"", //工程名
- "inspPblmDesc":"", //问题描述
- "inspPblmCate":"", //问题严重程度
- "satOrgId":"", //转发单位ID
- "rectConc":"",//反馈状态 (0:未反馈 1:已整改;2:整改中;3:不具备整改条件)
- "pageNum": 1,
- "pageSize": 20,
- "satOrgName": ""
- },
- editorFormAll: {
- // "inspPblmType": null,//问题类别
- "inspPblmCate": "",//严重程度
- ifCasePblm: "",//是否典型
- inspPblmName: "",//问题类别名称
- objType: "",//类型
- pageNum: "",
- pageSize: "",
- name: "",//工程名称
- orgId: ""
- },
- pageNum: 1,
- pageSize: 20,
- total: null,
- totalEditor: null,
- multipleSelection: [],
- supervisionDetailsVisible: false,
- currentProblemId: null,
- qixiandanweiVisible: false,
- qixianForm: {
- "rectOrgId": "",
- "rectOrgName": "",
- "crrtTm": ""
- }
- }
- },
- components:{
- //详情页
- supervisionDetails: resolve => {
- require(["./supervisionDetails.vue"], resolve);
- },
- receiver
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- orgId() {
- return localStorage.getItem('currentOrgId') ? localStorage.getItem("currentOrgId") : "";
- }
- },
- mounted(){
- this.$nextTick(()=>{
- this.getPblmList();
- })
- },
- methods:{
- closeDialog(){
- this.$emit('closeDialog');
- },
- //所有问题查看
- toView(row){
- // this.objType = row.sndType;
- this.currentProblemId = row.pblmId;
- this.supervisionDetailsVisible = true;
- },
- //删除问题
- toDelete(row){
- this.$confirm('确定要删除该问题, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/bis/insp/rect/pblm/province/delete/${row.id}`)
- .then(res => {
- if (res.success) {
- this.$message.success("删除成功");
- this.getPblmList();
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //获取当前通知下督查对象下问题List
- getPblmList() {
- this.editorForm.rectId = this.RowId;
- let obj = Object.assign({},this.editorForm);
- delete obj.satOrgName
- request.post(`/bis/insp/rect/pblm/province/getPageInfo`, obj)
- .then(res => {
- if (res.success) {
- this.$nextTick(() => {
- this.pblmList = res.data.list;
- this.totalEditor = res.data.total;
- })
- } else {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- handleSizeChangeEditor(pageSize) {
- this.editorForm.pageSize = pageSize;
- this.getPblmList();
- },
- pageIndexChangeEditor(val) {
- this.editorForm.pageNum = val;
- this.getPblmList();
- },
- formatDate(timestamp) {
- return timestamp ? dateFormat(timestamp, 'yyyy-MM-dd') : "";
- },
- // 选中table数据
- handleSelectionChange(val) {
- this.multipleSelection = [];
- val.forEach((item,index)=>{
- this.multipleSelection.push(
- Object.assign({},item, {'rectId':this.RowId,'persId': this.persId})
- )
- })
- },
- // 添加问题
- // addPblmArray(){
- // this.$nextTick(()=>{
- // this.pblmList.push(...this.multipleSelection);
- // })
- // },
- // 新增加问题搜索
- search(){
- this.getPblmList();
- },
- // 更改期限和单位
- changeqxdw(){
- if(this.multipleSelection.length){
- this.qixiandanweiVisible = true;
- }else{
- this.$message.warning("请选择需要分发的问题");
- }
- },
- selectJigouCodeSingle(params){
- this.$nextTick(()=>{
- this.qixianForm.rectOrgId = params.code;
- this.qixianForm.rectOrgName = params.name;
- })
- },
- inputEmpty(val){
- if(!val){
- this.qixianForm.rectOrgId = "";
- this.qixianForm.rectOrgName = "";
- }
- },
- selectJigouCodeSinglecx(params){
- this.$nextTick(()=>{
- this.editorForm.satOrgId = params.code;
- this.editorForm.satOrgName = params.name;
- })
- },
- inputEmptycx(val){
- if(!val){
- this.editorForm.satOrgId = "";
- this.editorForm.satOrgName = "";
- }
- },
- // 期限保存
- sureToAdd(){
- if(!this.qixianForm.crrtTm){
- this.$message.warning("请输入整改期限");
- return;
- }
- if(!this.qixianForm.rectOrgId && !this.qixianForm.rectOrgName){
- this.$message.warning("请输入接收单位");
- return;
- }
- let val = this.multipleSelection;
- let valNew = val.map((item,index)=>{
- return Object.assign({},item, {
- 'crrtTm':this.qixianForm.crrtTm,
- 'satOrgId': this.qixianForm.rectOrgId,
- 'satOrgName': this.qixianForm.rectOrgName,
- })
- })
- request.post(`/bis/insp/rect/pblm/province/tranPblmList`,valNew)
- .then(res =>{
- if(res.success){
- this.$message.success("分发成功");
- this.qixiandanweiVisible = false;
- this.getPblmList();
- this.$refs.multipleTable.clearSelection();
- }else{
- this.$message.warning(res.message);
- }
- })
- .catch(err =>{
- console.log(err);
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .add_pblm {
- h3{
- margin-bottom: 20px;
- font-size: 20px;
- }
- .inspPblmCate{
- padding: 2px 10px;
- color: #fff;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- }
- }
- </style>
|