吴羡
23 小时以前 d2eed0eb7c2f9537d5eaab7ccc3b6ab258959227
src/views/CNAS/resourceDemand/device/component/files.vue
@@ -173,9 +173,9 @@
      <el-row>
        <el-col :span="7" style="padding-right: 20px;">
          <!-- 图片 -->
          <el-image v-if="editData.imageUpload" class="img" style="width:100%;height: 320px;"
          <el-image class="img" style="width:100%;height: 320px"
            :src="javaApi + '/img/' + editData.imageUpload">
            <template #error><div  class="image-error" style="width: calc(100% - 2px);
            <template #error><div class="image-error" style="width: calc(100% - 2px);
            height: 318px;
            border-radius: 16px;
            display: flex;
@@ -185,18 +185,13 @@
              <lims-icon name="el-icon-picture-outline" style="font-size:60px;color:var(--lims-text-2);"></lims-icon>
            </div></template>
          </el-image>
          <div v-else class="image-error"
            style="width: calc(100% - 2px);height: 320px;border-radius: 16px;display: flex;align-items: center;justify-content: center;border: 1px solid var(--lims-divider);">
            <lims-icon name="el-icon-picture-outline" style="font-size:60px;color:var(--lims-text-2);"></lims-icon>
          </div>
          <!-- 图片上传 -->
          <div style="margin-top: 12px;text-align: center;">
          <div style="border: 1px solid var(--el-border-color);border-radius:4px;height:32px;line-height:32px;display:flex;justify-content: space-around;font-size: 13px;margin-top:12px;">
            <div v-show="editData.imageName" class="picName">{{ editData.imageName }}</div>
            <el-upload :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false"
              accept='image/jpg,image/jpeg,image/png' :headers="uploadHeader" :before-upload="beforeUpload"
              :on-error="onError" ref='upload' class="avatar-uploader">
              <img v-if="editData.imageUpload" :src="javaApi + '/img/' + editData.imageUpload" class="avatar">
              <lims-icon name="el-icon-plus" v-else class="avatar-uploader-icon"></lims-icon>
              :on-error="onError" ref='upload'>
              <el-button link type="primary" style="height:30px;padding-top:8px">上传</el-button>
            </el-upload>
          </div>
        </el-col>
@@ -208,7 +203,7 @@
              <el-form-item label="仪器名称:" prop="deviceName">
                <el-input v-model="editData.deviceName" size="small"></el-input>
              </el-form-item>
              <el-form-item label="仪器名称EN:" prop="enDeviceName">
              <el-form-item label="仪器名称:" prop="enDeviceName">
                <el-input v-model="editData.enDeviceName" size="small"></el-input>
              </el-form-item>
            </div>
@@ -366,7 +361,7 @@
      </el-form>
      </div>
      <template #footer><span  class="dialog-footer">
        <el-row>
        <el-row justify="end">
          <el-button @click="handleClose">取 消</el-button>
          <el-button type="primary" @click="submitForm" :loading="upLoad">确 定</el-button>
        </el-row>
@@ -829,6 +824,8 @@
      if (!this.editData.largeCategory && (treeCategory === '设备' || treeCategory === '计量器具')) {
        this.editData.largeCategory = treeCategory
      }
      // 打开弹窗时按已有的最近日期和周期重算下次日期,避免要重新选择日期才计算
      this.calcNextDate(this.editData)
      this.$nextTick(() => {
        this.dialogVisible = true
      })
@@ -1087,11 +1084,19 @@
  background: var(--el-color-primary, #409eff);
}
.picName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
  width: 120px;
}
.el-image {
  position: relative;
}
.el-icon-picture-outline {
.el-image .el-icon-picture-outline {
  position: absolute;
  left: 50%;
  top: 50%;
@@ -1167,33 +1172,6 @@
.check_data,
.check_input {
  flex-grow: 1;
}
.avatar-uploader .el-upload {
  border: 1px dashed #190505;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: var(--el-color-primary);
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.device-main {