zouyu
2023-11-13 ba296fa0cc7711ea745564bda80b2d1d8a3a09f0
	modified:   src/views/basic/param/index.vue
modified: src/views/common/param-mergeTemplate.vue
已修改2个文件
35 ■■■■ 文件已修改
src/views/basic/param/index.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/param-mergeTemplate.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/param/index.vue
@@ -178,25 +178,10 @@
    this.getParamType()
    this.rowSort()
    this.rowCalc()
    this.loading = false
  },
  // beforeUpdate() {
  //   console.log("updated");
  //   this.rowSort()
  //   this.rowCalc()
  //   this.loading = false
  // },
  watch: {
    tableData:{
            handler(old,newval){
                this.loading = true
                // this.tableData=JSON.parse(JSON.stringify(this.tableTreeData))
                this.rowSort()
                this.rowCalc()
                this.loading = false
            },
            deep: true
        }
  beforeUpdate() {
    this.rowSort()
    this.rowCalc()
  },
  methods: {
    //下载模板
@@ -302,8 +287,6 @@
      this.$refs.crud.rowDel(row, index)
    },
    updateParam(row, index, done, loading) {
      // console.log(row);
      // this.formDisabled = true
      let data = {
        dict: '',
        id: '',
@@ -331,8 +314,6 @@
      })[0]
      data.type=type.value
      }
      // console.log(data);
      // return
      putObj(data).then(res => {
        if (res.data.data.code == 0) {
          this.$message.success("更新成功")
@@ -385,7 +366,6 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      console.log("1111",row);
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(row == null ? null : row.id)
@@ -404,7 +384,9 @@
        this.tableData = res.data.data.records
        this.page.total = res.data.data.total
        this.page.currentPage = res.data.data.records.pages
        this.loading = false
      })
    },
    //动态合并方法
    rowCalc() {
src/views/common/param-mergeTemplate.vue
@@ -3,7 +3,7 @@
        <avue-crud 
        ref="crud" 
        class="l-mes" 
        rowKey="oneId"
        rowKey="id"
        :data="tableData" 
        :option="option" 
        :span-method="spanMethod"
@@ -190,7 +190,7 @@
        this.rowCalc()
        setTimeout(()=>{
            this.loading = false
        },3000)
        },1000)
    },
    data(){
        return {
@@ -278,6 +278,9 @@
</script>
<style>
.avue-crud_menu{
    display: none;
}
.avue-crud .el-table th {
    word-break: break-word;
    color: rgba(102,102,102,1);