| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <template>
- <div id="shuikutianbaoId">
- <a-modal :title="currentObjectName + '督查填报'" :footer="null" width="60%" :open="dialogFormVisible" @cancel="closeDialog">
- 督查对象id:{{rowData.objId}}
- <a-layout>
- <a-layout-content id="dxdcListMain" style="padding:5px 20px;">
- <a-tabs v-model="currentViewId" type="card" @tabClick="tabIndexChange">
- <a-tab-pane v-for="option in options" :key="option.label" :tab="option.label">
- <component
- :is="option.value"
- :currentObjectRgstrId="currentObjectRgstrId"
- :currentObjectName="currentObjectName"
- :currentResCode="currentResCode"
- :currentObjectId="currentObjectId"
- :activeLabel="activeLabel"
- :pType="pType"
- :rowData="currentRowData"
- :openType="openType"
- :labelList="signatureLabelList"
- @cancelHandler="cancelHandler"
- @addShuiKuSuccess="addShuiKuSuccess"
- :flag="flag"
- :isTongYong="isTongYong"></component>
- </a-tab-pane>
- </a-tabs>
- </a-layout-content>
- </a-layout>
- </a-modal>
- </div>
- </template>
- <script>
- import request from '../../utils/gw_ajax_request';
- import { Modal } from 'ant-design-vue';
- import jichuxinxi from './common/jichuxinxi';
- import problemList from './commonProblemList';
- export default {
- components: {
- jichuxinxi: jichuxinxi,
- problemList: problemList,
- },
- props: [
- 'rowData',
- 'currentObjectRgstrId',
- 'currentResCode',
- 'currentObjectId',
- 'currentObjectName',
- 'pType',
- 'openType',
- 'flag',
- 'isQuanFuGai',
- 'isTongYong',
- ],
- data() {
- return {
- currentRowData: {},
- options: [],
- value: '',
- dialogShow: false,
- currentViewId: '',
- dialogFormVisible: true,
- activeLabel: '',
- signatureLabelList: ['督查人员'],
- };
- },
- computed: {
- persId() {
- return localStorage.getItem('persId')
- ? localStorage.getItem('persId')
- : '1098101939614724096';
- },
- currentRlcode() {
- return localStorage.getItem('currentRlcode')
- ? localStorage.getItem('currentRlcode')
- : '';
- },
- },
- mounted() {
- this.currentRowData = this.rowData;
- // if (parseInt(this.$route.params.type) >= 615 && parseInt(this.$route.params.type) <= 630) {
- if (
- (parseInt(this.$route.path.substring(this.$route.path.length - 3)) >=
- 615 &&
- parseInt(this.$route.path.substring(this.$route.path.length - 3)) <=
- 630) ||
- this.isQuanFuGai
- ) {
- this.options = [
- {
- value: 'problemList',
- label: '问题清单',
- },
- ];
- this.currentViewId = '问题清单';
- } else {
- this.options = [
- {
- value: 'jichuxinxi',
- label: '基础信息',
- },
- {
- value: 'problemList',
- label: '问题清单',
- },
- ];
- this.currentViewId = '基础信息';
- }
- },
- created() {},
- methods: {
- submitHandler() {
- getRsByRgstrId(this.currentObjectRgstrId, this.pType).then((res) => {
- if (res.data.baseStat == '0') {
- this.$message.warning('请填写重点环节落实情况!');
- return;
- } else if (res.data.presStat == '0') {
- this.$message.warning('请填写责任人状态!');
- return;
- } else if (res.data.resRunStat == '0') {
- this.$message.warning('请填写水库工程实体和运行管理情况!');
- return;
- } else if (res.data.viewStat == '0') {
- this.$message.warning('走访用户状态!');
- return;
- }
- Modal.confirm({
- title: '提示',
- content: '请确认所有信息填报完毕?',
- okType: 'warning',
- onOk: () => {
- const 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) {
- this.$emit('addShuiKuSuccess');
- this.$message.success('提交成功');
- } else {
- this.$emit('cancelHandler');
- }
- });
- },
- });
- });
- },
- 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(obj) {
- if (obj && obj.type) {
- this.currentRowData.type = obj.type;
- }
- this.$emit('addShuiKuSuccess');
- },
- closeDialog() {
- Modal.confirm({
- title: '提示',
- content: '确认退出吗?',
- okType: 'warning',
- onOk: () => {
- this.$emit('cancelHandler');
- return Promise.resolve();
- },
- });
- },
- tabIndexChange(item) {
- if (item == '问题清单') {
- this.activeLabel = item;
- } else {
- this.activeLabel = '';
- }
- },
- },
- };
- </script>
- <style lang='less' scoped>
- </style>
|