Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/resourceDemand/device/component/files.vue
@@ -25,7 +25,7 @@
        <el-col :span="8">
          <div class="form-item">
            <label>设备名称</label>
            <!-- <p>{{ Mdata.deviceName }}</p> -->
<!--             <p>{{ Mdata.deviceName }}</p> -->
            <el-tooltip class="item" :content="Mdata.deviceName">
              <span class="text-ellipsis">{{ Mdata.deviceName }}</span>
            </el-tooltip>
@@ -157,7 +157,7 @@
        </el-col>
      </el-row>
      <h4 style="margin-bottom: 10px;margin-top: 10px;"><span class="line"></span><span>附件和相关文档</span></h4>
      <el-table height="200px" :data="tableDataA">
      <el-table height="200px" :data="tableDataA" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
        <el-table-column header-align="center" align="center" prop="prop" label="序号" type="index" width="60" />
        <el-table-column prop="documentType" label="类型" min-width="100">
          <template v-slot="scope">
@@ -170,12 +170,12 @@
        <el-table-column prop="quantity" label="份数" min-width="80" />
        <el-table-column prop="pageCount" label="页码" min-width="80" />
        <el-table-column prop="provider" label="提供者" min-width="150" />
        <el-table-column prop="provideDate" label="归档日期" min-width="150" />
        <el-table-column prop="provideDate" label="归档日期" min-width="170" />
        <el-table-column prop="comments" label="备注" min-width="150" />
        <el-table-column fixed="right" label="操作" min-width="180">
        <el-table-column fixed="right" label="操作" min-width="180" align="center">
          <template slot-scope="scope">
            <el-button type="text" size="small" @click="handleAttachmentClick(scope.row)">下载附件</el-button>
            <el-button type="text" size="small" @click="handleViewClick(scope.row)">查看</el-button>
            <el-button type="text" size="small" @click="handleViewClick(scope.row)">编辑</el-button>
            <el-button type="text" size="small" @click="handleDeleteClick(scope.row)">删除</el-button>
          </template>
        </el-table-column>
@@ -341,7 +341,7 @@
        </el-row>
      </span>
    </el-dialog>
    <el-dialog title="添加设备附件" top="5vh" v-if="dialogVisible1" :visible.sync="dialogVisible1" width="40%">
    <el-dialog title="设备附件" top="5vh" v-if="dialogVisible1" :visible.sync="dialogVisible1" width="40%">
      <el-form ref="form" :model="addFile" label-width="120px">
        <el-row :gutter="20">
          <el-col :span="12">
@@ -446,7 +446,6 @@
<script>
import { MessageBox } from 'element-ui'
import ValueTable from "@/components/Table/value-table.vue";
import fileDownload from '@/utils/file'
import vueQr from 'vue-qr'
import PrintJS from 'print-js'
@@ -484,7 +483,6 @@
    }
  },
  components: {
    ValueTable,
    vueQr
  },
  data() {
@@ -618,18 +616,7 @@
    handleAttachmentClick(row) {
      console.log(row)
      if (row.fileName) {
        let state = /\.(jpg|jpeg|png|gif)$/i.test(row.fileName)
        if (state) {
          let url = this.javaApi + '/img/' + row.fileName;
          fileDownload.downloadIamge(url, row.fileName)
        } else {
          const url = this.javaApi + '/word/' + row.fileName
          const link = document.createElement('a');
          link.href = url;
          link.download = row.fileName;
          link.click();
          this.$message.success('下载成功')
        }
        this.$download.saveAs(row.fileName)
      } else {
        this.$message.warning('未上传文件!')
      }
@@ -791,10 +778,6 @@
      }
      this.upLoad = true;
      upDeviceParameter(formData).then(res => {
        if (res.code === 201) {
          this.upLoad = false
          return
        }
        this.$message.success('修改成功')
        this.upLoad = false
        this.getList(this.clickNodeVal.value)
@@ -918,7 +901,7 @@
<style scoped>
.main_div {
  height: calc(100vh - 15em);
  height: calc(100vh - 19em);
  overflow-y: auto;
  overflow-x: hidden;
}
@@ -931,7 +914,6 @@
.page-header {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
h4 {
@@ -1063,14 +1045,14 @@
.device-main {
  width: 90%;
  margin: 0px 5%;
  height: 460px;
  height: 500px;
  padding: 25px 0px;
  background-color: #fff;
}
.device-center {
  width: 90%;
  height: 460px;
  height: 490px;
  margin: 0px 5%;
  border-radius: 15px;
  background-color: #fff;