Fixiaobai
2023-11-08 1ad4dd1d9a1a521980ce2cfeae4208b1873c7c9a
	modified:   src/views/basic/param/index.vue
已修改1个文件
71 ■■■■■ 文件已修改
src/views/basic/param/index.vue 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/param/index.vue
@@ -24,24 +24,16 @@
        </el-form>
    </div>
    <basic-container>
        <avue-crud :data="tableData"
              ref="crud"
             :option="option"
             :span-method="spanMethod"
             @refresh-change="getData"
             :page="page"
             :table-loading="loading"
             @row-update="updateParam"
             @row-del="delParam">
      <avue-crud :data="tableData" ref="crud" :option="option" :span-method="spanMethod" @refresh-change="getData"
        :page="page" :table-loading="loading" @row-update="updateParam" @row-del="delParam">
             <template #menu="{row,index}">
              <el-button type="text" icon="el-icon-edit" size="small" @click="showEdit(row,index)">编辑</el-button>
              <el-button type="text" icon="el-icon-delete" size="small" @click="showDel(row,index)">删除</el-button>
            </template>
             <template slot-scope="scope" slot="paramTypeForm">
                <el-select v-model="scope.row.paramType" @change="changeType(scope.row)"
                filterable placeholder="请选择参数类型" :disabled="formDisabled">
                  <el-option v-for="(item,index) in typeOptions"
                  :key="index" :label="item.label" :value="item.value"/>
          <el-select v-model="scope.row.paramType" @change="changeType(scope.row)" filterable placeholder="请选择参数类型"
            :disabled="formDisabled">
            <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" />
                </el-select>
             </template>
             <template slot="paramFormatLabel" slot-scope="scope">
@@ -49,25 +41,19 @@
                <span v-else>数据字典</span>
             </template>
             <template slot-scope="scope" slot="paramFormatForm">
               <el-input v-if="scope.row.paramType!='2'" v-model="scope.row.paramFormat"
               placeholder="请输入参数格式" :disabled="formDisabled"/>
               <el-select v-else v-model="scope.row.paramFormat" filterable
               placeholder="请选择数据字典" :disabled="formDisabled">
                 <el-option v-for="(item,index) in dictOptions"
                 :key="index" :label="item.description" :value="item.type"/>
          <el-input v-if="scope.row.paramType != '2'" v-model="scope.row.paramFormat" placeholder="请输入参数格式"
            :disabled="formDisabled" />
          <el-select v-else v-model="scope.row.paramFormat" filterable placeholder="请选择数据字典" :disabled="formDisabled">
            <el-option v-for="(item, index) in dictOptions" :key="index" :label="item.description" :value="item.type" />
               </el-select>
             </template>
        </avue-crud>
    </basic-container>
    <!-- 弹窗, 新增 / 修改 -->
    <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form>
    <el-dialog
      title="导入"
      :visible.sync="importDialog"
      width="22%">
        <el-upload ref="upload" style="width:100%;" class="upload-demo" drag action="#"
        :multiple="false" :file-list="fileList" :auto-upload="false" show-file-list
        :on-change="handleUpload">
    <el-dialog title="导入" :visible.sync="importDialog" width="22%">
      <el-upload ref="upload" style="width:100%;" class="upload-demo" drag action="#" :multiple="false"
        :file-list="fileList" :auto-upload="false" show-file-list :on-change="handleUpload">
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
          <div class="el-upload__tip" slot="tip">
@@ -247,8 +233,11 @@
      const fileData =  new FormData();
      fileData.append('file', this.fileList[0].raw);
      uploadParam(fileData).then((res)=>{
        console.log(res);
        // this.exportLoading = false;
        this.$message.success("导入参数成功!")
        this.fileList = []
        this.importDialog = false
        this.getData()
        this.getParamType()
      }).catch()
    },
    // 修改参数类型
@@ -456,6 +445,7 @@
.grid-header {
  display: none;
}
.param-basic {
  margin: 0 10px;
  border-radius: 0px;
@@ -480,30 +470,22 @@
}
/*自定义disabled状态下checkbox的样式*/
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled.is-checked
  .el-checkbox__inner {
.completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
  background-color: #006eff;
  border-color: #006eff;
}
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled.is-checked
  + span.el-checkbox__label {
.completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked+span.el-checkbox__label {
  color: #006eff;
  border-color: #006eff;
}
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled
  .el-checkbox__inner {
.completeproductstructure-checkout .el-checkbox__input.is-disabled .el-checkbox__inner {
  background-color: #ffffff;
  cursor: pointer;
}
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled
  + span.el-checkbox__label {
.completeproductstructure-checkout .el-checkbox__input.is-disabled+span.el-checkbox__label {
  color: #606266;
  cursor: pointer;
}
@@ -546,14 +528,23 @@
.GooFlow .ico .ico_start:before {
  color: red;
}
.highlight-tab-class {
  color: #006eff;
  background: #e4e7ed;
  border-top: 1px solid #006eff;
}
.unhighlight-tab-class {
  border: 1px solid #e4e7ed;
  border-bottom: none;
}
.el-upload-dragger {
  width: 300px;
}
.upload-demo {
  width: 300px;
}
</style>