flx:修改设备新增
This commit is contained in:
parent
54e547a18f
commit
81f18f5f3d
@ -6,3 +6,11 @@
|
|||||||
[0929/090447.874:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
[0929/090447.874:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
[0929/090448.024:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
[0929/090448.024:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
[0929/090501.978:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
[0929/090501.978:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102708.924:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102709.538:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102709.919:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102717.919:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102845.212:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102845.248:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102846.198:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
[1014/102846.324:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
|
||||||
|
|||||||
@ -2,10 +2,19 @@
|
|||||||
<!-- 设备管理 -->
|
<!-- 设备管理 -->
|
||||||
<div class="fullHeight">
|
<div class="fullHeight">
|
||||||
<div class="searchBox whiteBlock">
|
<div class="searchBox whiteBlock">
|
||||||
<el-button type="warning" size="medium" plain @click="refresh">{{ $t('message.deviceManage.refresh') }}</el-button>
|
<el-button type="warning" size="medium" plain @click="refresh">{{
|
||||||
<el-button v-permission="{ key: 'add', menuPath: '/equipmentCenter/aiAnalysisDevManage' }" type="primary" size="medium" @click="add">{{
|
$t("message.deviceManage.refresh")
|
||||||
$t('message.deviceManage.add')
|
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
|
<el-button
|
||||||
|
v-permission="{
|
||||||
|
key: 'add',
|
||||||
|
menuPath: '/equipmentCenter/aiAnalysisDevManage',
|
||||||
|
}"
|
||||||
|
type="primary"
|
||||||
|
size="medium"
|
||||||
|
@click="add"
|
||||||
|
>{{ $t("message.deviceManage.add") }}</el-button
|
||||||
|
>
|
||||||
<!-- <span class="downloadBtn primaryText" @click="downloadFn">
|
<!-- <span class="downloadBtn primaryText" @click="downloadFn">
|
||||||
{{$t('message.deviceManage.protocolDownload')}}
|
{{$t('message.deviceManage.protocolDownload')}}
|
||||||
</span> -->
|
</span> -->
|
||||||
@ -20,7 +29,10 @@
|
|||||||
>
|
>
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-radio-group @input="onAiInput" v-model="aiAlarmNeedManageApprove">
|
<el-radio-group
|
||||||
|
@input="onAiInput"
|
||||||
|
v-model="aiAlarmNeedManageApprove"
|
||||||
|
>
|
||||||
<el-radio :label="1">是</el-radio>
|
<el-radio :label="1">是</el-radio>
|
||||||
<el-radio :label="0">否</el-radio>
|
<el-radio :label="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -28,38 +40,87 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="table_wrap whiteBlock">
|
<div class="table_wrap whiteBlock">
|
||||||
<el-table class="tables" :data="List">
|
<el-table class="tables" :data="List">
|
||||||
<el-table-column prop="hardwareName" align="center" :label="$t('message.deviceManage.devName')"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column prop="hardwareId" :label="$t('message.deviceManage.devSn')" align="center"></el-table-column>
|
prop="hardwareName"
|
||||||
<el-table-column prop="ip" label="设备ip" align="center"></el-table-column>
|
align="center"
|
||||||
<el-table-column prop="enterpriseName" label="分包单位" align="center">
|
:label="$t('message.deviceManage.devName')"
|
||||||
<template slot-scope="scope">{{ scope.row.enterpriseName || '-' }}</template>
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="hardwareId"
|
||||||
|
:label="$t('message.deviceManage.devSn')"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="ip"
|
||||||
|
label="设备ip"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="enterpriseName"
|
||||||
|
label="分包单位"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.enterpriseName || "-"
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="deviceState" label="在线状态" align="center">
|
<el-table-column
|
||||||
<template slot-scope="scope">{{ scope.row.deviceState == '1' ? '在线' : '离线' }}</template>
|
prop="deviceState"
|
||||||
|
label="在线状态"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.deviceState == "1" ? "在线" : "离线"
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="isClosed" :label="$t('message.deviceManage.isClosed')" align="center">
|
<!-- <el-table-column prop="isClosed" :label="$t('message.deviceManage.isClosed')" align="center">
|
||||||
<template slot-scope="scope">{{$t('message.deviceManage.isClosedArr')[scope.row.isClosed-1]}}</template>
|
<template slot-scope="scope">{{$t('message.deviceManage.isClosedArr')[scope.row.isClosed-1]}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="realTime" :width="$fontSize(200)" :label="$t('message.deviceManage.createTime')"
|
<el-table-column prop="realTime" :width="$fontSize(200)" :label="$t('message.deviceManage.createTime')"
|
||||||
align="center"></el-table-column> -->
|
align="center"></el-table-column> -->
|
||||||
<el-table-column :label="$t('message.deviceManage.operation')" align="center">
|
<el-table-column
|
||||||
|
:label="$t('message.deviceManage.operation')"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="tableBtns">
|
<div class="tableBtns">
|
||||||
<!--<div @click="yu(scope.row)" class="operationText"><img src="@/assets/images/yu.png" alt="">{{$t('message.alarmValueSet.yjz')}}
|
<!--<div @click="yu(scope.row)" class="operationText"><img src="@/assets/images/yu.png" alt="">{{$t('message.alarmValueSet.yjz')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="bao(scope.row)" class="operationText"><img src="@/assets/images/bao.png" alt="">{{$t('message.alarmValueSet.bjz')}}
|
<div @click="bao(scope.row)" class="operationText"><img src="@/assets/images/bao.png" alt="">{{$t('message.alarmValueSet.bjz')}}
|
||||||
</div>-->
|
</div>-->
|
||||||
<div v-permission="{ key: 'edit', menuPath: '/equipmentCenter/aiAnalysisDevManage' }" @click="edit(scope.row)" class="operationText">
|
<div
|
||||||
<img src="@/assets/images/icon-edit.png" class="w_15 h_15" />
|
v-permission="{
|
||||||
<span>{{ $t('message.deviceManage.edit') }}</span>
|
key: 'edit',
|
||||||
|
menuPath:
|
||||||
|
'/equipmentCenter/aiAnalysisDevManage',
|
||||||
|
}"
|
||||||
|
@click="edit(scope.row)"
|
||||||
|
class="operationText"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="@/assets/images/icon-edit.png"
|
||||||
|
class="w_15 h_15"
|
||||||
|
/>
|
||||||
|
<span>{{
|
||||||
|
$t("message.deviceManage.edit")
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-permission="{ key: 'delete', menuPath: '/equipmentCenter/aiAnalysisDevManage' }"
|
v-permission="{
|
||||||
|
key: 'delete',
|
||||||
|
menuPath:
|
||||||
|
'/equipmentCenter/aiAnalysisDevManage',
|
||||||
|
}"
|
||||||
@click="deleteDev(scope.row)"
|
@click="deleteDev(scope.row)"
|
||||||
class="operationText"
|
class="operationText"
|
||||||
>
|
>
|
||||||
<img src="@/assets/images/icon-delete.png" class="w_15 h_15" />
|
<img
|
||||||
<span>{{ $t('message.deviceManage.delete') }}</span>
|
src="@/assets/images/icon-delete.png"
|
||||||
|
class="w_15 h_15"
|
||||||
|
/>
|
||||||
|
<span>{{
|
||||||
|
$t("message.deviceManage.delete")
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -70,7 +131,11 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
@close="close"
|
@close="close"
|
||||||
:modal-append-to-body="false"
|
:modal-append-to-body="false"
|
||||||
:title="Popup.type === 'add' ? $t('message.deviceManage.add') : $t('message.deviceManage.edit')"
|
:title="
|
||||||
|
Popup.type === 'add'
|
||||||
|
? $t('message.deviceManage.add')
|
||||||
|
: $t('message.deviceManage.edit')
|
||||||
|
"
|
||||||
:visible.sync="Popup.show"
|
:visible.sync="Popup.show"
|
||||||
class="dialog_w667"
|
class="dialog_w667"
|
||||||
>
|
>
|
||||||
@ -84,19 +149,43 @@
|
|||||||
:label-width="$px2rem(120)"
|
:label-width="$px2rem(120)"
|
||||||
class="dialogFormBox"
|
class="dialogFormBox"
|
||||||
>
|
>
|
||||||
<el-form-item :label="$t('message.deviceManage.devName')" prop="hardwareName">
|
<el-form-item
|
||||||
<el-input v-model="addEditForm.hardwareName" :placeholder="$t('message.deviceManage.placeholder')"></el-input>
|
:label="$t('message.deviceManage.devName')"
|
||||||
|
prop="hardwareName"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="addEditForm.hardwareName"
|
||||||
|
:placeholder="
|
||||||
|
$t('message.deviceManage.placeholder')
|
||||||
|
"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('message.deviceManage.devSn')" prop="hardwareId">
|
<el-form-item
|
||||||
|
:label="$t('message.deviceManage.devSn')"
|
||||||
|
prop="hardwareId"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addEditForm.hardwareId"
|
v-model="addEditForm.hardwareId"
|
||||||
:disabled="Popup.type === 'edit'"
|
:disabled="Popup.type === 'edit'"
|
||||||
:placeholder="$t('message.deviceManage.placeholder')"
|
:placeholder="
|
||||||
|
$t('message.deviceManage.placeholder')
|
||||||
|
"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="分包单位" prop="enterpriseIds">
|
<el-form-item label="分包单位" prop="enterpriseIds">
|
||||||
<el-select v-model="addEditForm.enterpriseIds" multiple filterable placeholder="请选择企业">
|
<el-select
|
||||||
<el-option :label="item.enterpriseName" :value="item.id" v-for="(item, index) in enterpriseList" :key="index"> </el-option>
|
v-model="addEditForm.enterpriseIds"
|
||||||
|
multiple
|
||||||
|
filterable
|
||||||
|
placeholder="请选择企业"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
:label="item.enterpriseName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="(item, index) in enterpriseList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item :label="'锁厂家'">
|
<!-- <el-form-item :label="'锁厂家'">
|
||||||
@ -118,10 +207,20 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button class="cancleBtn" @click="Popup.show = false" icon="el-icon-circle-close" size="medium"
|
<el-button
|
||||||
>{{ $t('message.deviceManage.cancel') }}
|
class="cancleBtn"
|
||||||
|
@click="Popup.show = false"
|
||||||
|
icon="el-icon-circle-close"
|
||||||
|
size="medium"
|
||||||
|
>{{ $t("message.deviceManage.cancel") }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-circle-check"
|
||||||
|
@click="submit"
|
||||||
|
size="medium"
|
||||||
|
>{{ $t("message.deviceManage.save") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium">{{ $t('message.deviceManage.save') }} </el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -135,10 +234,10 @@ import {
|
|||||||
aiAnalyseHardWareRecordDelete,
|
aiAnalyseHardWareRecordDelete,
|
||||||
aiAnalyseHardWareRecordList,
|
aiAnalyseHardWareRecordList,
|
||||||
aiProjectUpdateBySn,
|
aiProjectUpdateBySn,
|
||||||
aiProjectGetBySn
|
aiProjectGetBySn,
|
||||||
} from '@/assets/js/api/equipmentCenter/electricBox';
|
} from "@/assets/js/api/equipmentCenter/electricBox";
|
||||||
import { getEnterpriseInfoListApi } from '@/assets/js/api/specialWork';
|
import { getEnterpriseInfoListApi } from "@/assets/js/api/specialWork";
|
||||||
import { getProjectChilderSystemUserListApi } from '@/assets/js/api/configManage';
|
import { getProjectChilderSystemUserListApi } from "@/assets/js/api/configManage";
|
||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getEnterpriseList();
|
this.getEnterpriseList();
|
||||||
@ -149,23 +248,35 @@ export default {
|
|||||||
return {
|
return {
|
||||||
enterpriseList: [],
|
enterpriseList: [],
|
||||||
props: {
|
props: {
|
||||||
multiple: true
|
multiple: true,
|
||||||
},
|
},
|
||||||
addEditRules: {
|
addEditRules: {
|
||||||
hardwareName: [
|
hardwareName: [
|
||||||
{ required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: 'blur' },
|
{
|
||||||
{ required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: 'change' }
|
required: true,
|
||||||
|
message: this.$t("message.deviceManage.rules.devName"),
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("message.deviceManage.rules.devName"),
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
hardwareId: [
|
hardwareId: [
|
||||||
{ required: true, message: this.$t('message.deviceManage.message1'), trigger: 'blur' } // 请输入设备编号
|
{
|
||||||
]
|
required: true,
|
||||||
|
message: this.$t("message.deviceManage.message1"),
|
||||||
|
trigger: "blur",
|
||||||
|
}, // 请输入设备编号
|
||||||
|
],
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
/*{realName: "曾祥万", value: 1},
|
/*{realName: "曾祥万", value: 1},
|
||||||
{realName: "李先生", value: 2},*/
|
{realName: "李先生", value: 2},*/
|
||||||
],
|
],
|
||||||
addEditForm: {
|
addEditForm: {
|
||||||
enterpriseIds: []
|
enterpriseIds: [],
|
||||||
},
|
},
|
||||||
List: [
|
List: [
|
||||||
/*{
|
/*{
|
||||||
@ -178,9 +289,9 @@ export default {
|
|||||||
],
|
],
|
||||||
aiAlarmNeedManageApprove: 0,
|
aiAlarmNeedManageApprove: 0,
|
||||||
Popup: {
|
Popup: {
|
||||||
type: 'add',
|
type: "add",
|
||||||
show: false
|
show: false,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -193,79 +304,101 @@ export default {
|
|||||||
projectSn: this.$store.state.projectSn,
|
projectSn: this.$store.state.projectSn,
|
||||||
enterpriseName: undefined,
|
enterpriseName: undefined,
|
||||||
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
|
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
|
||||||
enterpriseTypeId: undefined
|
enterpriseTypeId: undefined,
|
||||||
};
|
};
|
||||||
getEnterpriseInfoListApi(params).then(res => {
|
getEnterpriseInfoListApi(params).then((res) => {
|
||||||
console.log('查询企业列表: ', res);
|
console.log("查询企业列表: ", res);
|
||||||
this.enterpriseList = res.result;
|
this.enterpriseList = res.result;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
downloadFn() {
|
downloadFn() {
|
||||||
// AI识别对接协议
|
// AI识别对接协议
|
||||||
window.open('/doc/' + this.$t('message.deviceManage.aiAgreement') + '.docx');
|
window.open(
|
||||||
|
"/doc/" + this.$t("message.deviceManage.aiAgreement") + ".docx"
|
||||||
|
);
|
||||||
},
|
},
|
||||||
handle(type, show) {
|
handle(type, show) {
|
||||||
//打开弹窗前的统一处理
|
//打开弹窗前的统一处理
|
||||||
this.Popup = {
|
this.Popup = {
|
||||||
type: type,
|
type: type,
|
||||||
show: show
|
show: show,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
Change() {},
|
Change() {},
|
||||||
add() {
|
add() {
|
||||||
this.handle('add', true);
|
this.addEditForm.enterpriseIds = [];
|
||||||
|
this.handle("add", true);
|
||||||
},
|
},
|
||||||
edit(obj) {
|
edit(obj) {
|
||||||
console.log('编辑', obj);
|
console.log("编辑", obj);
|
||||||
this.addEditForm = JSON.parse(JSON.stringify(obj));
|
this.addEditForm = JSON.parse(JSON.stringify(obj));
|
||||||
if (typeof obj.alarmPushWorkerId === 'string' && obj.alarmPushWorkerId != '') {
|
if (
|
||||||
this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId.split(',').map(Number);
|
typeof obj.alarmPushWorkerId === "string" &&
|
||||||
|
obj.alarmPushWorkerId != ""
|
||||||
|
) {
|
||||||
|
this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId
|
||||||
|
.split(",")
|
||||||
|
.map(Number);
|
||||||
}
|
}
|
||||||
this.addEditForm.enterpriseIds = obj.enterpriseIds ? obj.enterpriseIds.split(',') : [];
|
this.addEditForm.enterpriseIds = obj.enterpriseIds
|
||||||
this.handle('edit', true);
|
? obj.enterpriseIds.split(",")
|
||||||
|
: [];
|
||||||
|
this.handle("edit", true);
|
||||||
},
|
},
|
||||||
deleteDev(obj) {
|
deleteDev(obj) {
|
||||||
console.log('删除', obj);
|
console.log("删除", obj);
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
this.$t('message.personnelPosition.beaconManage.table.confirmText') + '【' + obj.hardwareName + '】?',
|
this.$t(
|
||||||
this.$t('message.personnelPosition.beaconManage.table.Tips'),
|
"message.personnelPosition.beaconManage.table.confirmText"
|
||||||
|
) +
|
||||||
|
"【" +
|
||||||
|
obj.hardwareName +
|
||||||
|
"】?",
|
||||||
|
this.$t("message.personnelPosition.beaconManage.table.Tips"),
|
||||||
{
|
{
|
||||||
confirmButtonText: this.$t('message.personnelPosition.confirmButtonText'),
|
confirmButtonText: this.$t(
|
||||||
cancelButtonText: this.$t('message.personnelPosition.cancelButtonText'),
|
"message.personnelPosition.confirmButtonText"
|
||||||
type: 'warning'
|
),
|
||||||
|
cancelButtonText: this.$t(
|
||||||
|
"message.personnelPosition.cancelButtonText"
|
||||||
|
),
|
||||||
|
type: "warning",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
aiAnalyseHardWareRecordDelete({ id: obj.id }).then(result => {
|
aiAnalyseHardWareRecordDelete({ id: obj.id }).then(
|
||||||
|
(result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.$message.success(result.message);
|
this.$message.success(result.message);
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
let params = JSON.parse(JSON.stringify(this.addEditForm));
|
let params = JSON.parse(JSON.stringify(this.addEditForm));
|
||||||
if (this.addEditForm.alarmPushWorkerId) {
|
if (this.addEditForm.alarmPushWorkerId) {
|
||||||
params.alarmPushWorkerId = this.addEditForm.alarmPushWorkerId.join(',');
|
params.alarmPushWorkerId =
|
||||||
|
this.addEditForm.alarmPushWorkerId.join(",");
|
||||||
}
|
}
|
||||||
params.enterpriseIds = params.enterpriseIds.join(',');
|
params.enterpriseIds = params.enterpriseIds.join(",");
|
||||||
|
|
||||||
params.projectSn = this.$store.state.projectSn;
|
params.projectSn = this.$store.state.projectSn;
|
||||||
// params.lockFactory=1
|
// params.lockFactory=1
|
||||||
this.$refs.addEditForm.validate(valid => {
|
this.$refs.addEditForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.Popup.type === 'add') {
|
if (this.Popup.type === "add") {
|
||||||
aiAnalyseHardWareRecordAdd(params).then(result => {
|
aiAnalyseHardWareRecordAdd(params).then((result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.$message.success(result.message);
|
this.$message.success(result.message);
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (this.Popup.type === 'edit') {
|
} else if (this.Popup.type === "edit") {
|
||||||
console.log('编辑信息', this.addEditForm);
|
console.log("编辑信息", this.addEditForm);
|
||||||
aiAnalyseHardWareRecordEdit(params).then(result => {
|
aiAnalyseHardWareRecordEdit(params).then((result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.$message.success(result.message);
|
this.$message.success(result.message);
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -282,21 +415,26 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
aiProjectGetBySnInfo() {
|
aiProjectGetBySnInfo() {
|
||||||
aiProjectGetBySn({ projectSn: this.$store.state.projectSn }).then(result => {
|
aiProjectGetBySn({ projectSn: this.$store.state.projectSn }).then(
|
||||||
|
(result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
console.log('项目信息', result.result);
|
console.log("项目信息", result.result);
|
||||||
this.aiAlarmNeedManageApprove = result.result.aiAlarmNeedManageApprove ? result.result.aiAlarmNeedManageApprove : 0;
|
this.aiAlarmNeedManageApprove = result.result
|
||||||
|
.aiAlarmNeedManageApprove
|
||||||
|
? result.result.aiAlarmNeedManageApprove
|
||||||
|
: 0;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
onAiInput() {
|
onAiInput() {
|
||||||
console.log('111111');
|
console.log("111111");
|
||||||
aiProjectUpdateBySn({
|
aiProjectUpdateBySn({
|
||||||
projectSn: this.$store.state.projectSn,
|
projectSn: this.$store.state.projectSn,
|
||||||
aiAlarmNeedManageApprove: this.aiAlarmNeedManageApprove
|
aiAlarmNeedManageApprove: this.aiAlarmNeedManageApprove,
|
||||||
}).then(result => {
|
}).then((result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.$message.success('修改成功!');
|
this.$message.success("修改成功!");
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -304,18 +442,21 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
aiAnalyseHardWareRecordList({
|
aiAnalyseHardWareRecordList({
|
||||||
projectSn: this.$store.state.projectSn,
|
projectSn: this.$store.state.projectSn,
|
||||||
iAlarmNeedManageApprove: this.aiAlarmNeedManageApprove
|
iAlarmNeedManageApprove: this.aiAlarmNeedManageApprove,
|
||||||
}).then(result => {
|
}).then((result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.List = result.result;
|
this.List = result.result;
|
||||||
console.log('列表', result);
|
console.log("列表", result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getLaborManagementList() {
|
getLaborManagementList() {
|
||||||
getProjectChilderSystemUserListApi({ projectSn: this.$store.state.projectSn, workerName: '' }).then(result => {
|
getProjectChilderSystemUserListApi({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
workerName: "",
|
||||||
|
}).then((result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
console.log('施工人员', result);
|
console.log("施工人员", result);
|
||||||
this.options = result.result;
|
this.options = result.result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -323,8 +464,8 @@ export default {
|
|||||||
close() {
|
close() {
|
||||||
this.$refs.addEditForm.clearValidate();
|
this.$refs.addEditForm.clearValidate();
|
||||||
this.addEditForm = {};
|
this.addEditForm = {};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user