Commit 67d6f8bd authored by 张海景's avatar 张海景

update:修改排版和修复表格触发两次问题

parent 8d5443d2
......@@ -24,7 +24,7 @@
<u-form-item name="allowProduce" label-width="80px" label="当前可加工">
<uni-data-checkbox v-model="tableParams.allowProduce" @change="getTaskList" :localdata="allowProduceLocal"></uni-data-checkbox>
</u-form-item>
<u-form-item name="allowProduce" label-width="10px" >
<u-form-item name="allowProduce" >
<u-button @click="getTaskList" type="primary" size="medium">搜索</u-button>
</u-form-item>
</u-form>
......@@ -1020,8 +1020,7 @@ userTempVisible: false,
{
success:(res)=> {
console.log(res, 'res')
this.tableParams.arrangeCode = res.result
this.getTaskList()
this.getTaskList({arrangeCode: res.result})
},
fail: ()=> {
this.$u.toast('扫码失败,请重新扫描')
......@@ -1034,8 +1033,7 @@ userTempVisible: false,
{
success:(res)=> {
console.log(res, 'res')
this.tableParams.workorderCode = res.result
this.getTaskList()
this.getTaskList({workorderCode: res.result})
},
fail: ()=> {
this.$u.toast('扫码失败,请重新扫描')
......@@ -1051,7 +1049,7 @@ userTempVisible: false,
},
// 判断是否显示红色
isTrClassStyle(row, i) {
console.log(row, i, 999)
// console.log(row, i, 999)
var oDate1 = new Date();
var oDate2 = new Date(row.scheduleEndDate);
if(oDate1.getTime() > oDate2.getTime()){
......@@ -1302,14 +1300,20 @@ userTempVisible: false,
});
},
getTaskList() {
getTaskList(params) {
this.form = {};
const t = this;
console.log(this.tableParams, 'this.tableParams')
this.tableData= []
console.log({
workunitId: t.vuex_workunit.workunitId,
...this.tableParams,
...params
}, 'this.tableParams')
this.$u.api
.getTaskList({
workunitId: t.vuex_workunit.workunitId,
...this.tableParams
...this.tableParams,
...params
})
.then((res) => {
if (res.code === 200) {
......
......@@ -710,6 +710,7 @@ export default {
checkedAll: false,
completeLoading: false,
aliTime: null,
isDisable: false
}
},
created() {
......@@ -810,9 +811,15 @@ export default {
this.currentRow = {}
},
cellClick(row, index, column) {
this.$emit('cellClick', row, index, column)
this.isDisable = true
setTimeout(() => {
this.isDisable = false
console.log(row, index, 'rows')
this.$emit('cellClick', row, index, column)
}, 500);
},
toggleRowSelection(row) {
// console.log(row, 'rows99')
const items = this.selectArr.find(v => v[this.rowKey] === row[this.rowKey])
if (items&&Object.keys(items).length > 0) {
this.data.forEach(item => {
......@@ -837,12 +844,16 @@ export default {
}
},
rowClick(row, index) {
if (this.highlight) {
this.currentRowIndex = index
this.currentRow = row
this.$emit('currentChange', row, index)
}
this.$emit('rowClick', row, index)
this.isDisable = true
setTimeout(() => {
this.isDisable = false
if (this.highlight) {
this.currentRowIndex = index
this.currentRow = row
this.$emit('currentChange', row, index)
}
this.$emit('rowClick', row, index)
}, 500);
},
checkboxSelectedAll(e) {
this.indeterminate = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment