diff --git a/src/views/processManagement/processCapability.vue b/src/views/processManagement/processCapability.vue index 2d0e6619..64be4d9e 100644 --- a/src/views/processManagement/processCapability.vue +++ b/src/views/processManagement/processCapability.vue @@ -187,9 +187,8 @@ export default { label: '编码', prop: 'caCode', search: true, - sortable: true, + sortable: 'custom', span: 12, - width: 80, rules: [ { required: true, @@ -202,7 +201,7 @@ export default { label: '名称', prop: 'caName', span: 12, - sortable: true, + sortable: 'custom', search: true, rules: [ { @@ -217,7 +216,7 @@ export default { // prop: "bpsId", // type:'select', // span:24, - // sortable: true, + // sortable: 'custom', // search: true, // dicUrl:"/api/blade-desk/BA/PlatingSmall/listForSelect", // props:{ @@ -237,7 +236,7 @@ export default { span: 12, prop: 'wxLimit', // bind: "bsWorkType.wtName", - sortable: true, + sortable: 'custom', search: true, type: 'select', filterable: true, @@ -262,6 +261,7 @@ export default { trigger: 'click', }, ], + width: 200, }, { label: '外协限制', @@ -273,6 +273,7 @@ export default { label: 'dictValue', value: 'dictKey', }, + width: 200, }, { label: '厂内比例(%)', @@ -292,6 +293,7 @@ export default { console.log('val==========', val); this.form.outRate = 100 - val.value; }, + width: 200, }, { label: '外协比例(%)', @@ -307,6 +309,7 @@ export default { trigger: 'change', }, ], + width: 200, }, { label: '局部镀订单面积(dm²)', @@ -315,11 +318,12 @@ export default { span: 24, controls: false, labelWidth: 140, + width: 200, }, { label: '修改时间', prop: 'updateTime', - sortable: true, + sortable: 'custom', search: true, searchRange: true, display: false, @@ -333,10 +337,11 @@ export default { { label: '修改时间', prop: 'updateTime', - sortable: true, + sortable: 'custom', search: false, display: false, type: 'date', + width: 200, }, ], }, @@ -584,19 +589,16 @@ export default { refreshChange() { this.onLoad(this.page, this.query); }, - // 排序 + // 排序 sortChange({ prop, order }) { - if (!prop) { - // 如果取消排序,清空排序参数 - this.query.orderByField = undefined; - this.query.isAsc = undefined; - } else { - const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); - this.query.orderByField = orderByField; - this.query.isAsc = order === 'ascending' ? true : false; - } - // 重新加载数据 - this.onLoad(); + this.query.descs = undefined; + this.query.ascs = undefined; + let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); + // // 重新加载数据 + this.onLoad(this.page, this.query); }, // 加载页面数据 onLoad(page, params = {}) {