|  | @@ -3,7 +3,11 @@
 | 
	
		
			
				|  |  |      <div class="mb10 fx-row fx-end-cen">
 | 
	
		
			
				|  |  |        <el-button icon="el-icon-refresh" circle @click="handleQuery"></el-button>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  | -    <dynamic-table :rows="rows" :columns="columns"></dynamic-table>
 | 
	
		
			
				|  |  | +    <dynamic-table :rows="rows" :columns="columns">
 | 
	
		
			
				|  |  | +      <template #type="{display}">
 | 
	
		
			
				|  |  | +        {{ translateType(display) }}
 | 
	
		
			
				|  |  | +      </template>
 | 
	
		
			
				|  |  | +    </dynamic-table>
 | 
	
		
			
				|  |  |      <pagination v-if="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
 | 
	
		
			
				|  |  |                  @pagination="getList"></pagination>
 | 
	
		
			
				|  |  |    </el-card>
 | 
	
	
		
			
				|  | @@ -12,6 +16,7 @@
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import DynamicTable from '@/components/dynamic-table/index'
 | 
	
		
			
				|  |  |  import { getHomeworks } from '@/api/webApi/homework'
 | 
	
		
			
				|  |  | +import consts from '@/common/mx-const'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: 'paper-work-publish',
 | 
	
	
		
			
				|  | @@ -23,11 +28,11 @@ export default {
 | 
	
		
			
				|  |  |          pageSize: 20
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        columns: [
 | 
	
		
			
				|  |  | -        { prop: 'id', label: 'ID' },
 | 
	
		
			
				|  |  | -        { prop: 'type', label: '类型' },
 | 
	
		
			
				|  |  | +        { prop: 'id', label: 'ID', width: '80px' },
 | 
	
		
			
				|  |  | +        { prop: 'type', label: '类型', width: '120px', slotBody: 'type' },
 | 
	
		
			
				|  |  |          { prop: 'title', label: '标题' },
 | 
	
		
			
				|  |  | -        { prop: 'createTime', label: '创建时间' },
 | 
	
		
			
				|  |  | -        { prop: 'action', label: '操作' }],
 | 
	
		
			
				|  |  | +        { prop: 'createTime', label: '创建时间', width: '180px' },
 | 
	
		
			
				|  |  | +        { prop: 'action', label: '操作', width: '80px' }],
 | 
	
		
			
				|  |  |        rows: [],
 | 
	
		
			
				|  |  |        total: 0
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -44,6 +49,10 @@ export default {
 | 
	
		
			
				|  |  |        const res = await getHomeworks(this.queryParams)
 | 
	
		
			
				|  |  |        this.rows = res.rows || res.data
 | 
	
		
			
				|  |  |        this.total = res.total || this.rows.length
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    translateType(type) {
 | 
	
		
			
				|  |  | +      const enumType = consts.enum.homeworkTypes.find(t => t.value == type)
 | 
	
		
			
				|  |  | +      return enumType?.label || type
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 |