| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <template>
- <div id="shuikutianbaoId">
- <el-dialog :title="currentObjectName+'督查填报'" width="60%" :before-close="closeDialog"
- :visible.sync="dialogFormVisible">
- <el-container>
- <el-main id="dxdcListMain" style="padding:5px 20px;">
- <el-tabs v-model="currentViewId" type="card" @tab-click="tabIndexChange">
- <el-tab-pane
- :label="option.label"
- :name="option.label"
- v-for="option in optionList"
- :key="option.value">
- <component
- :is="option.value"
- :currentObjectRgstrId="currentObjectRgstrId"
- :currentObjectName="currentObjectName"
- :currentResCode="currentResCode"
- :currentObjectId="currentObjectId"
- :activeLabel="activeLabel"
- :pType="pType"
- :openType="openType"
- :labelList="signatureLabelList"
- @cancelHandler="cancelHandler"
- @addShuiKuSuccess="addShuiKuSuccess"
- @addShuiKuSuccess1="addShuiKuSuccess1"
- ></component>
- </el-tab-pane>
- </el-tabs>
- </el-main>
- </el-container>
- </el-dialog>
- </div>
- </template>
- <script>
- import request from "@util/gw_ajax_request.js";
- import {getrgstrIdObject, getRsByRgstrId} from "@api/duChaTianBao.js";
- import jichuxinxi from "./pwuawiu/jichuxinxi.vue"
- import signature from "./pwuawiu/signature.vue"
- import planUseCheck from "./pwuawiu/planUseCheck.vue"
- import saveWaterCheck from "./pwuawiu/saveWaterCheck.vue"
- import useUnitCheck from "./pwuawiu/useUnitCheck.vue"
- import problemList from "./pwuawiuProblemList"
- export default {
- components: {
- jichuxinxi:jichuxinxi,
- signature:signature,
- planUseCheck:planUseCheck,
- saveWaterCheck:saveWaterCheck,
- useUnitCheck:useUnitCheck,
- problemList:problemList
- },
- props: ['rowData', 'currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName', 'pType','openType'],
- data() {
- return {
- optionList:[],
- options: [
- {
- value: "jichuxinxi",
- label: "基础信息"
- },
- {
- value: "signature",
- label: '签字确认'
- },
- {
- value: "planUseCheck",
- label: '计划用水户现场考核'
- }
- ],
- options1: [
- {
- value: "saveWaterCheck",
- label: '节水型载体现场考核'
- }
- ],
- options2: [
- {
- value: "useUnitCheck",
- label: '取水单位现场考核'
- }
- ],
- options3: [
- {
- value: "problemList",
- label: '问题清单'
- }
- ],
- value: "",
- dialogShow: false,
- currentViewId: "基础信息",
- dialogFormVisible: true,
- activeLabel: '',
- signatureLabelList: ['检查人员签字确认','被检查单位签字确认']
- };
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- currentRlcode() {
- return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
- }
- },
- mounted() {
- this.initTab();
- },
- watch: {},
- methods: {
- initTab(){
- this.optionList = [];
- this.optionList = this.options;
- if(this.rowData.ndstyType=='1'){
- this.optionList = this.optionList.concat(this.options1);
- }
- if(this.rowData.isUnit=='1'){
- this.optionList = this.optionList.concat(this.options2);
- }
- this.optionList = this.optionList.concat(this.options3);
- },
- submitHandler() {
- var _self = this;
- getRsByRgstrId(this.currentObjectRgstrId, this.pType).then(
- (res) => {
- if (res.data.baseStat == '0') {
- this.$message({
- message: '请填写重点环节落实情况!',
- type: 'warning'
- });
- return
- } else if (res.data.presStat == '0') {
- this.$message({
- message: '请填写责任人状态!',
- type: 'warning'
- });
- return
- } else if (res.data.resRunStat == '0') {
- this.$message({
- message: '请填写水库工程实体和运行管理情况!',
- type: 'warning'
- });
- return
- } else if (res.data.viewStat == '0') {
- this.$message({
- message: '走访用户状态!',
- type: 'warning'
- });
- return
- }
- this.$confirm('请确认所有信息填报完毕?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let formObj = {
- "rgstrId": this.currentObjectRgstrId,
- "state": "2"
- }
- let url = '/dc/insp/rsvrRgstr/update';
- if(this.pType==22){
- url = '/bis/insp/rsml/rgstr';
- }
- request.post(url, formObj).then((res) => {
- if (res.success) {
- _self.$emit("addShuiKuSuccess");
- _self.$message.success("提交成功");
- } else {
- _self.$emit('cancelHandler');
- }
- });
- }).catch(() => {
- });
- }, (err) => {
- });
- },
- closeHandler() {
- this.dialogShow = false
- this.$emit("addShuiKuSuccess");
- },
- appearDialog(type) {
- this.dialogShow = true
- // this.problemSmallType = type
- },
- closePDialog() {
- this.dialogShow = false
- },
- showDialog() {
- this.dialogFormVisible = true;
- },
- cancelHandler() {
- this.$emit('cancelHandler');
- },
- addShuiKuSuccess() {
- this.$emit('addShuiKuSuccess');
- },
- addShuiKuSuccess1(obj) {
- this.optionList = [];
- this.optionList = this.options;
- if(obj.ndstyType=='1'){
- this.optionList = this.optionList.concat(this.options1);
- }
- if(obj.isUnit=='1'){
- this.optionList = this.optionList.concat(this.options2);
- }
- this.optionList = this.optionList.concat(this.options3);
- this.$emit('addShuiKuSuccess');
- },
- closeDialog() {
- this.$confirm('确认退出吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.$emit('cancelHandler');
- }).catch(() => {
- });
- },
- tabIndexChange(item) {
- if (item.label == '问题清单') {
- this.activeLabel = item.label
- } else {
- this.activeLabel = ''
- }
- }
- }
- };
- </script>
- <style>
- #shuikutianbaoId .el-dialog {
- margin-top: 10vh;
- }
- </style>
|