jiangping
2025-06-06 77946261ec663aa1fe7f6f97e550532ed879f982
admin/src/views/workorder/components/problemReportingDetails.vue
@@ -3,6 +3,7 @@
        :title="title"
        :showConfirm="false"
        :visible.sync="visible"
        @close="closeView"
        width="100%">
        <div class="wt">
            <div class="wt_head">
@@ -10,9 +11,9 @@
                    <div class="title">问题详情</div>
                    <el-tag style="margin-left: 10px;" v-if="form.dealStatus === 0">待处理</el-tag>
                    <el-tag style="margin-left: 10px;" v-if="form.dealStatus === 1">已转工单</el-tag>
                    <el-tag style="margin-left: 10px;" v-if="form.dealStatus === 2">已关闭</el-tag>
                    <el-tag style="margin-left: 10px;" type="info" v-if="form.dealStatus === 2">已关闭</el-tag>
                </div>
                <el-button @click="handleDetail" v-if="form.dealStatus === 1">查看工单</el-button>
                <el-button @click="handleDetail" v-if="form.dealStatus === 1 && isShow">查看工单</el-button>
            </div>
            <div class="wt_content">
                <div class="wt_content_row" style="width: 25%;">
@@ -45,7 +46,7 @@
            </div>
            <div class="wt_head">
                <div class="wt_head_title">
                    <div class="title">问题详情</div>
                    <div class="title">处理结果</div>
                </div>
            </div>
            <div class="wt_content">
@@ -62,31 +63,46 @@
                    关闭说明:{{form.dealInfo}}
                </div>
            </div>
        </div>
        <!--    工单详情    -->
        <Detail v-if="showDetail" ref="DetailRef" @close="showDetail = false" />
            <GDDetail ref="GD_Detail" @close="closeDetails" />
        </div>
    </GlobalWindow>
</template>
<script>
  import BaseOpera from '@/components/base/BaseOpera'
  import GlobalWindow from '@/components/common/GlobalWindow'
  import Detail from './detail'
  // import GDDetail from './detail'
  // import GDDetail from '@/views/workorder/components/detail'
  import { getById } from '@/api/ywProblem'
  export default {
    name: "problemReportingDetails",
    extends: BaseOpera,
    components: { GlobalWindow, Detail },
    components: {
      GlobalWindow,
      GDDetail: () => import('./detail')
    },
    data() {
      return {
        form: {},
        showDetail: false,
        isShow: true,
        test: false
      }
    },
    methods: {
      open (title, target) {
      closeView() {
        this.$emit('close')
        this.visible = false
      },
      closeDetails() {
        console.log('1')
        this.test = false
      },
      open (title, target, show) {
        this.title = title
        this.form = target
        this.isShow = show
        getById(target.id)
            .then(res => {
              this.form = res
@@ -94,11 +110,13 @@
            })
      },
      handleDetail() {
        this.showDetail = true
        this.test = true
        this.$nextTick(() => {
          this.$refs.DetailRef.visible = true
          this.$refs.DetailRef.id = this.form.workorderId
          this.$refs.DetailRef.getDetail()
          this.$refs.GD_Detail.open('工单详情', { workorderId: this.form.workorderId }, false)
            // this.$refs.GD_Detail.isShow = false
            // this.$refs.GD_Detail.visible = true
            // this.$refs.GD_Detail.id = this.form.workorderId
            // this.$refs.GD_Detail.getDetail()
        })
      },
      returnText(status) {