Kaynağa Gözat

Merge branch 'master' of http://git.mydig.net/Sagoo-Cloud/sagoo-admin-ui

vera_min 3 yıl önce
ebeveyn
işleme
741f096a1a

Dosya farkı çok büyük olduğundan ihmal edildi
+ 125 - 125
package-lock.json


+ 3 - 0
src/api/device/index.ts

@@ -31,6 +31,9 @@ export default {
     getLogList: (params: object) => get('/product/log/search', params),
     getlogcate: (params: object) => get('/product/log/type', params),
     getrun_status: (params: object) => get('/product/device/run_status', params),
+    getLogDetail: (params: object) => get('/product/device/property/list', params),
+    devonline: (data: object) => post('/product/device/online', data),
+    devoffline: (data: object) => post('/product/device/offline', data),
   },
   dept: {
     getList: (params: object) => get('/system/dept/tree', params),

+ 1 - 0
src/api/system/index.ts

@@ -74,6 +74,7 @@ export default {
   },
   user: {
     getList: (params: object) => get('/system/user/list', params),
+    getAllList: (params: object) => get('/system/user/getAll', params),
     params: () => get('/system/user/params'),
     detail: (id: number) => get('/system/user/getInfoById', { id }),
     add: (data: object) => post('/system/user/add', data),

+ 90 - 0
src/components/jsontree/index.vue

@@ -0,0 +1,90 @@
+<template>
+	<div class="json-tree">
+		<div v-for="(item, index) in data" :key="`${item.key}-${index}`" class="json-tree-item">
+			<p class="json-tree-line">
+				{{ item.key }}
+				<span v-if="item.type === 'object'">
+					<span v-text="': \{'"></span>
+				</span>
+				<span v-else-if="item.type === 'array'">
+					<span v-text="': \['"></span>
+				</span>
+				<span v-else>
+					<span v-pre>:</span>
+					<span style="margin-left: 15px">
+						{{ item.type === 'string' ? `"${item.value}"` : `${item.value}` }}
+					</span>
+					<span v-if="index < data.length - 1">,</span>
+				</span>
+				<el-tooltip class="item" effect="dark" :content="item.path" placement="top-start">
+					<span class="path-btn" @click="getPath(item.path)">选择</span>
+				</el-tooltip>
+			</p>
+			<div v-if="item.leaf" class="children-tree">
+				<json-tree :data="item.children" @handlePath="handlePath"></json-tree>
+			</div>
+			<span v-if="item.type === 'object'">
+				<span v-text="'\}'"></span>
+				<span v-if="index < data.length - 1">,</span>
+			</span>
+			<span v-else-if="item.type === 'array'">
+				<span v-text="'\]'"></span>
+				<span v-if="index < data.length - 1">,</span>
+			</span>
+		</div>
+	</div>
+</template>
+  
+<script lang="ts">
+import {  defineComponent } from 'vue';
+const props = {
+	data: {
+		type: Array,
+		default: [],
+	},
+};
+export default defineComponent({
+	name: 'jsonTree',
+	props: props,
+	emits: ['handlePath'],
+	setup(props, { emit }) {
+		const getPath = (path) => {
+			emit('handlePath', path);
+		};
+
+		const handlePath=(path)=>{
+			getPath(path);
+		}
+
+		return {
+			handlePath,
+			getPath,
+		};
+	},
+});
+</script>
+
+  
+  <style lang="scss" scoped>
+.json-tree {
+	.json-tree-item {
+		margin: 20px 0px;
+
+		.json-tree-line {
+			.path-btn {
+				background: #37f;
+				color: #fff;
+				padding: 2px 6px;
+				font-size: 12px;
+				cursor: pointer;
+				border-radius: 3px;
+				margin-left: 20px;
+			}
+		}
+
+		.children-tree {
+			margin-left: 20px;
+		}
+	}
+}
+</style>

+ 0 - 2
src/main.ts

@@ -16,8 +16,6 @@ import { getUpFileUrl, handleTree, selectDictLabel } from "/@/utils/common";
 import { useDict } from "/@/api/common/dict/data";
 // 分页组件
 import pagination from '/@/components/pagination/index.vue'
-import 'amis/sdk/sdk.js';
-import 'amis/lib/themes/default.css';
 // 引入百度地图组件
 // import BaiduMap from 'vue-baidu-map-3x'
 

+ 157 - 94
src/views/datahub/source/component/editNode.vue

@@ -3,7 +3,7 @@
 		<el-dialog :title="(ruleForm.nodeId !== 0 ? '修改' : '添加') + '数据节点'" v-model="isShowDialog" width="769px">
 			<el-form :model="ruleForm" ref="formRef" :rules="rules" size="default" label-width="110px">
 				<el-form-item label="数据节点标识" prop="key">
-					<el-input v-model="ruleForm.key" placeholder="请输入数据节点名称"  :disabled="ruleForm.nodeId"/>
+					<el-input v-model="ruleForm.key" placeholder="请输入数据节点名称" :disabled="ruleForm.nodeId" />
 				</el-form-item>
 				<el-form-item label="数据节点名称" prop="name">
 					<el-input v-model="ruleForm.name" placeholder="请输入数据节点名称" />
@@ -16,23 +16,22 @@
 					</el-radio-group>
 				</el-form-item>
 
-				<el-form-item label="数据类型" prop="dataType" v-if="detail.from==1">
+				<el-form-item label="数据类型" prop="dataType" v-if="detail.from == 1">
 					<el-select v-model="ruleForm.dataType" filterable placeholder="请选择数据类型">
 						<el-option v-for="item in tabData" :key="item.value" :label="item.label" :value="item.value" />
 					</el-select>
 				</el-form-item>
 
-				<el-form-item label="取值项" prop="value" v-if="detail.from==1">
+				<el-form-item label="取值项" prop="value" v-if="detail.from == 1">
 					<el-input v-model="ruleForm.value" placeholder="请输入取值项" class="w-35" /><el-button type="success" @click="onTest">选择值</el-button>
-
 				</el-form-item>
-				<el-form-item label="取值项" prop="value" v-if="detail.from==4">
+				<el-form-item label="取值项" prop="value" v-if="detail.from == 4">
 					<el-select v-model="ruleForm.value" filterable placeholder="请选择数取值项" @change="getNodeList">
-							<el-option v-for="item in propertyData" :key="item.key" :label="item.name" :value="item.key">
-								<span style="float: left">{{ item.key }}</span>
-								<span style="float: right; font-size: 13px">{{ item.name }}</span>
-							</el-option>
-						</el-select>
+						<el-option v-for="item in propertyData" :key="item.key" :label="item.name" :value="item.key">
+							<span style="float: left">{{ item.key }}</span>
+							<span style="float: right; font-size: 13px">{{ item.name }}</span>
+						</el-option>
+					</el-select>
 				</el-form-item>
 
 				<el-divider content-position="left">规则表达式</el-divider>
@@ -63,27 +62,22 @@
 			</template>
 		</el-dialog>
 
-		<el-dialog
-				v-model="dialogVisible"
-				title="点击蓝色key值进行选择"
-				width="30%"
-			>
-					<JsonViewer :value="jsonData" :show-double-quotes="true"	  boxed sort theme="jv-dark" @click="onKeyclick" />
-
-				<template #footer>
+		<el-dialog v-model="dialogVisible" title="点击蓝色key值进行选择" width="40%">
+			<jsontree :data="jsonPathData" @handlePath="handlePath"></jsontree>
+			<template #footer>
 				<span class="dialog-footer">
 					<el-button @click="dialogVisible = false">关闭</el-button>
-				
 				</span>
-				</template>
-			</el-dialog>
+			</template>
+		</el-dialog>
 	</div>
 </template>
 
 <script lang="ts">
 import { reactive, toRefs, defineComponent, ref, unref } from 'vue';
 import api from '/@/api/datahub';
-import "vue3-json-viewer/dist/index.css";
+import 'vue3-json-viewer/dist/index.css';
+import jsontree from '/@/components/jsontree/index.vue';
 
 import { ElMessage } from 'element-plus';
 import { Delete, Minus, Right } from '@element-plus/icons-vue';
@@ -107,20 +101,21 @@ interface DicState {
 
 export default defineComponent({
 	name: 'Edit',
-	components: { Delete, Minus, Right },
+	components: { Delete, Minus, Right, jsontree },
 
 	setup(prop, { emit }) {
 		const editDicRef = ref();
 		const formRef = ref<HTMLElement | null>(null);
 		const state = reactive<DicState>({
 			isShowDialog: false,
-			dialogVisible:false,
-			jsonData:'',
-			propertyData:[],
+			dialogVisible: false,
+			jsonPathData: [],
+			jsonData: '',
+			propertyData: [],
 			config: {},
-			detail:{},
+			detail: {},
 			tabData: [
-			{
+				{
 					label: 'int',
 					value: 'int',
 				},
@@ -190,21 +185,31 @@ export default defineComponent({
 			},
 		});
 
-		const onTest=()=>{
-			if(state.detail.from==1){
+		const onTest = () => {
+			if (state.detail.from == 1) {
 				api.common.api(state.detail.sourceId).then((res: any) => {
-					state.jsonData=JSON.parse(res.data);
-					state.dialogVisible=true
-						console.log(res);
-				})
-			}else if(state.detail.from==4){
+					state.jsonData = JSON.parse(res.data);
+
+					var jsonstr = jsonPath([], state.jsonData, '');
+					state.jsonPathData = jsonstr;
+					state.dialogVisible = true;
+				});
+			} else if (state.detail.from == 4) {
 				api.common.devapi(state.detail.sourceId).then((res: any) => {
-					state.jsonData=JSON.parse(res.data);
-					state.dialogVisible=true
-						console.log(res);
-				})
+					state.jsonData = JSON.parse(res.data);
+
+					var jsonstr = jsonPath([], state.jsonData, '');
+					state.jsonPathData = jsonstr;
+					state.dialogVisible = true;
+				});
 			}
-			
+		};
+
+		const handlePath = (path) => {
+			let data = path.slice(1);
+
+			state.ruleForm.value = data;
+			state.dialogVisible = false;
 		};
 
 		const delRule = (index) => {
@@ -230,26 +235,23 @@ export default defineComponent({
 
 				var data = JSON.parse(row.rule);
 				console.log(data);
-
 				data.forEach((item, index) => {
 					state.rule[index].expression = item.expression;
 					state.rule[index].replace = item.replace;
 					// state.rule[index].params.name = Object.keys(item.params);
 					// state.rule[index].params.value = item.params[Object.keys(item.params)];
 				});
-
-			
 			}
 
-				api.common.detail(row.sourceId).then((res: any) => {
-					state.detail = res.data;
-					if(res.data.from==4){
-						//propertyData
-						api.node.getpropertyList({key:res.data.deviceConfig.productKey}).then((re: any) => {
-							state.propertyData=re
-						});
-					}
-				});
+			api.common.detail(row.sourceId).then((res: any) => {
+				state.detail = res.data;
+				if (res.data.from == 4) {
+					//propertyData
+					api.node.getpropertyList({ key: res.data.deviceConfig.productKey }).then((re: any) => {
+						state.propertyData = re;
+					});
+				}
+			});
 
 			state.ruleForm = row;
 			state.isShowDialog = true;
@@ -309,61 +311,123 @@ export default defineComponent({
 			});
 		};
 
-		const getNodeList=(e)=>{
+		const getNodeList = (e) => {
 			state.propertyData.forEach((item, index) => {
-				if(item.key===e){
-					state.ruleForm.dataType=item.valueType.type;
+				if (item.key === e) {
+					state.ruleForm.dataType = item.valueType.type;
 				}
 			});
-		}
+		};
 
-		const onKeyclick=(e)=>{
+		const onKeyclick = (e) => {
 			//console.log(e);
-			if(e.target.innerText && e.target.className=='jv-key'){
-				let str = e.target.innerText;  
-				str = str.substr(0, str.length - 1);
-				state.ruleForm.value=str;
-				state.dialogVisible = false;
-				var con={
-					...
-					state.jsonData
+			// if (e.target.innerText && e.target.className == 'jv-key') {
+			// 	let str = e.target.innerText;
+			// 	str = str.substr(0, str.length - 1);
+			// 	state.ruleForm.value = str;
+			// 	state.dialogVisible = false;
+			// 	var con = {
+			// 		...state.jsonData,
+			// 	};
+			// 	// var jsonstr = getOrgIdArr([], str, con);
+			// 	// state.ruleForm.value = jsonstr.join('.');
+			// }
+		};
+
+		const jsonPath = (arr, json, basePath) => {
+			// 生成jsonpath
+			const type = validateType(json);
+
+			if (type === 'object') {
+				for (let key in json) {
+					const item = {
+						key,
+						path: `${basePath}.${key}`,
+					};
+					const childType = validateType(json[key]);
+					item.type = childType;
+					if (childType === 'object' || childType === 'array') {
+						item.leaf = true;
+						item.children = [];
+						jsonPath(item.children, json[key], item.path);
+					} else {
+						item.leaf = false;
+						item.value = json[key];
+					}
+					arr.push(item);
 				}
-				var jsonstr=getOrgIdArr([],str,con);
-				state.ruleForm.value=jsonstr.join('.');
-			
+			} else if (type === 'array') {
+				json.forEach((item, index) => {
+					const childType = validateType(item);
+					const obj = {
+						key: index,
+					};
+					obj.type = childType;
+					obj.path = `${basePath}.${index}`;
+					if (childType === 'object' || childType === 'array') {
+						(obj.leaf = true), (obj.children = []);
+						jsonPath(obj.children, item, obj.path);
+					} else {
+						obj.value = item;
+						obj.leaf = false;
+					}
+					arr.push(obj);
+				});
 			}
-			
+
+			return arr;
 		};
 
-		const getOrgIdArr=(parents, childNode, treeData)=>{
-			
-			if (treeData instanceof Object) {
-			
-				for (var key in treeData) {
-					
-						// 父节点查询条件
-						if (key === childNode) {
-							// 如果找到结果,保存当前节点
-							parents.push(key)
-							// 用当前节点再去原数据查找当前节点的父节点
-							//getOrgIdArr(parents, childNode,treeData[key])
-							break
-						} else {
-							if (treeData[key] instanceof Object) {
-							//	没找到,遍历该节点的子节点
-								parents.push(key)
-								getOrgIdArr(parents, childNode, treeData[key])
-								break
-							}
-						}
+		// 校验JSON数据类型
+		const validateType = (val) => {
+			let type = typeof val;
+			if (type === 'object') {
+				if (Array.isArray(val)) {
+					return 'array';
+				} else if (val === null) {
+					return 'null';
+				} else {
+					return 'object';
+				}
+			} else {
+				switch (type) {
+					case 'boolean':
+						return 'boolean';
+					case 'string':
+						return 'string';
+					case 'number':
+						return 'number';
+					default:
+						return 'error';
+				}
+			}
+		};
+
+		const getOrgIdArr = (parents, childNode, treeData) => {
+			for (var key in treeData) {
+				// 父节点查询条件
+				if (key === childNode) {
+					// 如果找到结果,保存当前节点
+					parents.push(key);
+					break;
+				} else {
+					if (treeData[key] instanceof Object) {
+						// console.log(treeData[key]);
+						parents.push(key);
+
+						//没找到,遍历该节点的子节点
+						getOrgIdArr(parents, childNode, treeData[key]);
 					}
+				}
 			}
-				return parents
 
+			return parents;
 		};
 
-
 		return {
+			jsonPath,
+			handlePath,
+			validateType,
 			getNodeList,
 			onKeyclick,
 			getOrgIdArr,
@@ -410,9 +474,8 @@ export default defineComponent({
 	line-height: 28px;
 	cursor: pointer;
 }
-.jv-key{
+.jv-key {
 	cursor: pointer;
 	color: #0034f1;
-
 }
 </style>

+ 1 - 1
src/views/datahub/source/index.vue

@@ -89,7 +89,7 @@
 						>
 							<span>详情</span>
 						</router-link>
-						<el-button size="small" text type="success" @click="onOpenList(scope.row)">数据记录</el-button>
+						<el-button size="small" text type="success" @click="onOpenList(scope.row)"  v-if="scope.row.status==1">数据记录</el-button>
 						<el-button size="small" text type="warning" @click="onOpenEdit(scope.row)" v-if="scope.row.status==0">修改</el-button>
 						<el-button size="small" text type="danger" @click="onRowDel(scope.row)" v-if="scope.row.status==0">删除</el-button>
 					</template>

+ 147 - 0
src/views/device/instance/component/list.vue

@@ -0,0 +1,147 @@
+<template>
+	<div class="system-edit-dic-container">
+		<el-dialog  v-model="isShowDialog" :show-close="false"  width="75%" :fullscreen="dialogFullScreen">
+		 <template #header="{ close, titleId, titleClass }">
+      <div class="my-header">
+        <h4 :id="titleId" :class="titleClass">数据记录</h4>
+		 
+		 <div>
+            <i class="iconfont "  :class="!dialogFullScreen ? 'icon-fullscreen' : 'icon-tuichuquanping'"   @click="quanping"  style="font-size: 22px;cursor: pointer;"></i>
+			<i class="el-icon"  @click="close" style="font-size: 22px;cursor: pointer;    margin-left: 10px; position: relative; top: 3px;"><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-029747aa=""><path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path></svg></i>
+			
+		</div>
+      </div>
+    </template>
+
+			<el-table :data="tableData.data" style="width: 100%"  v-loading="tableData.loading">
+				<el-table-column label="时间" prop="ts" :show-overflow-tooltip="true" />
+				<el-table-column label="属性值" prop="value" :show-overflow-tooltip="true" />
+			</el-table>
+			<pagination
+				v-show="tableData.total > 0"
+				:total="tableData.total"
+				v-model:page="tableData.param.pageNum"
+				v-model:limit="tableData.param.pageSize"
+				@pagination="typeList"
+			/>
+		</el-dialog>
+	</div>
+</template>
+ 
+<script lang="ts">
+import { reactive, toRefs, defineComponent, ref, unref } from 'vue';
+import { Close } from '@element-plus/icons-vue';
+
+import api from '/@/api/device';
+import { ElMessage } from 'element-plus';
+
+interface DicState {
+	isShowDialog: boolean;
+}
+
+// 定义接口来定义对象的类型
+interface TableDataRow {
+	id: number;
+	name: string;
+	key: string;
+
+	createBy: string;
+}
+interface TableDataState {
+	ids: number[];
+	tableData: {
+		data: Array<TableDataRow>;
+		total: number;
+		loading: boolean;
+		param: {
+			pageNum: number;
+			pageSize: number;
+			id: number;
+		};
+	};
+}
+
+export default defineComponent({
+	name: 'deviceEditPro',
+	setup(prop, { emit }) {
+		const formRef = ref<HTMLElement | null>(null);
+		const state = reactive<DicState>({
+			isShowDialog: false,
+		    dialogFullScreen: false,
+			tableData: {
+				data: [],
+				total: 0,
+				loading: false,
+				param: {
+					pageNum: 1,
+					pageSize: 10,
+					id: 0,
+					propertyKey:'',
+				},
+			},
+		});
+		// 打开弹窗
+		const openDialog = (row: RuleFormState | null,devid) => {
+			resetForm();
+			if (row) {
+				console.log(row);
+				state.tableData.param.id = devid;
+				state.tableData.param.propertyKey=row.key
+				typeList();
+
+			}
+			state.isShowDialog = true;
+		};
+
+		const typeList = () => {
+			state.tableData.loading = true;
+			api.instance.getLogDetail(state.tableData.param).then((res: any) => {
+				state.tableData.data = res.List;
+				state.tableData.total = res.Total;
+				//state.ruleForm = res.data.dictType
+			}).finally(() => (state.tableData.loading = false));
+
+		};
+		const resetForm = () => {
+			state.tableData= {
+				data: [],
+				total: 0,
+				loading: false,
+				param: {
+					pageNum: 1,
+					pageSize: 10,
+				},
+			}
+		};
+		// 关闭弹窗
+		const closeDialog = () => {
+			state.isShowDialog = false;
+		};
+		const quanping=()=>{
+			state.dialogFullScreen = state.dialogFullScreen?false:true;
+		}
+		// 取消
+		const onCancel = () => {
+			closeDialog();
+		};
+
+		return {
+            Close,
+			quanping,
+			typeList,
+			openDialog,
+			closeDialog,
+			onCancel,
+			formRef,
+			...toRefs(state),
+		};
+	},
+});
+</script>
+<style scoped>
+.my-header {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+</style>

+ 28 - 14
src/views/device/instance/detail.vue

@@ -3,9 +3,9 @@
 		<div class="content">
 			<div class="cont_box">
 				<div class="title">设备:{{ detail.name }}</div>
-				<div class="pro-status"><span :class="developer_status == 1 ? 'on' : 'off'"></span>{{ developer_status == 1 ? '已发布' : '未发布' }}</div>
+				<div class="pro-status"><span :class="developer_status == 2 ? 'on' : 'off'"></span>{{ developer_status == 2 ? '上线' : '下线' }}</div>
 
-				<div class="pro-option" @click="CkOption">{{ developer_status == 1 ? '停用' : '启用' }}</div>
+				<div class="pro-option" @click="CkOption">{{ developer_status == 2 ? '下线' : '上线' }}</div>
 			</div>
 		</div>
 
@@ -177,7 +177,7 @@
 								<div class="cardflex">
 									<div>设备状态</div>
 									<div @click="getrunData()" style="cursor: pointer;">
-										<el-icon>
+										<el-icon style="font-size: 18px;">
 											<ele-Refresh />
 										</el-icon>
 									</div>
@@ -197,10 +197,13 @@
 							<div class="ant-card-body">
 								<div class="cardflex">
 									<div>{{item.name}}</div>
-									<div @click="getrunData()" style="cursor: pointer;">
-										<el-icon >
+									<div style="cursor: pointer;">
+										<el-icon  style="font-size: 18px;"  @click="getrunData()">
 											<ele-Refresh />
 										</el-icon>
+										<el-icon  style="font-size: 18px;    margin-left: 10px;" @click="onOpenListDetail(item)">
+											<ele-Expand />
+										</el-icon>
 									</div>
 								</div>
 
@@ -279,6 +282,7 @@
 		<EditFun ref="editFunRef" @typeList="getfunction" />
 		<EditEvent ref="editEventRef" @typeList="getevent" />
 		<EditTab ref="editTabRef" @typeList="gettab" />
+		<ListDic ref="listDicRef"  />
 
 		<el-dialog v-model="dialogVisible" title="返回Json数据" width="30%">
 			<JsonViewer :value="jsonData" boxed sort theme="jv-dark" @click="onKeyclick" />
@@ -303,6 +307,8 @@ import EditFun from '../product/component/editFun.vue';
 import EditEvent from '../product/component/editEvent.vue';
 import EditTab from '../product/component/editTab.vue';
 import devantd from '/@/components/devantd/index.vue';
+import ListDic from './component/list.vue';
+
 
 import { useRoute } from 'vue-router';
 
@@ -339,13 +345,14 @@ interface TableDataState {
 }
 export default defineComponent({
 	name: 'deviceEditPro',
-	components: { EditDic, EditAttr, EditFun, EditEvent, EditTab,devantd },
+	components: { EditDic, EditAttr, EditFun, EditEvent, EditTab,devantd,ListDic },
 
 	setup(prop, context) {
 		const route = useRoute();
 		const editDicRef = ref();
 		const editAttrRef = ref();
 		const editFunRef = ref();
+		const listDicRef=ref();
 		const editEventRef = ref();
 		const editTabRef = ref();
 		const state = reactive<TableDataState>({
@@ -451,9 +458,14 @@ export default defineComponent({
 			editTabRef.value.openDialog({ product_id: state.product_id, id: 0, accessMode: 0 });
 		};
 
+		//查看日志列表
+		const onOpenListDetail=(row: TableDataRow)=>{
+			listDicRef.value.openDialog(row, state.detail.id);
+		};
+
 		// 打开修改产品弹窗
 		const onOpenEditDic = (row: TableDataRow) => {
-			editDicRef.value.openDialog(row);
+			editDicRef.value.openDialog(row); 
 		};
 
 		// 删除产品
@@ -575,7 +587,7 @@ export default defineComponent({
 		};
 
 		const getrunData=()=>{
-			api.instance.getrun_status({id:9}).then((res: any) => {
+			api.instance.getrun_status({id:state.detail.id}).then((res: any) => {
 					state.areaData=res
 				
 				});
@@ -598,15 +610,15 @@ export default defineComponent({
 		};
 
 		const CkOption = () => {
-			if (state.developer_status == 1) {
-				api.product.undeploy({ id: route.params.id }).then((res: any) => {
+			if (state.developer_status == 2) {
+				api.instance.devoffline({id:state.detail.id}).then((res: any) => {
 					ElMessage.success('操作成功');
-					state.developer_status = 0;
+					state.developer_status = 1;
 				});
 			} else {
-				api.product.deploy({ id: route.params.id }).then((res: any) => {
+				api.instance.devonline({id:state.detail.id}).then((res: any) => {
 					ElMessage.success('操作成功');
-					state.developer_status = 1;
+					state.developer_status = 2;
 				});
 			}
 		};
@@ -628,9 +640,11 @@ export default defineComponent({
 			tinyAreas,
 			editDicRef,
 			editAttrRef,
+			listDicRef,
 			editFunRef,
 			editEventRef,
 			editTabRef,
+			onOpenListDetail,
 			getrunData,
 			getlog,
 			getlogtype,
@@ -789,7 +803,7 @@ tr {
 .ant-card {
 	box-sizing: border-box;
 	margin: 10px;
-	width: 23.9%;
+	width: 23.8%;
 	color: rgba(0, 0, 0, 0.65);
 	font-size: 14px;
 	font-variant: tabular-nums;

+ 18 - 1
src/views/heatStation/heatStation/component/edit.vue

@@ -24,7 +24,15 @@
 					<el-input v-model="ruleForm.position" placeholder="请输入换热站位置" />
 				</el-form-item>
 				<el-form-item label="负责人" prop="principal">
-					<el-input v-model="ruleForm.principal" placeholder="请输入负责人" />
+					<!-- <el-input v-model="ruleForm.principal" placeholder="请输入负责人" /> -->
+					<el-select v-model="ruleForm.principal" clearable style="width: 100%;" placeholder="请选择">
+						<el-option
+							v-for="item in userList"
+							:key="item.id"
+							:label="item.userNickname"
+							:value="item.id">
+						</el-option>
+					</el-select>
 				</el-form-item>
 				<el-form-item label="状态" prop="status">
 					<el-radio v-model="ruleForm.status" :label="1">在线</el-radio>
@@ -64,6 +72,7 @@
 <script lang="ts">
 import { reactive, toRefs, defineComponent, ref, unref, nextTick, onMounted } from 'vue';
 import api from '/@/api/heatStation';
+import userApi from '/@/api/system';
 import datahubApi from '/@/api/datahub';
 import { ElMessage } from 'element-plus';
 import { useStore } from '/@/store/index';
@@ -106,6 +115,7 @@ export default defineComponent({
 			},
 			treeData: [],
 			dataHubList: [],
+			userList: [],
 			mapLocal: null as any
 		})
 		const store = useStore();
@@ -113,6 +123,7 @@ export default defineComponent({
 		const openDialog = (row: any, tree: any) => {
 			resetForm()
 			queryDataHubList()
+			queryUserList()
 			state.treeData = tree
 
 			if (row) {
@@ -131,6 +142,12 @@ export default defineComponent({
 					state.dataHubList = res.list || [];
 				});
 		};
+		const queryUserList = () => {
+			userApi.user.getAllList({})
+				.then((res: any) => {
+					state.userList = res || [];
+				});
+		};
 		const resetForm = () => {
 			state.ruleForm = {
 				id: 0,

+ 2 - 1
src/views/heatingDistrict/residentManage/component/edit.vue

@@ -201,7 +201,8 @@ export default defineComponent({
 			api.resident.detail(state.ruleForm.id)
 				.then((res: any) => {
 					state.ruleForm = {
-						...res
+						...res,
+						heatStaId: res.heatStaId || ''
 					}
 				})
 		}

+ 2 - 1
src/views/heatingDistrict/unitManage/component/edit.vue

@@ -161,7 +161,8 @@ export default defineComponent({
 			api.unit.detail(state.ruleForm.id)
 				.then((res: any) => {
 					state.ruleForm = {
-						...res
+						...res,
+						heatStaId: res.heatStaId || ''
 					}
 				})
 		}

+ 1 - 0
src/views/heatingDistrict/unitManage/index.vue

@@ -77,6 +77,7 @@
         <el-table-column label="组织名称" prop="organizationInfo.name" min-width="100" />
         <el-table-column label="小区名称" prop="plotInfo.name" min-width="100" />
         <el-table-column label="楼宇名称" prop="floorInfo.name" min-width="100" />
+        <el-table-column label="楼号" prop="floorInfo.number" min-width="100" />
 	    	<el-table-column label="单元名称" prop="name" min-width="100" />
 	    	<el-table-column label="单元号" prop="number" min-width="100" />
 	    	<el-table-column label="更新时间" prop="updatedAt" width="180" />

+ 1 - 3
src/views/login/index.vue

@@ -8,6 +8,7 @@
 			@change="onAddDarkChange"
 			:active-icon="Sunny"
 			:inactive-icon="Moon"
+			style="--el-switch-on-color: #fff; --el-switch-off-color: #151515"
 		></el-switch>
 		<div class="part left">
 			<div class="flex logo"><img class="logoimg" src="/@/assets/logo.png" />{{ sysinfo.systemName }}</div>
@@ -21,7 +22,6 @@
 			<div class="title">登录</div>
 			<Account />
 		</div>
-		<!-- <amis :json="amisjson" /> -->
 	</div>
 </template>
 
@@ -32,7 +32,6 @@ import { useStore } from '/@/store/index';
 import logoMini from '/@/assets/logo.png';
 import { Sunny, Moon } from '@element-plus/icons-vue';
 import dayjs from 'dayjs';
-// import amis from '/@/components/amis/index.vue';
 
 const store = useStore();
 
@@ -46,7 +45,6 @@ export default defineComponent({
 	name: 'loginIndex',
 	components: {
 		Account,
-		// amis,
 	},
 	data: function () {
 		return {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor