xiangpei
2024-08-09 9aac41e15d65828bfdc142f42035bc01d28bd009
点位导入增加标签
1个文件已修改
14 ■■■■■ 已修改文件
src/views/system/point/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/point/index.vue
@@ -41,13 +41,14 @@
            </el-select>
          </div>
          <div class="bottom_">
            <el-select @change="showTimeRange" v-model="contractId" size="small" placeholder="运维合同">
            <el-select @change="showTimeRange" v-model="contractId" size="small" placeholder="运维合同" :disabled="! importUnitId">
              <el-option v-for="(time, index) in timeList" :key="index" :label="time.name" :value="time.id"></el-option>
            </el-select>
            <span style="margin-left: 10px;color: #8a8989" v-show="importUnitId">该单位有{{timeList.length}}个合同</span>
          </div>
          <div class="bottom_">
            <el-date-picker
              :disabled="! contractId"
              size="small"
              v-model="ywTimes"
              type="daterange"
@@ -55,6 +56,11 @@
              start-placeholder="运维开始时间"
              end-placeholder="运维结束时间">
            </el-date-picker>
          </div>
          <div class="bottom_">
            <el-checkbox v-model="provinceTag">重点点位</el-checkbox>
            <el-checkbox v-model="importantTag">省厅</el-checkbox>
            <el-checkbox v-model="importantCommandImageTag">重点指挥图像</el-checkbox>
          </div>
          <div class="bottom_">
            <el-upload
@@ -215,6 +221,9 @@
  dicts: ['point_tag'],
  data() {
    return {
      importantTag: false,
      provinceTag: false,
      importantCommandImageTag: false,
      timeList: [],
      timezone: [],
      ywTimes: [],
@@ -328,6 +337,9 @@
      formData.append("file", this.importFile)
      formData.append("startTime", this.ywTimes[0])
      formData.append("endTime", this.ywTimes[1])
      formData.append("provinceTag", this.provinceTag)
      formData.append("importantTag", this.importantTag)
      formData.append("importantCommandImageTag", this.importantCommandImageTag)
      importData(formData, this.importUnitId).then(res => {
        this.$message.success("导入成功")
        this.upload = false