|
|
@@ -6,8 +6,8 @@
|
|
|
<span v-show="objId == null">设备台账-新增</span>
|
|
|
<span v-show="objId != null">设备台账-修改</span>
|
|
|
<div>
|
|
|
- <el-button type="warning" @click="" v-if="isDisabled.value">复位</el-button>
|
|
|
- <el-button type="primary" @click="submit()" v-if="isDisabled.value">保存</el-button>
|
|
|
+ <el-button type="warning" @click="inintdata" v-if="!isDisabled">复位</el-button>
|
|
|
+ <el-button type="primary" @click="submit" v-if="!isDisabled">保存</el-button>
|
|
|
<el-button type="primary" plain @click="router.back();">返回</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -342,7 +342,7 @@
|
|
|
<div class="card-header" >
|
|
|
<span>Mqtt分发</span>
|
|
|
<div>
|
|
|
- <el-button type="primary" plain @click="getnoListByDeviceId" v-if="isDisabled.value">添加</el-button>
|
|
|
+ <el-button type="primary" plain @click="getnoListByDeviceId" v-if="!isDisabled">添加</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -373,7 +373,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="操作" width="150">
|
|
|
<template #default="scope">
|
|
|
- <el-popconfirm title="确定解绑该设备?" @confirm="dellink(scope.row)" v-if="isDisabled.value">
|
|
|
+ <el-popconfirm title="确定解绑该设备?" @confirm="dellink(scope.row)" v-if="isDisabled">
|
|
|
<template #reference>
|
|
|
<el-button link><el-tooltip effect="dark" content="解绑设备"><el-icon>
|
|
|
<Delete />
|
|
|
@@ -430,8 +430,40 @@ const router = useRouter();
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
-const isDisabled = ref(true)
|
|
|
+const isDisabled = ref(true);
|
|
|
|
|
|
+
|
|
|
+const inintdata = () => {
|
|
|
+ var id = queryParams.value.id;
|
|
|
+ queryParams.value = ({
|
|
|
+ id: id,
|
|
|
+ equipmentTreeId: "",
|
|
|
+ sn: "",
|
|
|
+ spareSn: "",
|
|
|
+ name: "",
|
|
|
+ equipmentInfoId: "",
|
|
|
+ deptId: "",
|
|
|
+ deptName: "",
|
|
|
+ equipmentTypeId: "",
|
|
|
+ personInCharge: "",
|
|
|
+ installationDate: "",
|
|
|
+ address: "",
|
|
|
+ gatewayId: "",
|
|
|
+ tagids: "",
|
|
|
+ status: "",
|
|
|
+ endOfWarrantyPeriod: "",
|
|
|
+ manufacturingDate: "",
|
|
|
+ assetNo: "",
|
|
|
+ serialNumber: "",
|
|
|
+ useCertificateNo: "",
|
|
|
+ securityLevel: "",
|
|
|
+ usefulLife: "",
|
|
|
+ changeDate: "",
|
|
|
+ supplier: "",
|
|
|
+ dialogFormVisible: true,
|
|
|
+})
|
|
|
+
|
|
|
+}
|
|
|
const queryParams = ref({
|
|
|
id: null,
|
|
|
equipmentTreeId: "",
|
|
|
@@ -464,11 +496,18 @@ const tagidArry = ref([])
|
|
|
|
|
|
const listSelectId = ref([])
|
|
|
const mqttSelect = ref([])
|
|
|
+ let objId = route.query.id
|
|
|
+try {
|
|
|
|
|
|
-let objId = route.query.id
|
|
|
console.log(objId);
|
|
|
-isDisabled.value = route.query.isEdit
|
|
|
+
|
|
|
+isDisabled.value = route.query.isEdit ?? false;
|
|
|
+
|
|
|
console.log(isDisabled.value)
|
|
|
+} catch (error) {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
// queryParams.value = router.params;
|
|
|
|
|
|
const equipmentObj = ref({
|