管道基础大数据平台系统开发-【前端】-新系統界面
liupengpeng
2023-02-14 f25f3604f80ecb2fae3e2ef1fb95394cac4660f9
src/views/datamanage/styleManage.vue
@@ -20,19 +20,7 @@
            :placeholder="$t('common.pleaseInput')"
          />
        </el-form-item>
        <el-form-item>
          <el-button
            @click="submitForm('ruleForm')"
            icon="el-icon-search"
            type="primary"
            size="small"
          >{{ $t('common.iquery') }}</el-button>
          <el-button
            @click="resetForm('ruleForm')"
            icon="el-icon-refresh"
            type="info"
            size="small"
          >{{ $t('common.empty') }}</el-button>
        <el-form-item style="float: right;">
          <el-button
            v-if="btnStatus.insert"
            @click="setInsertShow()"
@@ -47,6 +35,18 @@
            type="danger"
            size="small"
          >{{ $t('common.delete') }}</el-button>
          <el-button
            @click="submitForm('ruleForm')"
            icon="el-icon-search"
            type="primary"
            size="small"
          >{{ $t('common.iquery') }}</el-button>
          <el-button
            @click="resetForm('ruleForm')"
            icon="el-icon-refresh"
            type="info"
            size="small"
          >{{ $t('common.empty') }}</el-button>
        </el-form-item>
      </el-form>
    </div>
@@ -142,7 +142,7 @@
          </el-table>
        </div>
        <div
          style="margin-top: 20px; margin-left: 400px"
          style="margin-top: 20px;"
          class="pagination_box"
        >
          <el-pagination
@@ -216,7 +216,7 @@
        <el-divider></el-divider>
        <p>
          <label> {{ $t('dataManage.styleObj.fileguid') }}:</label>
          <label class="boxlabel">{{ itemdetail.fileGuid }}</label>
          <label class="boxlabel">{{ itemdetail.fname }}</label>
        </p>
        <el-divider></el-divider>
        <p>
@@ -729,7 +729,7 @@
          <div class="BoxFlex">
            <div class="BoxFlexinput">
              <el-input
                v-model="insertform.fileGuid"
                v-model="insertFileGuid"
                disabled
                autocomplete="off"
                style="width:100%"
@@ -742,7 +742,7 @@
                id="insertFile"
                multiple="multiple"
                style="display: none"
                @change="insertFile(0)"
                @change="insertFileData(0)"
              />
              <el-button
                style="margin-left: 6px;"
@@ -780,7 +780,7 @@
          <div class="BoxFlex">
            <div class="BoxFlexinput">
              <el-input
                v-model="insertform.viewGuid"
                v-model="insertViewGuid"
                disabled
                autocomplete="off"
                style="width:100%"
@@ -793,7 +793,7 @@
                id="insertimageFile"
                multiple="multiple"
                style="display: none"
                @change="insertFile(1)"
                @change="insertFileData(1)"
              />
              <el-button
                style="margin-left: 6px;"
@@ -922,6 +922,14 @@
  components: { MyBread, styleDirTree, styleDepTree },
  data() {
    return {
      insertFileGuid: "",
      insertViewGuid: "",
      insertFileName: "",
      insertViewName: "",
      insertform: {
      },
      dialogFormVisible: false,
      InsertFormdialog: false,
      showCata: false,
@@ -940,10 +948,7 @@
      showDirCata: false,
      showDepCata: false,
      tableData: [],
      insertform: {
        fileGuid: null,
        viewGuid: null,
      },
      dirFlag: null,
      depFlag: null,
      guidFile: null,
@@ -1012,15 +1017,19 @@
        $("#insertimageFile").click();
      }
    },
    insertFile(res) {
    insertFileData: function (res) {
      if (res == 0) {
        var val = document.getElementById("insertFile").files;
        if (!val || !val.length) return;
        this.insertform.fileGuid = val[0].name;
        let val = document.getElementById("insertFile").files;
        this.insertFileGuid = val[0].name;
        this.insertFileName = val[0].name;
      } else if (res == 1) {
        var val = document.getElementById("insertimageFile").files;
        if (!val || !val.length) return;
        this.insertform.viewGuid = val[0].name;
        let val = document.getElementById("insertimageFile").files;
        this.insertViewGuid = val[0].name;
        this.insertViewName = val[0].name;
      }
    },
    async setinsertFile(res) {
@@ -1208,9 +1217,10 @@
    insertFromDataClose() {
      this.InsertFormdialog = false;
      this.insertform = {
        fileGuid: null,
        viewGuid: null,
      }
      this.insertFileGuid = "";
      this.insertViewGuid = ""
      this.filesReset();
    },
    handleClose() {
@@ -1231,10 +1241,13 @@
      }
      if (this.guidFile != null) {
        this.insertform.fileGuid = this.guidFile;
        this.insertform.fname = this.insertFileName;
      }
      if (this.viewFile != null) {
        this.insertform.viewGuid = this.viewFile;
        this.insertform.vname = this.insertViewName;
      }
      const data = await insertStyle(this.insertform);
      if (data.code == 200) {
        this.InsertFormdialog = false;
@@ -1242,6 +1255,8 @@
          fileGuid: null,
          viewGuid: null,
        }
        this.insertFileGuid = "";
        this.insertViewGuid = ""
        this.filesReset();
        this.$message({
          message: "添加成功!",
@@ -1261,6 +1276,7 @@
      }
      this.listData.name = this.ruleForm.name;
      const data = await select_Style_ByPageAndCount(this.listData);
      if (data.code != 200) {
        this.$message.error("列表调用失败");
      }
@@ -1419,9 +1435,11 @@
        this.upform.status = this.statusFormat(this.upform.status);
      }
      if (this.guidFile != null) {
        this.upform.fname = this.upform.fileGuid;
        this.upform.fileGuid = this.guidFile;
      }
      if (this.viewFile != null) {
        this.upform.vname = this.upform.viewGuid;
        this.upform.viewGuid = this.viewFile;
      }
      const data = await updateStyle(this.upform);
@@ -1466,6 +1484,7 @@
    showDetail(index, row) {
      var token = getToken();
      this.showinfoBox = true;
      this.itemdetail = row;
      this.itemdetail.createTime = this.formomentTime(
        this.itemdetail.createTime
@@ -1488,6 +1507,8 @@
      this.upform = row;
      this.upform.depValue = row.depName;
      this.upform.dirValue = row.dirName;
      this.upform.fileGuid = row.fname;
      this.upform.viewGuid = row.vname;
      this.upform.status = this.forMontStatus(row.status);
    },
    handleDelete(index, row) {