Commit 2faa230e authored by tianhongyang's avatar tianhongyang

fix bug

parent 784433ae
......@@ -572,6 +572,7 @@ export async function elementMessageSingleton(type = "success", messgage = "") {
* @returns
*/
export function hasDuplicates(arr, mapKey = null) {
try {
const map = new Map();
for (const item of arr) {
const key = mapKey ? item[mapKey] : JSON.stringify(item);
......@@ -580,7 +581,10 @@ export function hasDuplicates(arr, mapKey = null) {
}
map.set(key, true);
}
return { hasRepeat: false, repeatKey: key };
return { hasRepeat: false };
} catch (error) {
console.log(error);
}
}
// 甲方详情左侧菜单映射
......
......@@ -379,11 +379,10 @@ export default {
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
const text = this.form.id ? "正在修改企业数据,请耐心等待" : "正在添加企业数据,请耐心等待";
const loading = this.$loading({
lock: true,
text: '数据处理中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
text,
});
this.form.startTime = this.form.dateRange[0];
this.form.expireTime = this.form.dateRange[1];
......
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