田源
2023-06-30 0f519667314c451c4267ba5d6c074ab91e5f2706
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -247,6 +247,7 @@
      <el-table-column v-for="item in this.option.column" :key="item.id"
                       :label="item.label"
                       :prop="item.prop"
                       :formatter="formAttr"
                       :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
                       :show-overflow-tooltip="true"
                       align="center"
@@ -254,6 +255,11 @@
        <template slot-scope="{ row }">
          <el-input v-if="editingRows === row && editShows== item.prop" v-model="row[item.prop]"
                    @blur="saveRows"></el-input>
          <el-switch
            v-if="item.label === 'true' || item.label === 'false'"
            active-color="#13ce66"
            inactive-color="#ff4949">
          </el-switch>
          <span v-else>{{ row[item.prop] }}</span>
        </template>
      </el-table-column>
@@ -1161,9 +1167,23 @@
  },
  methods: {
    formAttr(row, column) {
      console.log(row,column)
      // if (column.property === "keyAttrFlag"
      //   ||column.property === "queryAttrFlag"
      //   ||column.property === "seniorQueryAttrFlag"
      //   ||column.property === "sameRepeatAttrFlag"
      //   ||column.property === "requireFlag"
      //   ||column.property === "formDisplayFlag"
      //   ||column.property === "tableDisplayFlag"
      //   ||column.property === "sortAttrFlag") {
      //   return row[column.property] =='true'? "是" : "否";
      // }
      // return row[column.property];
    },
    //属性分组按钮
    attrVisibleHandle() {
      this.formatBoolean()
      if (this.CrudSelect.length > 1) {
        this.$message.warning('只能选择一条模板属性')
      } else if (this.CrudSelect < 1) {
@@ -1454,6 +1474,8 @@
}
</script>
<style scoped>
<style scoped lang="scss">
/deep/ .el-button {
  margin: 0 10px 10px 0;
}
</style>