remove device shadow
This commit is contained in:
@ -120,13 +120,13 @@
|
|||||||
@selected="handleMapSelected"
|
@selected="handleMapSelected"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备影子" prop="isShadow">
|
<!-- <el-form-item label="设备影子" prop="isShadow">-->
|
||||||
<el-switch
|
<!-- <el-switch-->
|
||||||
v-model="form.isShadow"
|
<!-- v-model="form.isShadow"-->
|
||||||
:active-value="1"
|
<!-- :active-value="1"-->
|
||||||
:inactive-value="0"
|
<!-- :inactive-value="0"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="启用状态" prop="status">
|
<el-form-item label="启用状态" prop="status">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
@ -214,7 +214,7 @@ function reset() {
|
|||||||
firmwareVersion: null,
|
firmwareVersion: null,
|
||||||
status: null,
|
status: null,
|
||||||
rssi: null,
|
rssi: null,
|
||||||
isShadow: null,
|
// isShadow: null,
|
||||||
locationWay: null,
|
locationWay: null,
|
||||||
thingsModelValue: null,
|
thingsModelValue: null,
|
||||||
networkAddress: null,
|
networkAddress: null,
|
||||||
|
|||||||
@ -441,13 +441,13 @@
|
|||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- </el-row>-->
|
<!-- </el-row>-->
|
||||||
<el-form-item label="设备影子" prop="isShadow">
|
<!-- <el-form-item label="设备影子" prop="isShadow">-->
|
||||||
<el-switch
|
<!-- <el-switch-->
|
||||||
v-model="form.isShadow"
|
<!-- v-model="form.isShadow"-->
|
||||||
:active-value="1"
|
<!-- :active-value="1"-->
|
||||||
:inactive-value="0"
|
<!-- :inactive-value="0"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="启用状态" prop="status">
|
<el-form-item label="启用状态" prop="status">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
@ -530,7 +530,7 @@ const data = reactive({
|
|||||||
firmwareVersion: null,
|
firmwareVersion: null,
|
||||||
status: null,
|
status: null,
|
||||||
rssi: null,
|
rssi: null,
|
||||||
isShadow: null,
|
// isShadow: null,
|
||||||
locationWay: null,
|
locationWay: null,
|
||||||
thingsModelValue: null,
|
thingsModelValue: null,
|
||||||
networkAddress: null,
|
networkAddress: null,
|
||||||
@ -588,7 +588,7 @@ function reset() {
|
|||||||
firmwareVersion: null,
|
firmwareVersion: null,
|
||||||
status: null,
|
status: null,
|
||||||
rssi: null,
|
rssi: null,
|
||||||
isShadow: null,
|
// isShadow: null,
|
||||||
locationWay: null,
|
locationWay: null,
|
||||||
thingsModelValue: null,
|
thingsModelValue: null,
|
||||||
networkAddress: null,
|
networkAddress: null,
|
||||||
|
|||||||
@ -282,9 +282,9 @@
|
|||||||
<el-form-item label="mqtt账号" prop="mqttAccount">
|
<el-form-item label="mqtt账号" prop="mqttAccount">
|
||||||
<el-input v-model="form.mqttAccount" placeholder="请输入mqtt账号" />
|
<el-input v-model="form.mqttAccount" placeholder="请输入mqtt账号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="mqtt密码" prop="mqttPassword">-->
|
<!-- <el-form-item label="mqtt密码" prop="mqttPassword">-->
|
||||||
<!-- <el-input v-model="form.mqttPassword" placeholder="请输入mqtt密码" />-->
|
<!-- <el-input v-model="form.mqttPassword" placeholder="请输入mqtt密码" />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="产品秘钥" prop="mqttSecret">
|
<el-form-item label="产品秘钥" prop="mqttSecret">
|
||||||
<el-input v-model="form.mqttSecret" placeholder="请输入产品秘钥" />
|
<el-input v-model="form.mqttSecret" placeholder="请输入产品秘钥" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -320,7 +320,7 @@ import {
|
|||||||
addProduct,
|
addProduct,
|
||||||
delProduct,
|
delProduct,
|
||||||
listProduct,
|
listProduct,
|
||||||
updateProduct,
|
updateProduct
|
||||||
} from "@/api/product/product";
|
} from "@/api/product/product";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { deviceTypeDict, productStatusMap } from "@/constant/dict";
|
import { deviceTypeDict, productStatusMap } from "@/constant/dict";
|
||||||
@ -341,7 +341,6 @@ const single = ref(true);
|
|||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
const tenantOptions = ref([]);
|
|
||||||
const categoryOptions = ref([]); // 产品分类树形选择
|
const categoryOptions = ref([]); // 产品分类树形选择
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
@ -359,17 +358,17 @@ const data = reactive({
|
|||||||
thingsModelsJson: null,
|
thingsModelsJson: null,
|
||||||
deviceType: null,
|
deviceType: null,
|
||||||
vertificateMethod: null,
|
vertificateMethod: null,
|
||||||
imgUrl: null,
|
imgUrl: null
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
productName: [
|
productName: [
|
||||||
{ required: true, message: "产品名称不能为空", trigger: "blur" },
|
{ required: true, message: "产品名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
categoryId: [
|
categoryId: [
|
||||||
{ required: true, message: "产品分类ID不能为空", trigger: "blur" },
|
{ required: true, message: "产品分类ID不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
tenantId: [{ required: true, message: "租户ID不能为空", trigger: "blur" }],
|
tenantId: [{ required: true, message: "租户ID不能为空", trigger: "blur" }]
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
@ -423,7 +422,7 @@ function reset() {
|
|||||||
imgUrl: null,
|
imgUrl: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
remark: null,
|
remark: null
|
||||||
};
|
};
|
||||||
proxy.resetForm("productRef");
|
proxy.resetForm("productRef");
|
||||||
}
|
}
|
||||||
@ -453,7 +452,7 @@ function handleAdd() {
|
|||||||
// open.value = true;
|
// open.value = true;
|
||||||
// title.value = "添加产品";
|
// title.value = "添加产品";
|
||||||
router.push({
|
router.push({
|
||||||
path: "/produc/product/edit",
|
path: "/produc/product/edit"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,8 +462,8 @@ function handleUpdate(row) {
|
|||||||
router.push({
|
router.push({
|
||||||
path: "/produc/product/edit",
|
path: "/produc/product/edit",
|
||||||
query: {
|
query: {
|
||||||
productId: _productId,
|
productId: _productId
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
// getProduct(_productId).then(response => {
|
// getProduct(_productId).then(response => {
|
||||||
// form.value = response.data;
|
// form.value = response.data;
|
||||||
@ -480,8 +479,8 @@ const viewEditTab = (row, tab) => {
|
|||||||
query: {
|
query: {
|
||||||
productId: _productId,
|
productId: _productId,
|
||||||
// pageNum: queryParams.value.pageNum,
|
// pageNum: queryParams.value.pageNum,
|
||||||
initTab: tab,
|
initTab: tab
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -510,15 +509,16 @@ function submitForm() {
|
|||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const _productIds = row.productId || ids.value;
|
const _productIds = row.productId || ids.value;
|
||||||
proxy.$modal
|
proxy.$modal
|
||||||
.confirm('是否确认删除产品编号为"' + _productIds + '"的数据项?')
|
.confirm("是否确认删除产品编号为\"" + _productIds + "\"的数据项?")
|
||||||
.then(function () {
|
.then(function() {
|
||||||
return delProduct(_productIds);
|
return delProduct(_productIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList();
|
getList();
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -526,20 +526,11 @@ function handleExport() {
|
|||||||
proxy.download(
|
proxy.download(
|
||||||
"product/product/export",
|
"product/product/export",
|
||||||
{
|
{
|
||||||
...queryParams.value,
|
...queryParams.value
|
||||||
},
|
},
|
||||||
`product_${new Date().getTime()}.xlsx`
|
`product_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTenantOptions = async (keyword) => {
|
|
||||||
const response = await listTenant({
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
tenantName: keyword,
|
|
||||||
});
|
|
||||||
tenantOptions.value = response.rows;
|
|
||||||
};
|
|
||||||
const getCategoryList = async () => {
|
const getCategoryList = async () => {
|
||||||
const response = await listCategory();
|
const response = await listCategory();
|
||||||
categoryOptions.value = response.data;
|
categoryOptions.value = response.data;
|
||||||
@ -547,7 +538,6 @@ const getCategoryList = async () => {
|
|||||||
|
|
||||||
getList();
|
getList();
|
||||||
getCategoryList();
|
getCategoryList();
|
||||||
getTenantOptions();
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.card-item {
|
.card-item {
|
||||||
|
|||||||
Reference in New Issue
Block a user