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

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

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