Commit 5edb945f by 潘际乾

任务列表的查询检验清除

parent a313c613
...@@ -398,6 +398,7 @@ export default { ...@@ -398,6 +398,7 @@ export default {
type: 'success' type: 'success'
}); });
} }
this.$refs.paramsForm.clearValidate();
Utils.positioningErrorMsg(res.fieldErrors, this.$refs.paramsForm.fields) Utils.positioningErrorMsg(res.fieldErrors, this.$refs.paramsForm.fields)
}, },
......
import Utils from "~/utils";
const state = { const state = {
operateFuns: {}, operateFuns: {},
}; };
...@@ -18,7 +20,7 @@ const actions = { ...@@ -18,7 +20,7 @@ const actions = {
setOperateFuns({ commit }, funs) { setOperateFuns({ commit }, funs) {
return new Promise(resolve => { return new Promise(resolve => {
// const id = Symbol("transaction-id"); // const id = Symbol("transaction-id");
const id = new Date().valueOf(); const id = Utils.generateUUID();
commit('ADD_OPERATE_FUN', { id, funs }) commit('ADD_OPERATE_FUN', { id, funs })
resolve(id) resolve(id)
}); });
......
...@@ -231,4 +231,18 @@ export default class Utils { ...@@ -231,4 +231,18 @@ export default class Utils {
} }
} }
} }
static generateUUID() {
var d = new Date().getTime();
if (window.performance && typeof window.performance.now === "function") {
d += performance.now(); //use high-precision timer if available
}
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
});
return uuid;
}
} }
\ No newline at end of file
...@@ -401,7 +401,7 @@ ...@@ -401,7 +401,7 @@
fixed="right" fixed="right"
prop="display" prop="display"
label="操作" label="操作"
width="150px" width="auto"
> >
<template slot="header"> <template slot="header">
<c-col :span="11" style="text-align:left"><span>操作</span></c-col> <c-col :span="11" style="text-align:left"><span>操作</span></c-col>
......
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