| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <template>
- <div :style="{'height': tableHeight1 + 'px'}" class="pblmRectifyReviewSituation">
- <el-button @click="addProblem" type="primary" style="float: right;margin-bottom: 10px" :disabled="ifView">新增整改问题
- </el-button>
- <el-table
- v-loading="loading"
- border
- ref="multipleTable"
- :data="problemList"
- :height="tableHeight"
- tooltip-effect="dark"
- style="width: 100%">
- <el-table-column align="center" type="index" label="序号" min-width="80">
- <template slot-scope="scope">
- {{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- prop="pblmType"
- label="问题类别"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="pblmOption"
- label="检查项目"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="pblmDesc"
- label="问题描述"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="pblmLevl"
- label="问题等级">
- <template slot-scope="scope">
- <p v-if="scope.row.pblmLevl == 0"><span class="inspPblmCate"
- style="background: #27C19F;">一般</span>
- </p>
- <p v-if="scope.row.pblmLevl == 1"><span class="inspPblmCate"
- style="background: #E6A23C;">较重</span>
- </p>
- <p v-if="scope.row.pblmLevl == 2"><span class="inspPblmCate"
- style="background: #F56C6C;">严重</span>
- </p>
- <p v-if="scope.row.pblmLevl == 3"><span class="inspPblmCate"
- style="background: #795548;">特别严重</span>
- </p>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="revwInfo"
- label="复查情况">
- <template slot-scope="scope">
- <p v-if="scope.row.revwState == 0"><span class="inspPblmCate"
- style="background: #EC808D;">未复查</span>
- </p>
- <!--<p v-if="scope.row.revwState == 1"><span class="inspPblmCate"-->
- <!--style="background: #f59a23;">复查中</span>-->
- <p v-if="scope.row.revwState == 2"><span class="inspPblmCate"
- style="background: #f59a23;">已复查</span>
- <!--0:未填报;1:填报中;2:已填报-->
- </p>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop
- min-width="100"
- label="操作"
- show-overflow-tooltip
- fixed="right">
- <template slot-scope="scope">
- <!--<el-button icon="el-icon-view" type="text" @click="showDetails(scope.row.id)"></el-button>-->
- <el-button icon="el-icon-edit" type="text" @click="showDetails(scope.row.id)" v-if="ownPriv('manage') && !ifView"></el-button>
- <el-button icon="el-icon-delete" type="text" v-if="ownPriv('manage') && !ifView"
- title="删除问题" @click="removeSuperviseOne(scope.row)"
- ></el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 分页 -->
- <div class="paginationWarpper">
- <el-pagination
- class="paginationCenter"
- background
- @size-change="handleSizeChange"
- @current-change="pageIndexChange"
- :current-page.sync="currentPage"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total">
- </el-pagination>
- </div>
- <!-- 详情组件-->
- <supervision-details ref="xianqing" :problemId="currentProblemId" v-if="supervisionDetailsVisible"
- @cancelHandler="cancelHandler" :ifView="ifView"></supervision-details>
- <!-- 添加问题组件 -->
- <problem-dialog
- v-if="showAddProblemDialog"
- :objId="currentObjectId"
- :regId="currentObjectRgstrId"
- :objName="currentObjectName"
- :currentProblemId="currentProblemId"
- :currentResCode="currentResCode"
- :currentRsvrNm="currentRsvrNm"
- :currentAdCode="currentAdCode"
- :problemId="currentProblemId"
- @closeDialog="closePlDialog"
- fenlei="xiaoshuiku"
- :objType="1"
- :currentObjectRgstrId="currentObjectRgstrId">
- </problem-dialog>
- </div>
- </template>
- <script>
- import problemDialog from "../../xsk2021/addProblemDialog.vue";
- import request from '@util/gw_ajax_request.js'
- export default {
- props: ['currentObjectId', 'currentObjectName', 'currentObjectRgstrId', 'activeLabel', 'ifReadyOnly', 'currentResCode', 'currentAdCode', 'currentRsvrNm','ifView'],
- data() {
- return {
- tableHeight: window.innerHeight * .45,
- tableHeight1: window.innerHeight * .55,
- problemList: [],
- loading: false,
- currentPage: 1,
- pageSize: 10,
- pageNum: 1,
- total: 0,
- supervisionDetailsVisible: false,
- currentProblemId: '',
- problemDeleteVisible: false,
- deleteId: '',
- editId: '',
- changeSupervisionVisible: false,
- showAddProblemDialog: false,
- rsvrRules: null,
- probId: '',
- }
- },
- components: {
- //详情页
- supervisionDetails: resolve => {
- require(["../../xsk2021/problemDetail.vue"], resolve);
- },
- problemDialog
- },
- computed: {
- persId() {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
- }
- },
- created() {
- },
- mounted() {
- this.getProblemList()
- },
- methods: {
- removeSuperviseOne(row) {
- var _self = this;
- this.$confirm('确定要删除该问题吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.get(`/bis/insp/rsvr/pblm/mend/del/`+row.id).then((res) => {
- if (res.success) {
- _self.getProblemList();
- _self.$message.success('删除成功')
- } else {
- _self.$message.error(res.message)
- }
- });
- }).catch(() => {
- });
- },
- //通知List
- getProblemList() {
- let obj = {
- "pageSize": this.pageSize,
- "pageNum": this.currentPage,
- // rsName: this.currentRsvrNm,
- // adCode: this.currentAdCode,
- // rsName: '',
- rsCode: this.currentResCode
- };
- this.loading = true;
- request.post(`bis/insp/rsvr/pblm/mend/pagePc`, obj, {headers: {'orgId': this.persId}})
- .then(res => {
- if (res.success) {
- this.problemList = res.data.list;
- this.total = res.data.total;
- this.loading = false;
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- showDetails(pblmId) {
- this.currentProblemId = pblmId
- this.supervisionDetailsVisible = true
- },
- deleteSuccess() {
- this.problemDeleteVisible = false;
- this.getProblemList();
- },
- pageIndexChange(val) {
- this.currentPage = val;
- this.getProblemList();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.getProblemList();
- },
- timestampToTime(row, column) {
- var date = new Date(row);
- var Y = date.getFullYear() + "-";
- var M =
- (date.getMonth() + 1 < 10
- ? "0" + (date.getMonth() + 1)
- : date.getMonth() + 1) + "-";
- var D =
- (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
- var h =
- (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
- var m =
- date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
- return Y + M + D + h + m;
- },
- closeEditDialog() {
- this.getProblemList()
- this.changeSupervisionVisible = false
- },
- addProblem(item) {
- // let rest = this.rsvrRules;
- // this.probId = rest[0].id;
- this.showAddProblemDialog = true;
- },
- closePlDialog() {
- this.getProblemList();
- this.showAddProblemDialog = false;
- },
- cancelHandler(val) {
- if (val) this.getProblemList();
- this.supervisionDetailsVisible = false;
- },
- },
- watch: {
- activeLabel(val) {
- if (val == '问题清单') {
- this.getProblemList()
- }
- }
- },
- filters: {
- checkPointBz(val) {
- if (val == '1') {
- return '质量安全'
- } else if (val == '2') {
- return '合同'
- } else if (val == '3') {
- return '资金'
- } else {
- return ''
- }
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .pblmRectifyReviewSituation {
- .inspPblmCate {
- padding: 2px 10px;
- color: #fff;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- }
- }
- </style>
|