Browse Source

表查询的修改:全查;
字段备注的字段名修改

lrf 3 years ago
parent
commit
cd4dd3027b
2 changed files with 5 additions and 6 deletions
  1. 2 2
      src/views/project/column.vue
  2. 3 4
      src/views/project/table.vue

+ 2 - 2
src/views/project/column.vue

@@ -34,7 +34,7 @@
       </el-table-column>
       <el-table-column align="center" label="描述">
         <template #default="{ row }">
-          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2 }" v-model="row.desc"></el-input>
+          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2 }" v-model="row.remark"></el-input>
         </template>
       </el-table-column>
 
@@ -76,7 +76,7 @@ export default defineComponent({
   },
   methods: {
     toAdd() {
-      this.$emit('update:value', [...this.value, { required: false }]);
+      this.$emit('update:value', [...this.value, { index: false, required: false }]);
     },
     async init() {
       const arr = ['columnType', 'required'];

+ 3 - 4
src/views/project/table.vue

@@ -84,8 +84,8 @@ export default defineComponent({
     };
   },
   methods: {
-    async toSearch({ skip = 0, limit = 10, ...condition } = {}) {
-      await this.query({ skip, limit, ...condition, project: _.get(this.project, 'id') });
+    async toSearch({ ...condition } = {}) {
+      await this.query({ ...condition, project: _.get(this.project, 'id') });
     },
     async toEdit(id) {
       if (!id) {
@@ -178,7 +178,6 @@ export default defineComponent({
       }
       for (const column of columns) {
         const { title } = column;
-        console.log(title, reg.test(title));
         if (reg.test(title)) {
           result.message = `字段中不能包含非 '_' 以外的特殊符号.${title}验证失败`;
           result.result = false;
@@ -191,7 +190,7 @@ export default defineComponent({
   watch: {
     project: {
       handler(val, oval) {
-        if (_.get(val, 'id')) this.toSearch({ skip: 0, limit: 10 });
+        if (_.get(val, 'id')) this.toSearch();
       },
       deep: true,
     },