Browse Source

删除材质名称

木星 3 months ago
parent
commit
e2ac37d0a8
1 changed files with 3 additions and 25 deletions
  1. 3 25
      src/views/Material/MaterialMange.vue

+ 3 - 25
src/views/Material/MaterialMange.vue

@@ -72,10 +72,6 @@ const columns = reactive<TableColumn[]>([
72
     type: 'index'
72
     type: 'index'
73
   },
73
   },
74
   {
74
   {
75
-    field: 'materialName',
76
-    label: '材质名称'
77
-  },
78
-  {
79
     field: 'icon',
75
     field: 'icon',
80
     label: '图标'
76
     label: '图标'
81
   },
77
   },
@@ -132,23 +128,6 @@ const { getElFormExpose, getFormData } = formMethods
132
 
128
 
133
 const schema = reactive<FormSchema[]>([
129
 const schema = reactive<FormSchema[]>([
134
   {
130
   {
135
-    field: 'materialName',
136
-    label: '材质名称',
137
-    component: 'Input',
138
-    colProps: {
139
-      span: 24
140
-    },
141
-    componentProps: {
142
-      style: {
143
-        width: '100%'
144
-      },
145
-      placeholder: '请输入材质名称'
146
-    },
147
-    formItemProps: {
148
-      rules: [required()]
149
-    }
150
-  },
151
-  {
152
     field: 'materialIcon',
131
     field: 'materialIcon',
153
     component: 'Upload',
132
     component: 'Upload',
154
     colProps: {
133
     colProps: {
@@ -232,7 +211,7 @@ const schema = reactive<FormSchema[]>([
232
       },
211
       },
233
       slots: {
212
       slots: {
234
         default: () => <BaseButton type="primary">点击上传</BaseButton>,
213
         default: () => <BaseButton type="primary">点击上传</BaseButton>,
235
-        tip: () => <div class="el-upload__tip">文件类型:RAR\ZIP</div>
214
+        tip: () => <div class="el-upload__tip">文件类型:JSON</div>
236
       }
215
       }
237
     }
216
     }
238
   }
217
   }
@@ -291,14 +270,13 @@ const edittab = async (data: TableSlotDefault) => {
291
   dialogVisible.value = true
270
   dialogVisible.value = true
292
   const formRef = await getElFormExpose()
271
   const formRef = await getElFormExpose()
293
   const formData = await getFormData()
272
   const formData = await getFormData()
294
-  formData.materialName = data.row.materialName
295
   formData.compressFileName = data.row.compressFileName
273
   formData.compressFileName = data.row.compressFileName
296
   formData.jsonPath = data.row.jsonPath
274
   formData.jsonPath = data.row.jsonPath
297
 
275
 
298
   formData.materialIcon = data.row.materialIcon.replace(PATH_URL, '')
276
   formData.materialIcon = data.row.materialIcon.replace(PATH_URL, '')
299
   imageUrl.value = data.row.materialIcon
277
   imageUrl.value = data.row.materialIcon
300
   formData.materialId = data.row.materialId
278
   formData.materialId = data.row.materialId
301
-  schema[2].componentProps.fileList = [
279
+  schema[1].componentProps.fileList = [
302
     {
280
     {
303
       name: data.row.compressFileName,
281
       name: data.row.compressFileName,
304
       url: data.row.jsonPath
282
       url: data.row.jsonPath
@@ -374,7 +352,7 @@ const getSelections = async () => {
374
 const tianjia = async () => {
352
 const tianjia = async () => {
375
   imageUrl.value = ''
353
   imageUrl.value = ''
376
   isedit.value = '添加'
354
   isedit.value = '添加'
377
-  schema[2].componentProps.fileList = []
355
+  schema[1].componentProps.fileList = []
378
   dialogVisible.value = true
356
   dialogVisible.value = true
379
 }
357
 }
380
 const batchtianjia = async () => {
358
 const batchtianjia = async () => {