-
zhangwei
2025-08-25 23a2fff92f73b9759849a8016601a6817d7470b1
src/views/system/dept/detail.vue
@@ -1,11 +1,13 @@
<script setup lang="tsx">
import { ref, reactive, onMounted, computed, PropType } from "vue";
import { ref, reactive, onMounted, computed, PropType, h } from "vue";
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
import { useDept } from "./utils/hook";
import { useDetail } from "./utils/detail";
import { getTenderOrderDetail } from "@/api/item/index";
const isLoading = ref(false);
import { addDialog } from "@/components/ReDialog";
import pdfPreview from "@/views/system/component/pdfPreview.vue";
import { deviceDetection } from "@pureadmin/utils";
interface Emits {
  (e: "backListPage"): void;
}
@@ -17,7 +19,7 @@
import IconParkSolidBack from "~icons/icon-park-solid/back";
const { openDialog } = useDept(ref({}));
const { openUploadDialog, state } = useDetail();
const { openUploadDialog, state, changeDialog } = useDetail();
defineOptions({
  name: "itemdetail"
});
@@ -30,27 +32,16 @@
};
const previewPdf = pdfUrl => {
  addDialog({
    width: "80%",
    title: "确认信息",
    contentRenderer: () => (
      <iframe
        type="application/pdf"
        src={pdfUrl}
        width="800"
        height="600"
      ></iframe>
    ), // jsx 语法 (注意在.vue文件启用jsx语法,需要在script开启lang="tsx")
    closeCallBack: ({ options, args }) => {
      // options.props 是响应式的
      // const { formInline } = options.props as FormProps;
      // const text = `姓名:${formInline.user} 城市:${formInline.region}`;
      if (args?.command === "cancel") {
        // 您点击了取消按钮
        // active.value -= 1;
      } else if (args?.command === "sure") {
      } else {
      }
    }
    title: `预览pdf`,
    props: {},
    width: "60%",
    draggable: true,
    fullscreen: deviceDetection(),
    fullscreenIcon: true,
    sureBtnLoading: true,
    closeOnClickModal: false,
    contentRenderer: () => h(pdfPreview, { pdfSrc: pdfUrl })
    // jsx 语法 (注意在.vue文件启用jsx语法,需要在script开启lang="tsx")
  });
};
</script>
@@ -80,7 +71,12 @@
        </div>
      </template>
      <div>
        <el-descriptions class="margin-top" :column="3" border>
        <el-descriptions
          class="margin-top"
          :column="3"
          border
          label-width="120"
        >
          <el-descriptions-item label="项目编号">
            {{ state.nowInfo.projectCode }}
          </el-descriptions-item>
@@ -93,9 +89,9 @@
          <el-descriptions-item label="联合体投标">
            {{ state.nowInfo.lianhetitoubiao }}
          </el-descriptions-item>
          <!-- <el-descriptions-item label="Remarks">
          <el-descriptions-item label="开标方式">
            {{ state.nowInfo.kaibiaofangshi }}
          </el-descriptions-item>
          <el-descriptions-item label="Address" /> -->
        </el-descriptions>
      </div>
    </el-card>
@@ -114,11 +110,18 @@
              <div>
                <el-form label-width="auto" style="max-width: 1000px">
                  <el-form-item label="项目信息:">
                    投标报名开始时间:
                    {{ state.nowInfo.toubiaoStartDate ?? "暂无" }}
                    <span class="mr-4">
                      投标报名开始时间:{{
                        state.nowInfo.toubiaoStartDate ?? "暂无"
                      }}
                    </span>
                    <span class="mr-4">
                    投标报名截止时间:
                    {{ state.nowInfo.toubiaoEndDate }}
                    开标时间:{{ state.nowInfo.kaibiaoDate }}
                      {{ state.nowInfo.toubiaoEndDate ?? "暂无" }}
                    </span>
                    <span class="mr-4">
                      开标时间:{{ state.nowInfo.kaibiaoDate ?? "暂无" }}
                    </span>
                  </el-form-item>
                  <el-form-item label="上传公告:">
                    <el-button
@@ -126,7 +129,7 @@
                      type="primary"
                      plain
                      size="small"
                      @click="openUploadDialog('上传')"
                      @click="openUploadDialog('上传', state.nowInfo)"
                    >
                      上传公告
                    </el-button>
@@ -152,7 +155,23 @@
                      >
                        点击预览
                      </el-button>
                      <el-button type="primary" plain size="small">
                      <el-button
                        v-if="state.nowInfo?.changeOrder"
                        type="primary"
                        plain
                        size="small"
                        @click="
                          previewPdf(state.nowInfo.changeOrder.biangengwenjian)
                        "
                      >
                        点击预览变更公告
                      </el-button>
                      <el-button
                        type="primary"
                        plain
                        size="small"
                        @click="changeDialog('上传变更', state.nowInfo)"
                      >
                        修改标题
                      </el-button>
                    </div>