| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623 |
- <template>
- <el-container class="problem_list">
- <el-main style="padding: 10px 10px" v-show="tableShow">
- <div class="content_wrapper">
- <el-table
- :data="tableData"
- border
- stripe
- v-loading="loading"
- :height="tableHeight"
- align="center"
- style="width: 100%"
- >
- <el-table-column
- prop="ordr1"
- label="序号"
- align="center"
- min-width="80"
- >
- </el-table-column>
- <el-table-column
- v-if="pageName === 'inspectionView'"
- prop="spfsnlType"
- label="专业"
- show-overflow-tooltip
- align="center"
- :formatter="formatterspfsnlType"
- min-width="120"
- >
- </el-table-column>
- <el-table-column
- prop="genus"
- label="检查内容"
- align="center"
- min-width="200"
- >
- </el-table-column>
- <el-table-column
- prop="focPblm"
- label="重点检查项目"
- align="center"
- min-width="260"
- >
- </el-table-column>
- <el-table-column
- v-if="pageName === 'inspectionIndex'"
- prop="sn"
- align="center"
- show-overflow-tooltip
- min-width="160"
- label="与问题清单对应的编号"
- >
- </el-table-column>
- <el-table-column
- prop="chkItem"
- label="具体检查项目"
- align="center"
- min-width="420"
- >
- </el-table-column>
- <el-table-column
- prop="chkGist"
- show-overflow-tooltip
- min-width="200"
- align="center"
- label="检查依据(法规及规范相应条款)"
- >
- </el-table-column>
- <el-table-column v-if="pageName === 'inspectionView'" label="检查结果" align="center" >
- <el-table-column label="无问题" align="center">
- <el-table-column
- prop="pblmNt"
- show-overflow-tooltip
- align="center"
- min-width="160"
- label="记录检查结果"
- >
- </el-table-column>
- <el-table-column
- prop="isPblm"
- show-overflow-tooltip
- align="center"
- min-width="160"
- label="直接勾选"
- >
- <template slot-scope="scope">
- <div v-for="item in ynList" :key="item">
- <span v-if="scope.row.isPblm === item.value">☑</span
- ><span v-else>□</span><span>{{ item.label }}</span>
- </div>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="有问题" align="center">
- <el-table-column
- prop="pblmDesc"
- align="center"
- show-overflow-tooltip
- min-width="160"
- label="问题描述(完成底稿)"
- >
- </el-table-column>
- <el-table-column
- prop="pblmPasi"
- align="center"
- show-overflow-tooltip
- min-width="160"
- label="问题定性"
- >
- <template slot-scope="scope">
- <div v-for="item in problemType" :key="item">
- <span v-if="scope.row.scale === item.value">☑</span
- ><span v-else>□</span><span>{{ item.label }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="subjectNames"
- show-overflow-tooltip
- align="center"
- min-width="160"
- label="确认责任单位"
- >
- </el-table-column>
- <el-table-column
- prop="pblmMasteryLevel"
- align="center"
- show-overflow-tooltip
- min-width="160"
- label="问题掌握标准"
- >
- </el-table-column>
- </el-table-column>
- <el-table-column
- prop="nt"
- align="center"
- show-overflow-tooltip
- min-width="160"
- label="其他情况说明"
- >
- </el-table-column>
- </el-table-column>
- <el-table-column
- v-if="pageName === 'inspectionIndex'"
- prop="pblmMasteryLevel"
- align="center"
- show-overflow-tooltip
- min-width="160"
- label="问题掌握标准"
- >
- </el-table-column>
- <el-table-column
- prop="chkFrp"
- show-overflow-tooltip
- align="center"
- min-width="160"
- label="检查资料或部位"
- >
- </el-table-column>
- <el-table-column
- v-if="pageName === 'inspectionView'"
- prop="subName"
- show-overflow-tooltip
- align="center"
- min-width="160"
- label="参考范本"
- >
- <template slot-scope="scope">
- <div>
- <p v-for="item in scope.row.fileList" :key="item.id">
- <a
- v-if="item.bizType === '1'"
- :href="`${hostUrl}/${item.filePath}`"
- target="_blank"
- rel="noopener noreferrer"
- >
- {{ item.fileName }}
- </a>
- </p>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- v-if="pageName === 'inspectionView'"
- prop="subName"
- show-overflow-tooltip
- align="center"
- min-width="160"
- label="佐证资料(上传照片或扫描件为主)"
- >
- <template slot-scope="scope">
- <div>
- <p v-for="item in scope.row.fileList" :key="item.id">
- <a
- v-if="item.bizType === '2'"
- :href="`${hostUrl}/${item.filePath}`"
- target="_blank"
- rel="noopener noreferrer"
- >
- {{ item.fileName }}
- </a>
- </p>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- v-if="pageName === 'inspectionView'"
- prop="pblmsDesc"
- show-overflow-tooltip
- align="center"
- min-width="160"
- label="备注"
- >
- </el-table-column>
- <el-table-column
- fixed="right"
- align="center"
- label="操作"
- width="130"
- >
- <template slot-scope="scope">
- <el-button
- type="text"
- size="small"
- @click="toEditProblem(scope.row)"
- >编辑</el-button
- >
- <el-button
- @click="deleteProblem(scope.row)"
- type="text"
- size="small"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- style="margin-left: 30px"
- :pager-count="5"
- :current-page="pageIndex"
- background
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- :page-sizes="[10, 20, 50, 100]"
- @current-change="pageIndexChange"
- @size-change="handleSizeChange"
- ></el-pagination>
- </div>
- <add-problem-com
- v-if="addFileVisiual"
- :titleType="'编辑'"
- :rowData="rowData"
- :currentNodeId="currentNodeId"
- :listType="type"
- :pageName="pageName"
- :objId="objId"
- @dialogClose="dialogClose"
- ></add-problem-com>
- </el-main>
- </el-container>
- </template>
- <script>
- import request from "@util/gw_ajax_request.js";
- // import addProblemCom from './dialogCom/addProblemCom.vue'
- import ProblemModifyCom from "./dialogCom/ProblemModifyCom.vue";
- import ProblemDetailCom from "./dialogCom/ProblemDetails.vue";
- import ExportExcel from "./dialogCom/ExportExcel.vue";
- import ExportWord from "./dialogCom/ExportWord.vue";
- import axios from "axios";
- import { hostUrl } from "@util/global_variable.js";
- import { TacObiPblmHbPage, TacObiPblmHbInsert } from "@api/InspectionReport.js";
- import addProblemCom from "./dialogCom/addProblemView.vue";
- export default {
- props: [
- "currentNodeId",
- "type",
- "objId",
- "pertype",
- "submitStatus",
- "rightTableName",
- "pageName",
- ],
- data() {
- return {
- problemType: [
- { label: "一般", value: "0" },
- { label: "较重", value: "1" },
- { label: "严重", value: "2" },
- ],
- pblmPasi: "", //严重程度
- pblmNm: "",
- subjectNames: "", //单位名称,多个单位逗号拼接字符串
- ifCasePblm: "",
- tableData: [],
- baseInfo: {
- nm: "",
- condition: "",
- comment: "",
- },
- // problemId: '',
- pageIndex: 1,
- pageSize: 20,
- total: 0,
- loading: false,
- // showFileVisiual: false,
- addFileVisiual: false,
- modifyFileVisiual: false,
- // exportEvent: false,//导出对话框v-if
- // exportWordDialog: false,
- // problemId: '',
- name: "",
- tableHeight: window.innerHeight - 245,
- // showtypical:"",
- professionList: [
- { label: "前期与设计", value: "1" },
- { label: "建设管理", value: "2" },
- { label: "计划下达与执行", value: "3" },
- { label: "资金使用与管理", value: "4" },
- { label: "质量行为", value: "5" },
- { label: "质量实体", value: "6" },
- { label: "工程安全", value: "7" },
- ],
- ynList: [
- { label: "是", value: "1" },
- { label: "否", value: "0" },
- ],
- rowData: {},
- tableShow: false,
- };
- },
- components: {
- addProblemCom,
- ProblemModifyCom,
- ExportExcel,
- ExportWord,
- ProblemDetailCom,
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- },
- created() {
- // let currentOrgId = localStorage.getItem("currentOrgId")
- // if(currentOrgId == '036'){
- // this.showtypical=false;
- // }else{
- // this.showtypical = true;
- // }
- },
- mounted() {
- console.log(
- "---problemView----mounted--------",
- this.currentNodeId,
- this.type,
- this.pageName
- );
- },
- activated() {},
- methods: {
- formatterspfsnlType(row, column) {
- const data = this.professionList.filter((item) => {
- return item.label === row.spfsnlType;
- });
- if (data.length > 0) {
- return data[0].label;
- } else {
- return "";
- }
- },
- turnType() {
- if (this.type == "7") {
- this.name = "参建单位";
- } else if (this.type == "6") {
- this.name = "工程安全";
- } else if (this.type == "5") {
- this.name = "质量";
- } else if (this.type == "4") {
- this.name = "资金使用与管理";
- } else if (this.type == "3") {
- this.name = "计划下达与执行";
- } else if (this.type == "2") {
- this.name = "建设管理";
- } else if (this.type == "1") {
- this.name = "前期与设计";
- }
- },
- getProblemList(val) {
- this.turnType();
- this.loading = true;
- const params = {
- spfsnlType: this.name,
- // currentNodeId:this.currentNodeId,
- // objId: this.currentNodeId,
- objId: this.objId,
- pageSize: this.pageSize,
- pageNum: this.pageIndex,
- isPblm:val
- };
- TacObiPblmHbInsert(params)
- .then((res1) => {
- TacObiPblmHbPage(params)
- .then((res) => {
- if (res.data.list.length > 0) {
- res.data.list.forEach((item, index) => {
- item.ordr1 = index + 1;
- });
- }
- this.tableData = res.data.list;
- this.total = res.data.total;
- this.loading = false;
- this.tableShow = true;
- })
- .catch((err) => {
- this.loading = false;
- });
- })
- .catch((err) => {
- this.loading = false;
- });
- },
- getProblemList1(val) {
- this.turnType();
- this.loading = true;
- const params = {
- spfsnlType: this.name,
- objId: this.objId,
- pageSize: this.pageSize,
- pageNum: this.pageIndex,
- isPblm:val
- };
- TacObiPblmHbPage(params)
- .then((res) => {
- if (res.data.list.length > 0) {
- res.data.list.forEach((item, index) => {
- item.ordr1 = index + 1;
- });
- this.tableData = res.data.list;
- this.total = res.data.total;
- this.loading = false;
- this.tableShow = true;
- }
- })
- .catch((err) => {
- this.loading = false;
- });
- },
- // toAddFile() {
- // Object.assign(this.rowData,row)
- // this.addFileVisiual = true
- // },
- // //导出Excel
- // exportExcel() {
- // this.exportEvent = true
- // },
- // //导出Word
- // exportWord() {
- // this.exportWordDialog = true
- // },
- toEditProblem(row) {
- Object.assign(this.rowData, row);
- this.addFileVisiual = true;
- },
- deleteProblem(row) {
- this.$confirm("确认删除该问题吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- // request.get(`/tac/obj/pblmstb/hb/delete/${row.id}`).then(res=>{
- request.get(`/tac/obj/pblm/hb/delete/${row.id}`).then((res) => {
- if (res.success) {
- this.$message({
- type: "success",
- message: "删除成功!",
- });
- this.getProblemList();
- } else {
- this.$message({
- type: "error",
- message: res.message,
- });
- }
- });
- });
- },
- pageIndexChange(val) {
- this.pageIndex = val;
- this.getProblemList();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.getProblemList();
- },
- dialogClose() {
- this.addFileVisiual = false;
- // this.modifyFileVisiual = false
- // this.exportEvent = false
- // this.showFileVisiual = false
- // this.exportWordDialog = false
- this.getProblemList();
- },
- pblmPasiChange(val) {
- this.getProblemList();
- },
- handleSelectionChange(val) {
- let problemArr = [];
- val.forEach((ele) => {
- problemArr.push(ele.id);
- });
- this.problemId = problemArr.join(",");
- },
- // showJobFile() {
- // // this.exportWordDialog = true
- // this.openPageoffice()
- // },
- // isUsePo() {
- // // 是否启用PageOffice
- // let _this = this;
- // axios.defaults.timeout = 2000;
- // axios.get('/pageofficePath/pageoffice/getUsePo').then((res) => {
- // let data = res.data
- // if (data.isUse == 'true') {
- // _this.exportWordDialog = false
- // // 打开PageOffice
- // _this.openPageoffice()
- // } else {
- // _this.exportWordDialog = true
- // }
- // }).catch(function (err) {
- // _this.exportWordDialog = true
- // })
- // },
- // openPageoffice: function () {
- // let host = hostUrl;
- // let nginx = '/pageofficePath/';
- // let rgstrId = this.currentNodeId;
- // let type = "20" + this.type;
- // let persId = this.persId;
- // let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblmlist/word/' + type + '/' + rgstrId + '?persId=' + persId + '&pblmId=' + this.problemId + '|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
- // let a = document.createElement('a'); // 创建a标签
- // a.setAttribute('href', href);// href链接
- // a.click();// 自执行点击事件
- // console.log(href)
- // },
- // // 查看问题详情
- // toCheckDetail(row) {
- // this.problemId = row.id
- // this.showFileVisiual = true
- // }
- },
- watch: {
- currentNodeId(val) {
- // this.getProblemList();
- this.tableShow = false;
- },
- type(val) {
- // this.getProblemList();
- this.tableShow = false;
- },
- // backStatus(val) {
- // if (val) {
- // //回退状态为成功时
- // this.getProblemList()
- // }
- // }
- },
- };
- </script>
- <style lang="scss">
- .problem_list {
- .project_title {
- line-height: 50px;
- text-align: center;
- color: #333;
- border-bottom: solid 1px #eee;
- }
- h4 {
- line-height: 50px;
- color: #444;
- }
- .operate_btn {
- float: right;
- margin-bottom: 10px;
- }
- .inspPblmCate {
- padding: 2px 10px;
- border-radius: 10px;
- color: #ffffff;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- }
- .el-form-item__label {
- font-size: large;
- color: #333;
- }
- .el-form--inline .el-form-item {
- margin-right: 6px;
- }
- .el-table__header th {
- font-size: large !important;
- }
- tr.el-table__row {
- font-size: large;
- }
- }
- </style>
|