|
|
@ -37,6 +37,47 @@ |
|
|
|
>删 除 |
|
|
|
>删 除 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template slot-scope="scope" slot="menuBtn"> |
|
|
|
|
|
|
|
<el-dropdown-item> |
|
|
|
|
|
|
|
<el-popconfirm |
|
|
|
|
|
|
|
confirm-button-text="确定" |
|
|
|
|
|
|
|
cancel-button-text="取消" |
|
|
|
|
|
|
|
@confirm="handleRealname(scope.row.id)" |
|
|
|
|
|
|
|
icon-color="red" |
|
|
|
|
|
|
|
title="您确认要同步实名吗?" |
|
|
|
|
|
|
|
placement="top" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="el-icon-refresh" slot="reference"> |
|
|
|
|
|
|
|
同步实名 |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-popconfirm> |
|
|
|
|
|
|
|
</el-dropdown-item> |
|
|
|
|
|
|
|
<el-dropdown-item> |
|
|
|
|
|
|
|
<el-popconfirm |
|
|
|
|
|
|
|
confirm-button-text="确定" |
|
|
|
|
|
|
|
cancel-button-text="取消" |
|
|
|
|
|
|
|
@confirm="handleSimStatus(scope.row.id, scope.row.lifecycleStatus)" |
|
|
|
|
|
|
|
icon-color="red" |
|
|
|
|
|
|
|
:title="scope.row.lifecycleStatus != 4?'您确认要停机吗?':'您确认要复机吗?'" |
|
|
|
|
|
|
|
placement="top" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
v-if="scope.row.lifecycleStatus != 4" |
|
|
|
|
|
|
|
class="el-icon-phone" |
|
|
|
|
|
|
|
slot="reference" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
申请停机 |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
v-if="scope.row.lifecycleStatus == 4" |
|
|
|
|
|
|
|
class="el-icon-phone-outline" |
|
|
|
|
|
|
|
slot="reference" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
申请复机 |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-popconfirm> |
|
|
|
|
|
|
|
</el-dropdown-item> |
|
|
|
|
|
|
|
</template> |
|
|
|
</avue-crud> |
|
|
|
</avue-crud> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 导出弹窗 --> |
|
|
|
<!-- 导出弹窗 --> |
|
|
@ -46,7 +87,6 @@ |
|
|
|
append-to-body |
|
|
|
append-to-body |
|
|
|
width="35%" |
|
|
|
width="35%" |
|
|
|
:before-close="handleClose" |
|
|
|
:before-close="handleClose" |
|
|
|
|
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<el-form |
|
|
|
<el-form |
|
|
|
ref="distribution" |
|
|
|
ref="distribution" |
|
|
@ -69,7 +109,7 @@ |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="导出类型" prop="exportType"> |
|
|
|
<el-form-item label="导出类型" prop="exportType"> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
v-model="distribution.exportType" |
|
|
|
v-model="distribution.exportType" |
|
|
|
placeholder="请选择客户" |
|
|
|
placeholder="请选择客户" |
|
|
@ -129,7 +169,9 @@ import { |
|
|
|
update, |
|
|
|
update, |
|
|
|
tenant, |
|
|
|
tenant, |
|
|
|
user, |
|
|
|
user, |
|
|
|
exporttype |
|
|
|
exporttype, |
|
|
|
|
|
|
|
syncRealNameStatus, |
|
|
|
|
|
|
|
updateSimStatus, |
|
|
|
} from "@/api/communication/outbound"; |
|
|
|
} from "@/api/communication/outbound"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import { getToken } from "@/util/auth"; |
|
|
|
import { getToken } from "@/util/auth"; |
|
|
@ -137,10 +179,7 @@ export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
var reg = /[A-Za-z]/i; |
|
|
|
var reg = /[A-Za-z]/i; |
|
|
|
var starts = (rule, value, callback) => { |
|
|
|
var starts = (rule, value, callback) => { |
|
|
|
if ( |
|
|
|
if (this.distribution.numEnd == "" || this.distribution.numStart == "") { |
|
|
|
this.distribution.numEnd == "" || |
|
|
|
|
|
|
|
this.distribution.numStart == "" |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
callback(new Error("开始号码结束号码均不能为空")); |
|
|
|
callback(new Error("开始号码结束号码均不能为空")); |
|
|
|
} else if ( |
|
|
|
} else if ( |
|
|
|
this.distribution.numEnd < 0 || |
|
|
|
this.distribution.numEnd < 0 || |
|
|
@ -151,11 +190,12 @@ export default { |
|
|
|
Number(this.distribution.numStart) > Number(this.distribution.numEnd) |
|
|
|
Number(this.distribution.numStart) > Number(this.distribution.numEnd) |
|
|
|
) { |
|
|
|
) { |
|
|
|
callback(new Error("开始号码必须小于结束号码")); |
|
|
|
callback(new Error("开始号码必须小于结束号码")); |
|
|
|
}else if ( |
|
|
|
} else if ( |
|
|
|
reg.test(this.distribution.numStart) == true|| reg.test(this.distribution.numEnd) == true |
|
|
|
reg.test(this.distribution.numStart) == true || |
|
|
|
|
|
|
|
reg.test(this.distribution.numEnd) == true |
|
|
|
) { |
|
|
|
) { |
|
|
|
callback(new Error("开始结束号码中包含字母,请选择其他导出类型")); |
|
|
|
callback(new Error("开始结束号码中包含字母,请选择其他导出类型")); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
callback(); |
|
|
|
callback(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -167,6 +207,7 @@ export default { |
|
|
|
tenantId: null, //租户 |
|
|
|
tenantId: null, //租户 |
|
|
|
userId: null, //客户 |
|
|
|
userId: null, //客户 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
status: "", |
|
|
|
dialogVisible: false, //分拨弹窗布尔 |
|
|
|
dialogVisible: false, //分拨弹窗布尔 |
|
|
|
selectionList: [], |
|
|
|
selectionList: [], |
|
|
|
tenantlist: [], //租户下拉 |
|
|
|
tenantlist: [], //租户下拉 |
|
|
@ -177,7 +218,7 @@ export default { |
|
|
|
tenantId: "", //租户id |
|
|
|
tenantId: "", //租户id |
|
|
|
numStart: "", //开始号码 |
|
|
|
numStart: "", //开始号码 |
|
|
|
numEnd: "", //结束号码 |
|
|
|
numEnd: "", //结束号码 |
|
|
|
exportType:"",//导出类型 |
|
|
|
exportType: "", //导出类型 |
|
|
|
}, |
|
|
|
}, |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
distrules: { |
|
|
|
distrules: { |
|
|
@ -185,7 +226,7 @@ export default { |
|
|
|
{ required: true, message: "请选择客户", trigger: "change" }, |
|
|
|
{ required: true, message: "请选择客户", trigger: "change" }, |
|
|
|
], |
|
|
|
], |
|
|
|
numbers: [{ required: true, validator: starts, trigger: "blur" }], |
|
|
|
numbers: [{ required: true, validator: starts, trigger: "blur" }], |
|
|
|
exportType: [ |
|
|
|
exportType: [ |
|
|
|
{ required: true, message: "请选择导出类型", trigger: "change" }, |
|
|
|
{ required: true, message: "请选择导出类型", trigger: "change" }, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
@ -209,14 +250,23 @@ export default { |
|
|
|
selection: true, |
|
|
|
selection: true, |
|
|
|
dialogClickModal: false, |
|
|
|
dialogClickModal: false, |
|
|
|
dialogWidth: "60%", |
|
|
|
dialogWidth: "60%", |
|
|
|
|
|
|
|
menuType: "menu", |
|
|
|
|
|
|
|
menuWidth: "120", |
|
|
|
column: [ |
|
|
|
column: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "id", |
|
|
|
label: "主键id", |
|
|
|
prop: "id", |
|
|
|
prop: "id", |
|
|
|
search: true, |
|
|
|
width: 180, |
|
|
|
width:180, |
|
|
|
|
|
|
|
addDisplay: false, |
|
|
|
addDisplay: false, |
|
|
|
editDisplay: false, |
|
|
|
editDisplay: false, |
|
|
|
|
|
|
|
search: true, |
|
|
|
|
|
|
|
rules: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入id", |
|
|
|
|
|
|
|
trigger: "blur", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "租户名称", |
|
|
|
label: "租户名称", |
|
|
@ -241,6 +291,13 @@ export default { |
|
|
|
prop: "userId", |
|
|
|
prop: "userId", |
|
|
|
type: "select", |
|
|
|
type: "select", |
|
|
|
dicUrl: "/api/iot-system/user/fillData", |
|
|
|
dicUrl: "/api/iot-system/user/fillData", |
|
|
|
|
|
|
|
formatter: (val, value, label) => { |
|
|
|
|
|
|
|
if (value == -1) { |
|
|
|
|
|
|
|
return "-"; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return `${label}`; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
label: "account", |
|
|
|
label: "account", |
|
|
|
value: "id", |
|
|
|
value: "id", |
|
|
@ -593,7 +650,7 @@ export default { |
|
|
|
created() { |
|
|
|
created() { |
|
|
|
this.tenantlists(); //租户下拉 |
|
|
|
this.tenantlists(); //租户下拉 |
|
|
|
this.userlists(); //用户下拉 |
|
|
|
this.userlists(); //用户下拉 |
|
|
|
this.exportTypelistlists(); //导出类型 |
|
|
|
this.exportTypelistlists(); //导出类型 |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
...mapGetters(["permission"]), |
|
|
|
...mapGetters(["permission"]), |
|
|
@ -636,7 +693,7 @@ export default { |
|
|
|
console.log(this.form); |
|
|
|
console.log(this.form); |
|
|
|
add(row).then( |
|
|
|
add(row).then( |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!", |
|
|
|
message: "操作成功!", |
|
|
@ -653,7 +710,7 @@ export default { |
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
update(row).then( |
|
|
|
update(row).then( |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!", |
|
|
|
message: "操作成功!", |
|
|
@ -677,7 +734,7 @@ export default { |
|
|
|
return remove(row.id); |
|
|
|
return remove(row.id); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!", |
|
|
|
message: "操作成功!", |
|
|
@ -699,7 +756,7 @@ export default { |
|
|
|
return remove(this.ids); |
|
|
|
return remove(this.ids); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!", |
|
|
|
message: "操作成功!", |
|
|
@ -769,7 +826,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//导出类型 |
|
|
|
//导出类型 |
|
|
|
exportTypelistlists() { |
|
|
|
exportTypelistlists() { |
|
|
|
exporttype().then((res) => { |
|
|
|
exporttype().then((res) => { |
|
|
|
if (res.data.code == 200) { |
|
|
|
if (res.data.code == 200) { |
|
|
@ -787,6 +844,40 @@ export default { |
|
|
|
this.iform.tenantId = null; |
|
|
|
this.iform.tenantId = null; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//同步实名 |
|
|
|
|
|
|
|
handleRealname(id) { |
|
|
|
|
|
|
|
syncRealNameStatus(id).then((res) => { |
|
|
|
|
|
|
|
console.log(res, 978); |
|
|
|
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
|
|
|
this.$message.success("同步成功"); |
|
|
|
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$message.error("同步失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//停机复机 |
|
|
|
|
|
|
|
handleSimStatus(id,type) { |
|
|
|
|
|
|
|
if (type == 4) { |
|
|
|
|
|
|
|
updateSimStatus({id:id,operType:1}).then((res) => { |
|
|
|
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
|
|
|
this.$message.success("复机成功"); |
|
|
|
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$message.error("复机失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
updateSimStatus({id:id,operType:0}).then((res) => { |
|
|
|
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
|
|
|
this.$message.success("停机成功"); |
|
|
|
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$message.error("停机失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
onLoad(page, params = {}) { |
|
|
|
onLoad(page, params = {}) { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
getList( |
|
|
|
getList( |
|
|
|