yukai 2 년 전
부모
커밋
74ad5baea4

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 4473
package-lock.json


+ 1 - 0
package.json

@@ -43,6 +43,7 @@
     "vue-grid-layout": "^3.0.0-beta1",
     "vue-i18n": "9.1.10",
     "vue-router": "^4.0.13",
+    "vue3-cron": "^1.1.8",
     "vue3-json-viewer": "^2.2.2",
     "vuex": "^4.0.2",
     "wangeditor": "^4.7.12"

+ 1 - 0
src/api/model/system/menu.ts

@@ -21,6 +21,7 @@ export interface MenuListRow {
 export interface ApiRow {
   id?: number; // ID
   menuIds: number[]; // 名称
+  types: 1 | 2; // 1 分类 2接口
   name: string; // 名称
   address: string; // 接口地址
   remark: string; // 备注

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

@@ -9,7 +9,7 @@ export default {
     logout: () => post('/loginOut'),
   },
   api: {
-    getList: (params?: object) => get('/system/api/list', params),
+    getList: (params?: object) => get('/system/api/tree', params),
     getAll: () => get('/system/api/GetAll'),
     detail: (id: number) => get('/system/api/detail', { id }),
     add: (data: object) => post('/system/api/add', data),
@@ -83,6 +83,7 @@ export default {
     del: (id: number) => del('/system/user/delInfoById', { id }),
     edit: (data: object) => put('/system/user/edit', data),
     setStatus: (id: number, status: number) => put('/system/user/editStatus', { id, status }),
+    setAvatar: (id: number, avatar: string) => put('/system/user/editStatus', { id, avatar }),
   },
   config: {
     getList: (params: object) => get('/common/config/list', params),

+ 60 - 0
src/components/upload-wrapper/index.vue

@@ -0,0 +1,60 @@
+<template>
+  <div class="upload">
+    <el-upload class="hide" :accept="accept" :limit="1" :multiple="multiple" :headers="headers" :before-upload="beforeAvatarUpload" :action="uploadUrl" :on-success="updateImg">
+      <slot></slot>
+    </el-upload>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import { ref } from 'vue';
+import { ElMessage } from 'element-plus';
+import type { UploadProps } from 'element-plus';
+import getOrigin from '/@/utils/origin'
+
+const uploadUrl: string = getOrigin(import.meta.env.VITE_API_URL + '/common/singleImg');
+
+const headers = {
+  Authorization: 'Bearer ' + JSON.parse(sessionStorage.token),
+};
+
+const emit = defineEmits(['setImg', 'setImgs']);
+
+const props = defineProps({
+  multiple: {
+    type: Boolean,
+    default: false,
+  },
+  accept: {
+    type: String,
+    default: '.jpg,.png,.jpeg,.gif',
+  },
+});
+
+const updateImg = (res: any) => {
+  const url = getOrigin(import.meta.env.VITE_SERVER_URL + '/' + res.data?.path)
+
+  emit('setImg', url);
+};
+
+const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
+  if (rawFile.size / 1024 / 1024 > 2) {
+    ElMessage.error('图片不能超过2MB!');
+    return false;
+  }
+  return true;
+};
+</script>
+
+<style scoped>
+.hide ::v-deep(.el-upload-list) {
+	display: none;
+}
+
+.preview {
+	max-width: 100%;
+	max-height: 60vh;
+	display: block;
+	margin: 0 auto;
+}
+</style>

+ 1 - 1
src/router/backEnd.ts

@@ -57,7 +57,7 @@ export async function initBackEndControlRoutes() {
  */
 export async function getBackEndControlRoutes() {
 	return api.login.currentUser().then((res: any) => {
-		Session.set('userMenu', res || [])
+		Session.set('userMenu', res.Data || [])
 		// Session.set('permissions',res.data.permissions)
 		// store.dispatch('userInfos/setPermissions',res.data.permissions)
 	})

+ 16 - 16
src/router/route.ts

@@ -30,21 +30,21 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 			isKeepAlive: true,
 		},
 		children: [
-			{
-				path: '/home',
-				name: 'home',
-				component: () => import('/@/views/home/index.vue'),
-				meta: {
-					title: 'message.router.home',
-					isLink: '',
-					isHide: false,
-					isKeepAlive: true,
-					isAffix: true,
-					isIframe: false,
-					roles: ['admin', 'common'],
-					icon: 'iconfont icon-shouye',
-				},
-			},
+			// {
+			// 	path: '/home',
+			// 	name: 'home',
+			// 	component: () => import('/@/views/home/index.vue'),
+			// 	meta: {
+			// 		title: 'message.router.home',
+			// 		isLink: '',
+			// 		isHide: false,
+			// 		isKeepAlive: true,
+			// 		isAffix: true,
+			// 		isIframe: false,
+			// 		roles: ['admin', 'common'],
+			// 		icon: 'iconfont icon-shouye',
+			// 	},
+			// },
 			{
 				path: '/personal',
 				name: 'personal',
@@ -90,7 +90,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 	},
 ];
 
-export const demoRoutes:Array<RouteRecordRaw> = [
+export const demoRoutes: Array<RouteRecordRaw> = [
 	{
 		path: '/demo',
 		name: 'demo',

+ 3 - 0
src/utils/request.ts

@@ -55,6 +55,9 @@ service.interceptors.response.use(
 			// if (res.data?.Data) {
 			// 	return res.data.Data
 			// }
+			if (res.data?.Info && res.data?.Data) { // currentUser接口
+				return res.data
+			}
 			if (res.data?.Data === undefined) {
 				return res.data
 			}

+ 121 - 124
src/views/heating/energyAnalysis/analysisReport/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-container">
     <el-card shadow="hover">
-			<!-- <el-checkbox-group v-model="checkList">
+      <!-- <el-checkbox-group v-model="checkList">
 				<el-checkbox label="一网供水温度" />
 				<el-checkbox label="一网回水温度" />
 				<el-checkbox label="一网供水压力" />
@@ -12,8 +12,8 @@
 				<el-checkbox label="二网回水压力" />
 			</el-checkbox-group> -->
 
-			<div style="height: 600px" ref="lineChartRef"></div>
-			<!-- <ChartDom :height="400" :option="lineChartOptions"/> -->
+      <div style="height: 600px" ref="lineChartRef"></div>
+      <!-- <ChartDom :height="400" :option="lineChartOptions"/> -->
     </el-card>
   </div>
 </template>
@@ -22,34 +22,32 @@
 import { ref, reactive, watch, nextTick, onMounted } from 'vue';
 import * as echarts from 'echarts';
 import { useStore } from '/@/store/index';
-import { ElMessageBox, ElMessage, FormInstance } from 'element-plus';
-import api from '/@/api/energyAnalysis';
 import heatApi from '/@/api/heatStation';
 import datahubApi from '/@/api/datahub';
 
 let global: any = {
-	lineChart: null,
-	dispose: [null, '', undefined],
+  lineChart: null,
+  dispose: [null, '', undefined],
 };
 
 const store = useStore();
 const state = reactive({
-	myCharts: [],
-	charts: {
-		theme: '',
-		bgColor: '',
-		color: '#303133',
-	},
-	heatList: [],
-	lineChartXAxis: [],
-	inPressure1: [],
-	inPressure2: [],
-	inTemperature1: [],
-	inTemperature2: [],
-	outPressure1: [],
-	outPressure2: [],
-	outTemperature1: [],
-	outTemperature2: [],
+  myCharts: [],
+  charts: {
+    theme: '',
+    bgColor: '',
+    color: '#303133',
+  },
+  heatList: [],
+  lineChartXAxis: [],
+  inPressure1: [],
+  inPressure2: [],
+  inTemperature1: [],
+  inTemperature2: [],
+  outPressure1: [],
+  outPressure2: [],
+  outTemperature1: [],
+  outTemperature2: [],
 })
 const lineChartRef = ref()
 const checkList = ref([])
@@ -57,131 +55,130 @@ const checkList = ref([])
 
 // 获取供热监测数据
 const getStatisticsChartData = () => {
-	datahubApi.statistics.getStatisticsChartData({tableNo:17}).then((res:any) => {
-		console.log(res)
-		const data = res.Info
-		// "huanLuNo": "D00140-4", //换热站编号
-		// "huanLuName": "8#楼高区", //换热站名称
-		// "inPressure1": 0, //一网供水压力
-		// "inPressure2": 0, //二网供水压力
-		// "inTemperature1": 0, //一网供水温度
-		// "inTemperature2": 0, //二网供水温度
-		// "outPressure1": 0, //一网回水压力
-		// "outPressure2": 0, //二网回水压力
-		// "outTemperature1": 0, //一网回水温度
-		// "outTemperature2": 0 //二网回水温度
-		state.inPressure1 = []
-		state.inPressure2 = []
-		state.inTemperature1 = []
-		state.inTemperature2 = []
-		state.outPressure1 = []
-		state.outPressure2 = []
-		state.outTemperature1 = []
-		state.outTemperature2 = []
+  datahubApi.statistics.getStatisticsChartData({ tableNo: 17 }).then((res: any) => {
+    console.log(res)
+    const data = res.Info
+    // "huanLuNo": "D00140-4", //换热站编号
+    // "huanLuName": "8#楼高区", //换热站名称
+    // "inPressure1": 0, //一网供水压力
+    // "inPressure2": 0, //二网供水压力
+    // "inTemperature1": 0, //一网供水温度
+    // "inTemperature2": 0, //二网供水温度
+    // "outPressure1": 0, //一网回水压力
+    // "outPressure2": 0, //二网回水压力
+    // "outTemperature1": 0, //一网回水温度
+    // "outTemperature2": 0 //二网回水温度
+    state.inPressure1 = []
+    state.inPressure2 = []
+    state.inTemperature1 = []
+    state.inTemperature2 = []
+    state.outPressure1 = []
+    state.outPressure2 = []
+    state.outTemperature1 = []
+    state.outTemperature2 = []
 
-		data.forEach((item: any) => {
-			state.lineChartXAxis.push(item.huanLuName);
-			state.inPressure1.push(item.inPressure1);
-			state.inPressure2.push(item.inPressure2);
-			state.inTemperature1.push(item.inTemperature1);
-			state.inTemperature2.push(item.inTemperature2);
-			state.outPressure1.push(item.outPressure1);
-			state.outPressure2.push(item.outPressure2);
-			state.outTemperature1.push(item.outTemperature1);
-			state.outTemperature2.push(item.outTemperature2);
-		});
+    data.forEach((item: any) => {
+      state.lineChartXAxis.push(item.huanLuName);
+      state.inPressure1.push(item.inPressure1);
+      state.inPressure2.push(item.inPressure2);
+      state.inTemperature1.push(item.inTemperature1);
+      state.inTemperature2.push(item.inTemperature2);
+      state.outPressure1.push(item.outPressure1);
+      state.outPressure2.push(item.outPressure2);
+      state.outTemperature1.push(item.outTemperature1);
+      state.outTemperature2.push(item.outTemperature2);
+    });
 
-		nextTick(() => {
-			initLineChart();
-		});
-	});
+    nextTick(() => {
+      initLineChart();
+    });
+  });
 };
 const queryTree = () => {
-	heatApi.heatStation.getList({
-		name: '',
-		code: '',
-		status: -1
-	})
-	.then((res: any) => {
-		state.heatList = res || [];
-	});
+  heatApi.heatStation.getList({
+    name: '',
+    code: '',
+    status: -1
+  })
+    .then((res: any) => {
+      state.heatList = res || [];
+    });
 };
 
 // 初始化图标
 const initLineChart = () => {
-	if (!global.dispose.some((b: any) => b === global.lineChart)) global.lineChart.dispose();
-	global.lineChart = <any>echarts.init(lineChartRef.value, state.charts.theme);
-	const option = {
-		backgroundColor: state.charts.bgColor,
-		grid: { top: 70, right: 20, bottom: 30, left: 30 },
-		tooltip: { trigger: 'axis' },
-		legend: {},
-		xAxis: {
-			data: state.lineChartXAxis,
-		},
-		yAxis: [
-			{
-				type: 'value',
-				name: '',
-				splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
-			},
-		],
-		series: [
-			{ name: '一网供水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inPressure1 },
-			{ name: '二网供水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inPressure2 },
-			{ name: '一网供水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inTemperature1 },
-			{ name: '二网供水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inTemperature2 },
-			{ name: '一网回水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outPressure1 },
-			{ name: '二网回水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outPressure2 },
-			{ name: '一网回水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outTemperature1 },
-			{ name: '二网回水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outTemperature2 }
-		]
-	};
-	(<any>global.lineChart).setOption(option);
-	(<any>state.myCharts).push(global.lineChart);
+  if (!global.dispose.some((b: any) => b === global.lineChart)) global.lineChart.dispose();
+  global.lineChart = <any>echarts.init(lineChartRef.value, state.charts.theme);
+  const option = {
+    backgroundColor: state.charts.bgColor,
+    grid: { top: 70, right: 20, bottom: 30, left: 30 },
+    tooltip: { trigger: 'axis' },
+    legend: {},
+    xAxis: {
+      data: state.lineChartXAxis,
+    },
+    yAxis: [
+      {
+        type: 'value',
+        name: '',
+        splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
+      },
+    ],
+    series: [
+      { name: '一网供水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inPressure1 },
+      { name: '二网供水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inPressure2 },
+      { name: '一网供水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inTemperature1 },
+      { name: '二网供水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.inTemperature2 },
+      { name: '一网回水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outPressure1 },
+      { name: '二网回水压力', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outPressure2 },
+      { name: '一网回水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outTemperature1 },
+      { name: '二网回水温度', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, data: state.outTemperature2 }
+    ]
+  };
+  (<any>global.lineChart).setOption(option);
+  (<any>state.myCharts).push(global.lineChart);
 }
 
 // 批量设置 echarts resize
 const initEchartsResizeFun = () => {
-	nextTick(() => {
-		for (let i = 0; i < state.myCharts.length; i++) {
-			setTimeout(() => {
-				(<any>state.myCharts[i]).resize();
-			}, i * 1000);
-		}
-	});
+  nextTick(() => {
+    for (let i = 0; i < state.myCharts.length; i++) {
+      setTimeout(() => {
+        (<any>state.myCharts[i]).resize();
+      }, i * 1000);
+    }
+  });
 };
 // 批量设置 echarts resize
 const initEchartsResize = () => {
-	window.addEventListener('resize', initEchartsResizeFun);
+  window.addEventListener('resize', initEchartsResizeFun);
 };
 // 页面加载时
 onMounted(() => {
-	// queryTree()
-	getStatisticsChartData()
-	initEchartsResize();
+  // queryTree()
+  getStatisticsChartData()
+  initEchartsResize();
 });
 
 // 监听 vuex 中是否开启深色主题
 watch(
-	() => store.state.themeConfig.themeConfig.isIsDark,
-	(isIsDark) => {
-		nextTick(() => {
-			state.charts.theme = isIsDark ? 'dark' : '';
-			state.charts.bgColor = isIsDark ? 'transparent' : '';
-			state.charts.color = isIsDark ? '#dadada' : '#303133';
-			// setTimeout(() => {
-			// 	initLineChart();
-			// }, 500);
-		});
-	},
-	{
-		deep: true,
-		immediate: true,
-	}
+  () => store.state.themeConfig.themeConfig.isIsDark,
+  (isIsDark) => {
+    nextTick(() => {
+      state.charts.theme = isIsDark ? 'dark' : '';
+      state.charts.bgColor = isIsDark ? 'transparent' : '';
+      state.charts.color = isIsDark ? '#dadada' : '#303133';
+      // setTimeout(() => {
+      // 	initLineChart();
+      // }, 500);
+    });
+  },
+  {
+    deep: true,
+    immediate: true,
+  }
 );
 </script>
 
 <style scoped lang="scss">
-
 </style>

+ 188 - 189
src/views/heating/monitor/loopSupervision/index.vue

@@ -1,76 +1,76 @@
 <template>
-	<div class="system-dic-container">
-		<el-card shadow="hover">
-			<div class="system-user-search mb15">
-				<el-form :model="tableData.param" ref="queryRef" :inline="true" label-width="68px">
-					<el-form-item label="" prop="">
-						<el-radio-group v-model="radioValue" size="default">
-							<el-radio-button label="换热站" v-auth="'heatStation'"/>
-							<el-radio-button label="环路" v-auth="'loop'"/>
-						</el-radio-group>
-					</el-form-item>
-					<el-form-item label="环路名称" prop="name">
-						<el-select v-model="tableData.param.name" placeholder="环路名称" clearable size="default" style="width: 240px">
-							<el-option label="已发布" :value="1" />
-							<el-option label="未发布" :value="0" />
-						</el-select>
-					</el-form-item>
-					<el-form-item label="环路编号" prop="name">
-						<el-select v-model="tableData.param.name" placeholder="环路编号" clearable size="default" style="width: 240px">
-							<el-option label="已发布" :value="1" />
-							<el-option label="未发布" :value="0" />
-						</el-select>
-					</el-form-item>
-					<el-form-item>
-						<el-button size="default" type="primary" class="ml10" v-auth="'query'" @click="typeList">
-							<el-icon>
-								<ele-Search />
-							</el-icon>
-							查询
-						</el-button>
-						<el-button size="default" v-auth="'reset'" @click="resetQuery(queryRef)">
-							<el-icon>
-								<ele-Refresh />
-							</el-icon>
-							重置
-						</el-button>
-					</el-form-item>
-				</el-form>
-			</div>
-			<el-table :data="tableData.data" style="width: 100%" @selection-change="handleSelectionChange" v-loading="tableData.loading">
-				<el-table-column type="index" width="55" label="序号" align="center" />
-				<el-table-column label="日期" v-col="'key'" prop="key" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column :label="radioValue === '换热站' ? '换热站' : '环路名称'" v-col="'name'" prop="name" :show-overflow-tooltip="true">
-					<template #default="{ row }">
-						<el-button type="text" @click="goPage(row)">
-							{{ radioValue === '换热站' ? '换热站' : '环路名称' }}
-						</el-button>
-					</template>
-				</el-table-column>
-				<el-table-column :label="radioValue === '换热站' ? '换热站编号' : '环路编号'" v-col="'number'" prop="number" min-width="120" :show-overflow-tooltip="true">
-					<template #default>
-						{{ radioValue === '换热站' ? '换热站编号' : '环路编号' }}
-					</template>
-				</el-table-column>
-				<el-table-column label="一网供水流量" prop="value" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column label="一网供水压力" prop="value" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column label="一网供水温度" prop="value" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column label="一网回水流量" prop="value" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column label="一网回水压力" prop="value" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column label="一网回水温度" prop="value" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column label="二网供水流量" prop="value" min-width="120" :show-overflow-tooltip="true" />
-				<el-table-column label="二网供水压力" prop="value" min-width="120" :show-overflow-tooltip="true" />
+  <div class="system-dic-container">
+    <el-card shadow="hover">
+      <div class="system-user-search mb15">
+        <el-form :model="tableData.param" ref="queryRef" :inline="true" label-width="68px">
+          <el-form-item label="" prop="">
+            <el-radio-group v-model="radioValue" size="default">
+              <el-radio-button label="换热站" v-auth="'heatStation'" />
+              <el-radio-button label="环路" v-auth="'loop'" />
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="环路名称" prop="name">
+            <el-select v-model="tableData.param.name" placeholder="环路名称" clearable size="default" style="width: 240px">
+              <el-option label="已发布" :value="1" />
+              <el-option label="未发布" :value="0" />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="环路编号" prop="name">
+            <el-select v-model="tableData.param.name" placeholder="环路编号" clearable size="default" style="width: 240px">
+              <el-option label="已发布" :value="1" />
+              <el-option label="未发布" :value="0" />
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button size="default" type="primary" class="ml10" v-auth="'query'" @click="typeList">
+              <el-icon>
+                <ele-Search />
+              </el-icon>
+              查询
+            </el-button>
+            <el-button size="default" v-auth="'reset'" @click="resetQuery(queryRef)">
+              <el-icon>
+                <ele-Refresh />
+              </el-icon>
+              重置
+            </el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="tableData.data" style="width: 100%" @selection-change="handleSelectionChange" v-loading="tableData.loading">
+        <el-table-column type="index" width="55" label="序号" align="center" />
+        <el-table-column label="日期" v-col="'key'" prop="key" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column :label="radioValue === '换热站' ? '换热站' : '环路名称'" v-col="'name'" prop="name" :show-overflow-tooltip="true">
+          <template #default="{ row }">
+            <el-button type="text" @click="goPage(row)">
+              {{ radioValue === '换热站' ? '换热站' : '环路名称' }}
+            </el-button>
+          </template>
+        </el-table-column>
+        <el-table-column :label="radioValue === '换热站' ? '换热站编号' : '环路编号'" v-col="'number'" prop="number" min-width="120" :show-overflow-tooltip="true">
+          <template #default>
+            {{ radioValue === '换热站' ? '换热站编号' : '环路编号' }}
+          </template>
+        </el-table-column>
+        <el-table-column label="一网供水流量" prop="value" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column label="一网供水压力" prop="value" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column label="一网供水温度" prop="value" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column label="一网回水流量" prop="value" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column label="一网回水压力" prop="value" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column label="一网回水温度" prop="value" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column label="二网供水流量" prop="value" min-width="120" :show-overflow-tooltip="true" />
+        <el-table-column label="二网供水压力" prop="value" min-width="120" :show-overflow-tooltip="true" />
 
-				<!-- <el-table-column prop="status" label="状态" width="100" align="center">
+        <!-- <el-table-column prop="status" label="状态" width="100" align="center">
           <template #default="scope">
             <el-tag type="success" size="small" v-if="scope.row.status">已发布</el-tag>
             <el-tag type="info" size="small" v-else>未发布</el-tag>
           </template>
         </el-table-column> -->
-			</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-card>
-	</div>
+      </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-card>
+  </div>
 </template>
 
 <script lang="ts">
@@ -82,134 +82,133 @@ import { useRouter } from 'vue-router';
 
 // 定义接口来定义对象的类型
 interface TableDataRow {
-	id: number;
-	name: string;
-	deviceType: string;
-	status: number;
-	desc: string;
-	createBy: string;
+  id: number;
+  name: string;
+  deviceType: string;
+  status: number;
+  desc: string;
+  createBy: string;
 }
 interface TableDataState {
-	ids: number[];
-	tableData: {
-		data: Array<TableDataRow>;
-		total: number;
-		loading: boolean;
-		param: {
-			pageNum: number;
-			pageSize: number;
-			name: string;
-			deviceType: string;
-			status: string;
-			dateRange: string[];
-		};
-	};
+  ids: number[];
+  tableData: {
+    data: Array<TableDataRow>;
+    total: number;
+    loading: boolean;
+    param: {
+      pageNum: number;
+      pageSize: number;
+      name: string;
+      deviceType: string;
+      status: string;
+      dateRange: string[];
+    };
+  };
 }
 
 export default defineComponent({
-	name: 'deviceproduct',
-	setup() {
-		const addDicRef = ref();
-		const editDicRef = ref();
-		const queryRef = ref();
-		const router = useRouter()
-		const state = reactive({
-			radioValue: '换热站',
-			ids: [],
-			tableData: {
-				data: [{ name: '换热站', key: '2022-10-25', value: 1 }],
-				total: 0,
-				loading: false,
-				param: {
-					pageNum: 1,
-					pageSize: 10,
-					status: '',
-					dateRange: [],
-				},
-			},
-		});
-		// 初始化表格数据
-		const initTableData = () => {
-			typeList();
-		};
-		const typeList = () => {
-			state.tableData.loading = true;
-			api.product.getList(state.tableData.param).then((res: any) => {
-				console.log(res);
-				state.tableData.data = res.product;
-				state.tableData.total = res.total;
-			}).finally(() => (state.tableData.loading = false));
-		};
-		// 打开新增产品弹窗
-		const onOpenAddDic = () => {
-			editDicRef.value.openDialog();
-		};
-		// 打开修改产品弹窗
-		const onOpenEditDic = (row: TableDataRow) => {
-			editDicRef.value.openDialog(row);
-		};
-		// 删除产品
-		const onRowDel = (row: TableDataRow) => {
-			let msg = '你确定要删除所选数据?';
-			let ids: number[] = [];
-			if (row) {
-				msg = `此操作将永久删除产品:“${row.name}”,是否继续?`;
-				ids = [row.id];
-			} else {
-				ids = state.ids;
-			}
-			if (ids.length === 0) {
-				ElMessage.error('请选择要删除的数据。');
-				return;
-			}
-			ElMessageBox.confirm(msg, '提示', {
-				confirmButtonText: '确认',
-				cancelButtonText: '取消',
-				type: 'warning',
-			})
-				.then(() => {
-					api.product.delete(ids).then(() => {
-						ElMessage.success('删除成功');
-						typeList();
-					});
-				})
-				.catch(() => { });
-		};
-		// 页面加载时
-		onMounted(() => {
-			// initTableData();
-		});
-		/** 重置按钮操作 */
-		const resetQuery = (formEl: FormInstance | undefined) => {
-			if (!formEl) return;
-			formEl.resetFields();
-			typeList();
-		};
-		// 多选框选中数据
-		const handleSelectionChange = (selection: TableDataRow[]) => {
-			// state.ids = selection.map((item) => item.id);
-		};
+  name: 'deviceproduct',
+  setup() {
+    const addDicRef = ref();
+    const editDicRef = ref();
+    const queryRef = ref();
+    const router = useRouter()
+    const state = reactive({
+      radioValue: '换热站',
+      ids: [],
+      tableData: {
+        data: [{ name: '换热站', key: '2022-10-25', value: 1 }],
+        total: 0,
+        loading: false,
+        param: {
+          pageNum: 1,
+          pageSize: 10,
+          status: '',
+          dateRange: [],
+        },
+      },
+    });
+    // 初始化表格数据
+    const initTableData = () => {
+      typeList();
+    };
+    const typeList = () => {
+      state.tableData.loading = true;
+      api.product.getList(state.tableData.param).then((res: any) => {
+        state.tableData.data = res.product;
+        state.tableData.total = res.total;
+      }).finally(() => (state.tableData.loading = false));
+    };
+    // 打开新增产品弹窗
+    const onOpenAddDic = () => {
+      editDicRef.value.openDialog();
+    };
+    // 打开修改产品弹窗
+    const onOpenEditDic = (row: TableDataRow) => {
+      editDicRef.value.openDialog(row);
+    };
+    // 删除产品
+    const onRowDel = (row: TableDataRow) => {
+      let msg = '你确定要删除所选数据?';
+      let ids: number[] = [];
+      if (row) {
+        msg = `此操作将永久删除产品:“${row.name}”,是否继续?`;
+        ids = [row.id];
+      } else {
+        ids = state.ids;
+      }
+      if (ids.length === 0) {
+        ElMessage.error('请选择要删除的数据。');
+        return;
+      }
+      ElMessageBox.confirm(msg, '提示', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          api.product.delete(ids).then(() => {
+            ElMessage.success('删除成功');
+            typeList();
+          });
+        })
+        .catch(() => { });
+    };
+    // 页面加载时
+    onMounted(() => {
+      // initTableData();
+    });
+    /** 重置按钮操作 */
+    const resetQuery = (formEl: FormInstance | undefined) => {
+      if (!formEl) return;
+      formEl.resetFields();
+      typeList();
+    };
+    // 多选框选中数据
+    const handleSelectionChange = (selection: TableDataRow[]) => {
+      // state.ids = selection.map((item) => item.id);
+    };
 
-		const goPage = (row: TableDataRow) => {
-			if (state.radioValue === '换热站') {
-				router.push('/heating/monitor/loopSupervision/list/heatStationDetail')
-			} else {
-				router.push('/heating/monitor/loopSupervision/list/loopDetail')
-			}
-		}
-		return {
-			addDicRef,
-			editDicRef,
-			queryRef,
-			onOpenAddDic,
-			onOpenEditDic,
-			onRowDel,
-			typeList,
-			resetQuery,
-			handleSelectionChange,
-			...toRefs(state),
-			goPage
-		};
-	},
+    const goPage = (row: TableDataRow) => {
+      if (state.radioValue === '换热站') {
+        router.push('/heating/monitor/loopSupervision/list/heatStationDetail')
+      } else {
+        router.push('/heating/monitor/loopSupervision/list/loopDetail')
+      }
+    }
+    return {
+      addDicRef,
+      editDicRef,
+      queryRef,
+      onOpenAddDic,
+      onOpenEditDic,
+      onRowDel,
+      typeList,
+      resetQuery,
+      handleSelectionChange,
+      ...toRefs(state),
+      goPage
+    };
+  },
 });
 </script>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 569 - 411
src/views/heating/monitor/weather.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 389
src/views/home/index.vue


+ 6 - 0
src/views/iot/network/server/component/list.vue

@@ -64,12 +64,14 @@
             @click="toDetail(scope.row.id)"
             size="small"
             type="text"
+            v-auth="'detail'"
           >详情</el-button>
           <el-button
             size="small"
             link
             key="info"
             type="info"
+            v-auth="'edit'"
             @click="toEdit(scope.row.id)"
           >编辑</el-button>
 
@@ -84,6 +86,7 @@
                 type="text"
                 class="more-btn"
                 @click="isShowMore = !isShowMore"
+                v-auth="'more'"
               >更多
                 <i
                   style="margin-left: 2px;"
@@ -99,6 +102,7 @@
                 size="small"
                 key="success"
                 type="success"
+                v-auth="'on'"
               >启 用</el-button>
               <el-divider direction="vertical" />
               <el-button
@@ -108,6 +112,7 @@
                 size="small"
                 key="warning"
                 type="warning"
+                v-auth="'off'"
               >禁 用</el-button>
               <el-divider direction="vertical" />
               <el-button
@@ -116,6 +121,7 @@
                 size="small"
                 key="danger"
                 type="danger"
+                v-auth="'delete'"
               >删 除</el-button>
             </div>
           </el-popover>

+ 2 - 2
src/views/iot/network/server/index.vue

@@ -6,13 +6,13 @@
             </el-input>
             </el-form-item>
             <el-form-item>
-                <el-button size="default" type="primary" class="ml10" @click="searchData">
+                <el-button size="default" type="primary" class="ml10" v-auth="'query'" @click="searchData">
                     <el-icon>
                         <ele-Search />
                     </el-icon>
                     查询
                 </el-button>
-                <el-button @click="toPage" size="default" type="success" class="ml10">
+                <el-button @click="toPage" size="default" type="success" v-auth="'add'" class="ml10">
                     <el-icon>
                         <ele-FolderAdd />
                     </el-icon>

+ 108 - 108
src/views/iot/rule-engine/send.vue

@@ -1,47 +1,47 @@
 <template>
-	<el-card shadow="hover">
-		<div class="search">
-			<el-form :inline="true">
-				<el-form-item>
-					<!-- <el-button size="default" type="primary" class="ml10" @click="getList(1)">
+  <el-card shadow="hover">
+    <div class="search">
+      <el-form :inline="true">
+        <el-form-item>
+          <!-- <el-button size="default" type="primary" class="ml10" @click="getList(1)">
 							<el-icon>
 								<ele-Search />
 							</el-icon>
 							查询
 						</el-button> -->
-					<el-button type="success" @click="addOrEdit()">
-						<el-icon>
-							<ele-FolderAdd />
-						</el-icon>
-						新增规则编排
-					</el-button>
-				</el-form-item>
-			</el-form>
-		</div>
-		<el-table :data="tableData" style="width: 100%" v-loading="loading">
-			<el-table-column type="index" label="序号" width="80" align="center" />
-			<el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
-			<el-table-column prop="expound" label="说明" show-overflow-tooltip></el-table-column>
-			<el-table-column prop="createdAt" label="创建时间" min-width="100" align="center"></el-table-column>
-			<el-table-column prop="status" label="状态" width="100" align="center">
-				<template #default="scope">
-					<el-tag type="success" size="small" v-if="scope.row.status == 1">已启动</el-tag>
-					<el-tag type="info" size="small" v-else>已停止</el-tag>
-				</template>
-			</el-table-column>
-			<el-table-column label="操作" width="200" align="center">
-				<template #default="scope">
-					<el-button size="small" text type="info" v-if="scope.row.status" @click="setStatus(scope.row, 0)">停止</el-button>
-					<el-button size="small" text type="primary" v-else @click="setStatus(scope.row, 1)">启动</el-button>
-					<el-button size="small" text type="warning" @click="addOrEdit(scope.row)">编辑</el-button>
-					<el-button size="small" text type="warning" @click="edit(scope.row)">规则编辑</el-button>
-					<el-button size="small" text type="danger" @click="onDel(scope.row)">删除</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-		<pagination v-if="params.total" :total="params.total" v-model:page="params.pageNum" v-model:limit="params.pageSize" @pagination="getList()" />
-		<EditForm ref="editFormRef" @getList="getList()" :types="1"></EditForm>
-	</el-card>
+          <el-button type="success" @click="addOrEdit()">
+            <el-icon>
+              <ele-FolderAdd />
+            </el-icon>
+            新增数据转发
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <el-table :data="tableData" style="width: 100%" v-loading="loading">
+      <el-table-column type="index" label="序号" width="80" align="center" />
+      <el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="expound" label="说明" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="createdAt" label="创建时间" min-width="100" align="center"></el-table-column>
+      <el-table-column prop="status" label="状态" width="100" align="center">
+        <template #default="scope">
+          <el-tag type="success" size="small" v-if="scope.row.status == 1">已启动</el-tag>
+          <el-tag type="info" size="small" v-else>已停止</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" width="200" align="center">
+        <template #default="scope">
+          <el-button size="small" text type="info" v-if="scope.row.status" @click="setStatus(scope.row, 0)">停止</el-button>
+          <el-button size="small" text type="primary" v-else @click="setStatus(scope.row, 1)">启动</el-button>
+          <el-button size="small" text type="warning" @click="addOrEdit(scope.row)">编辑</el-button>
+          <el-button size="small" text type="warning" @click="edit(scope.row)">规则编辑</el-button>
+          <el-button size="small" text type="danger" @click="onDel(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-if="params.total" :total="params.total" v-model:page="params.pageNum" v-model:limit="params.pageSize" @pagination="getList()" />
+    <EditForm ref="editFormRef" @getList="getList()" :types="1"></EditForm>
+  </el-card>
 </template>
 
 <script lang="ts" setup>
@@ -58,90 +58,90 @@ const editFormRef = ref();
 const { params, tableData, getList, loading } = useSearch<any[]>(api.getList, 'Data', { types: 1 });
 
 const headers = {
-	Authorization: 'Bearer ' + JSON.parse(sessionStorage.token),
+  Authorization: 'Bearer ' + JSON.parse(sessionStorage.token),
 };
 const flowsUrl = window.location.origin + '/rule-engine/flows';
 
 getList();
 
 const addOrEdit = async (row?: any) => {
-	if (row) {
-		editFormRef.value.open(row);
-		return;
-	} else {
-		editFormRef.value.open();
-	}
+  if (row) {
+    editFormRef.value.open(row);
+    return;
+  } else {
+    editFormRef.value.open();
+  }
 };
 
 const setStatus = async (row: any, status: number) => {
-	// 找到所有规则
-	const { data: flows } = await axios.get(flowsUrl, { headers });
-
-	const flow = flows.find((item: any) => item.id === row.flowId);
-
-	if (!flow) {
-		ElMessage.error('规则不存在');
-		return;
-	}
-
-	// 改变指定规则状态
-	flow.disabled = status ? false : true;
-
-	// 设置规则状态
-	await axios.post(flowsUrl, flows, { headers });
-
-	api
-		.setStatus(row.id, status)
-		.then(() => {
-			ElMessage.success('操作成功');
-			getList();
-		})
-		.catch(() => {
-			ElMessage.error('操作失败');
-		});
+  // 找到所有规则
+  const { data: flows } = await axios.get(flowsUrl, { headers });
+
+  const flow = flows.find((item: any) => item.id === row.flowId);
+
+  if (!flow) {
+    ElMessage.error('规则不存在');
+    return;
+  }
+
+  // 改变指定规则状态
+  flow.disabled = status ? false : true;
+
+  // 设置规则状态
+  await axios.post(flowsUrl, flows, { headers });
+
+  api
+    .setStatus(row.id, status)
+    .then(() => {
+      ElMessage.success('操作成功');
+      getList();
+    })
+    .catch(() => {
+      ElMessage.error('操作失败');
+    });
 };
 
 const edit = async (row: any) => {
-	localStorage.setItem('auth-tokens', `{"access_token":"${Session.get('token')}"}`);
-	// const url = window.location.protocol + '//' + window.location.hostname + ':1880/rule-engine?access_token=' + Session.get('token') + '#flow/' + row.flowId;
-	const url = '/rule-engine/#flow/' + row.flowId;
-	window.open(url);
+  localStorage.setItem('auth-tokens', `{"access_token":"${Session.get('token')}"}`);
+  // const url = window.location.protocol + '//' + window.location.hostname + ':1880/rule-engine?access_token=' + Session.get('token') + '#flow/' + row.flowId;
+  const url = '/rule-engine/#flow/' + row.flowId;
+  window.open(url);
 };
 
 const onDel = (row: any) => {
-	ElMessageBox.confirm(`此操作将删除:“${row.name}”,是否继续?`, '提示', {
-		confirmButtonText: '确认',
-		cancelButtonText: '取消',
-		type: 'warning',
-	}).then(async () => {
-		// 找到所有规则
-		const { data: flows } = await axios.get(flowsUrl, { headers });
-
-		const flowIndex = flows.findIndex((item: any) => item.id === row.flowId);
-
-		if (flowIndex === -1) {
-			ElMessage.error('规则不存在');
-			return;
-		}
-
-		// 删除指定规则
-		flows.splice(flowIndex, 1);
-
-		// 删除当前规则下的各个节点信息
-		const newFlows = flows.filter((item: any) => {
-			if (item.z === row.flowId) {
-				return false;
-			} else {
-				return true;
-			}
-		});
-
-		// 设置规则状态
-		await axios.post(flowsUrl, newFlows, { headers });
-
-		await api.del([row.id as string]);
-		ElMessage.success('删除成功');
-		getList();
-	});
+  ElMessageBox.confirm(`此操作将删除:“${row.name}”,是否继续?`, '提示', {
+    confirmButtonText: '确认',
+    cancelButtonText: '取消',
+    type: 'warning',
+  }).then(async () => {
+    // 找到所有规则
+    const { data: flows } = await axios.get(flowsUrl, { headers });
+
+    const flowIndex = flows.findIndex((item: any) => item.id === row.flowId);
+
+    if (flowIndex === -1) {
+      ElMessage.error('规则不存在');
+      return;
+    }
+
+    // 删除指定规则
+    flows.splice(flowIndex, 1);
+
+    // 删除当前规则下的各个节点信息
+    const newFlows = flows.filter((item: any) => {
+      if (item.z === row.flowId) {
+        return false;
+      } else {
+        return true;
+      }
+    });
+
+    // 设置规则状态
+    await axios.post(flowsUrl, newFlows, { headers });
+
+    await api.del([row.id as string]);
+    ElMessage.success('删除成功');
+    getList();
+  });
 };
 </script>

+ 11 - 62
src/views/login/component/account.vue

@@ -1,22 +1,7 @@
 <template>
-  <el-form
-    ref="loginForm"
-    size="large"
-    class="login-content-form"
-    :model="ruleForm"
-    :rules="formRules"
-  >
-    <el-form-item
-      class="login-animation1"
-      prop="userName"
-    >
-      <el-input
-        type="text"
-        :placeholder="$t('message.account.accountPlaceholder1')"
-        v-model="ruleForm.userName"
-        clearable
-        autocomplete="off"
-      >
+  <el-form ref="loginForm" size="large" class="login-content-form" :model="ruleForm" :rules="formRules">
+    <el-form-item class="login-animation1" prop="userName">
+      <el-input type="text" :placeholder="$t('message.account.accountPlaceholder1')" v-model="ruleForm.userName" clearable autocomplete="off">
         <template #prefix>
           <el-icon class="el-input__icon">
             <ele-User />
@@ -24,46 +9,22 @@
         </template>
       </el-input>
     </el-form-item>
-    <el-form-item
-      class="login-animation2"
-      prop="password"
-    >
-      <el-input
-        :type="isShowPassword ? 'text' : 'password'"
-        :placeholder="$t('message.account.accountPlaceholder2')"
-        v-model="ruleForm.password"
-        autocomplete="off"
-        @keyup.enter="onSignIn"
-      >
+    <el-form-item class="login-animation2" prop="password">
+      <el-input :type="isShowPassword ? 'text' : 'password'" :placeholder="$t('message.account.accountPlaceholder2')" v-model="ruleForm.password" autocomplete="off" @keyup.enter="onSignIn">
         <template #prefix>
           <el-icon class="el-input__icon">
             <ele-Unlock />
           </el-icon>
         </template>
         <template #suffix>
-          <i
-            class="iconfont el-input__icon login-content-password"
-            :class="isShowPassword ? 'icon-yincangmima' : 'icon-xianshimima'"
-            @click="isShowPassword = !isShowPassword"
-          >
+          <i class="iconfont el-input__icon login-content-password" :class="isShowPassword ? 'icon-yincangmima' : 'icon-xianshimima'" @click="isShowPassword = !isShowPassword">
           </i>
         </template>
       </el-input>
     </el-form-item>
-    <el-form-item
-      class="login-animation3"
-      prop="captcha"
-    >
+    <el-form-item class="login-animation3" prop="captcha">
       <el-col :span="15">
-        <el-input
-          type="text"
-          maxlength="4"
-          :placeholder="$t('message.account.accountPlaceholder3')"
-          v-model="ruleForm.captcha"
-          clearable
-          autocomplete="off"
-          @keyup.enter="onSignIn"
-        >
+        <el-input type="text" maxlength="4" :placeholder="$t('message.account.accountPlaceholder3')" v-model="ruleForm.captcha" clearable autocomplete="off" @keyup.enter="onSignIn">
           <template #prefix>
             <el-icon class="el-input__icon">
               <ele-Position />
@@ -74,24 +35,12 @@
       <el-col :span="1"></el-col>
       <el-col :span="8">
         <div class="login-content-code">
-          <img
-            class="login-content-code-img"
-            @click="getCaptcha"
-            width="130"
-            height="38"
-            :src="captchaSrc"
-            style="cursor: pointer"
-          />
+          <img class="login-content-code-img" @click="getCaptcha" width="130" height="38" :src="captchaSrc" style="cursor: pointer" />
         </div>
       </el-col>
     </el-form-item>
     <el-form-item class="login-animation4">
-      <el-button
-        type="primary"
-        class="login-content-submit"
-        @click="onSignIn"
-        :loading="loading.signIn"
-      >
+      <el-button type="primary" class="login-content-submit" @click="onSignIn" :loading="loading.signIn">
         <span>{{ $t('message.account.accountBtnText') }}</span>
       </el-button>
     </el-form-item>
@@ -182,7 +131,7 @@ export default defineComponent({
     const currentUser = async () => {
       api.login.currentUser().then(async (res: any) => {
         // 设置用户菜单
-        Session.set('userMenu', res || []);
+        Session.set('userMenu', res.Data || []);
         store.dispatch('requestOldRoutes/setBackEndControlRoutes', res || []);
         if (!store.state.themeConfig.themeConfig.isRequestRoutes) {
           // 前端控制路由,2、请注意执行顺序

+ 64 - 131
src/views/personal/index.vue

@@ -1,138 +1,71 @@
 <template>
-	<div class="personal">
-		<el-row>
-			<!-- 个人信息 -->
-			<el-col :xs="24" :sm="12">
-				<el-card shadow="hover" header="个人信息">
-					<div class="personal-user">
-						<div class="personal-user-left">
-							<el-upload class="h100 personal-user-left-upload" action="https://jsonplaceholder.typicode.com/posts/" multiple :limit="1">
-								<img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1813762643,1914315241&fm=26&gp=0.jpg" />
-							</el-upload>
-						</div>
-						<div class="personal-user-right">
-							<el-row>
-								<el-col :span="24" class="personal-title mb18">{{ currentTime }},admin,生活变的再糟糕,也不妨碍我变得更好! </el-col>
-								<el-col :span="24">
-									<el-row>
-										<el-col :xs="24" :sm="8" class="personal-item mb6">
-											<div class="personal-item-label">昵称:</div>
-											<div class="personal-item-value">小柒</div>
-										</el-col>
-										<el-col :xs="24" :sm="16" class="personal-item mb6">
-											<div class="personal-item-label">身份:</div>
-											<div class="personal-item-value">超级管理</div>
-										</el-col>
-									</el-row>
-								</el-col>
-								<el-col :span="24">
-									<el-row>
-										<el-col :xs="24" :sm="8" class="personal-item mb6">
-											<div class="personal-item-label">登录IP:</div>
-											<div class="personal-item-value">192.168.1.1</div>
-										</el-col>
-										<el-col :xs="24" :sm="16" class="personal-item mb6">
-											<div class="personal-item-label">登录时间:</div>
-											<div class="personal-item-value">2021-02-05 18:47:26</div>
-										</el-col>
-									</el-row>
-								</el-col>
-							</el-row>
-						</div>
-					</div>
-				</el-card>
-			</el-col>
-
-			<!-- 更新信息 -->
-			<el-col  :xs="24" :sm="12">
-				<el-card shadow="hover" class="mt15 personal-edit" header="更新信息">
-					<div class="personal-edit-safe-box">
-						<div class="personal-edit-safe-item">
-							<div class="personal-edit-safe-item-left">
-								<div class="personal-edit-safe-item-left-label">账户密码</div>
-								<div class="personal-edit-safe-item-left-value">当前密码强度:强</div>
-							</div>
-							<div class="personal-edit-safe-item-right">
-								<el-button type="text">立即修改</el-button>
-							</div>
-						</div>
-					</div>
-					<div class="personal-edit-safe-box">
-						<div class="personal-edit-safe-item">
-							<div class="personal-edit-safe-item-left">
-								<div class="personal-edit-safe-item-left-label">密保手机</div>
-								<div class="personal-edit-safe-item-left-value">已绑定手机:132****4108</div>
-							</div>
-							<div class="personal-edit-safe-item-right">
-								<el-button type="text">立即修改</el-button>
-							</div>
-						</div>
-					</div>
-					<div class="personal-edit-safe-box">
-						<div class="personal-edit-safe-item">
-							<div class="personal-edit-safe-item-left">
-								<div class="personal-edit-safe-item-left-label">密保问题</div>
-								<div class="personal-edit-safe-item-left-value">已设置密保问题,账号安全大幅度提升</div>
-							</div>
-							<div class="personal-edit-safe-item-right">
-								<el-button type="text">立即设置</el-button>
-							</div>
-						</div>
-					</div>
-					<div class="personal-edit-safe-box">
-						<div class="personal-edit-safe-item">
-							<div class="personal-edit-safe-item-left">
-								<div class="personal-edit-safe-item-left-label">绑定QQ</div>
-								<div class="personal-edit-safe-item-left-value">已绑定QQ:110****566</div>
-							</div>
-							<div class="personal-edit-safe-item-right">
-								<el-button type="text">立即设置</el-button>
-							</div>
-						</div>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
-	</div>
+  <div class="personal">
+    <el-row>
+      <!-- 个人信息 -->
+      <el-col :xs="24" :sm="24">
+        <el-card shadow="hover" header="个人信息" v-loading="!info.userName">
+          <div class="personal-user">
+            <div class="personal-user-left">
+              <!-- <el-upload class="h100 personal-user-left-upload" action="https://jsonplaceholder.typicode.com/posts/" multiple :limit="1">
+              <img :src="info.avatar" />
+              </el-upload> -->
+              <uploadVue @set-img="setImg">
+                <img style="width:140px;height:140px" :src="info.avatar" />
+              </uploadVue>
+            </div>
+            <div class="personal-user-right">
+              <el-row>
+                <el-col :span="24" class="personal-title mb18">{{ currentTime }},{{info.userName}},生活变的再糟糕,也不妨碍我变得更好! </el-col>
+                <el-col :xs="24" :sm="24" class="personal-item mb6">
+                  <div class="personal-item-label">昵称:</div>
+                  <div class="personal-item-value">{{info.userNickname}}</div>
+                </el-col>
+                <el-col :xs="24" :sm="24" class="personal-item mb6">
+                  <div class="personal-item-label">性别:</div>
+                  <div class="personal-item-value">{{info.sex=='1'?'男':'女'}}</div>
+                </el-col>
+                <el-col :xs="24" :sm="24" class="personal-item mb6">
+                  <div class="personal-item-label">登录IP:</div>
+                  <div class="personal-item-value">{{info.lastLoginIp}}</div>
+                </el-col>
+                <el-col :xs="24" :sm="24" class="personal-item mb6">
+                  <div class="personal-item-label">登录时间:</div>
+                  <div class="personal-item-value">{{info.lastLoginTime}}</div>
+                </el-col>
+              </el-row>
+            </div>
+          </div>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
 </template>
 
-<script lang="ts">
-import { toRefs, reactive, computed, defineComponent } from 'vue';
+<script lang="ts" setup>
+import { ref, computed } from 'vue';
 import { formatAxis } from '/@/utils/formatTime';
-import { newsInfoList, recommendList } from './mock';
+import { ElMessage } from 'element-plus';
+import api from '/@/api/system';
+import uploadVue from '/@/components/upload-wrapper/index.vue';
 
-// 定义接口来定义对象的类型
-interface PersonalState {
-	newsInfoList: any;
-	recommendList: any;
-	personalForm: any;
-}
+const info = ref<any>({})
+
+api.login.currentUser().then((res: any) => {
+  console.log(res.Info);
+  info.value = res.Info
+});
 
-export default defineComponent({
-	name: 'personal',
-	setup() {
-		const state = reactive<PersonalState>({
-			newsInfoList,
-			recommendList,
-			personalForm: {
-				name: '',
-				email: '',
-				autograph: '',
-				occupation: '',
-				phone: '',
-				sex: '',
-			},
-		});
-		// 当前时间提示语
-		const currentTime = computed(() => {
-			return formatAxis(new Date());
-		});
-		return {
-			currentTime,
-			...toRefs(state),
-		};
-	},
+// 当前时间提示语
+const currentTime = computed(() => {
+  return formatAxis(new Date());
 });
+
+const setImg = (img: string) => {
+  api.user.setAvatar(info.value.id, img).then((res: any) => {
+    ElMessage.success('更新成功')
+    info.value.avatar = img
+  })
+}
 </script>
 
 <style scoped lang="scss">
@@ -143,9 +76,9 @@ export default defineComponent({
 		display: flex;
 		align-items: center;
 		.personal-user-left {
-			width: 100px;
-			height: 130px;
-			border-radius: 3px;
+			// width: 100px;
+			// height: 130px;
+			// border-radius: 3px;
 			::v-deep(.el-upload) {
 				height: 100%;
 			}

+ 14 - 64
src/views/system/api/component/edit.vue

@@ -1,77 +1,26 @@
 <template>
-  <el-dialog
-    class="api-edit"
-    v-model="showDialog"
-    :title="`${formData.id  ?  '编辑接口'  :  '新增接口'}`"
-    width="600px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-  >
-    <el-form
-      ref="formRef"
-      :model="formData"
-      :rules="ruleForm"
-      label-width="80px"
-    >
-      <el-form-item
-        label="关联页面"
-        prop="menuIds"
-      >
-        <el-cascader
-          :options="menuData"
-          :props="{ checkStrictly: false,  multiple:  true,  emitPath: false, value: 'id', label: 'title' }"
-          placeholder="请选择关联页面"
-          clearable
-          class="w100"
-          v-model="formData.menuIds"
-        ></el-cascader>
+  <el-dialog class="api-edit" v-model="showDialog" :title="`${formData.id  ?  '编辑接口'  :  '新增接口'}`" width="600px" :close-on-click-modal="false" :close-on-press-escape="false">
+    <el-form ref="formRef" :model="formData" :rules="ruleForm" label-width="80px">
+      <el-form-item label="关联页面" prop="menuIds">
+        <el-cascader :options="menuData" :props="{ checkStrictly: false,  multiple:  true,  emitPath: false, value: 'id', label: 'title' }" placeholder="请选择关联页面" clearable class="w100" v-model="formData.menuIds"></el-cascader>
       </el-form-item>
-      <el-form-item
-        label="接口名称"
-        prop="name"
-      >
-        <el-input
-          v-model="formData.name"
-          placeholder="输入接口名称"
-        />
+      <el-form-item label="接口名称" prop="name">
+        <el-input v-model="formData.name" placeholder="输入接口名称" />
       </el-form-item>
-      <el-form-item
-        label="接口地址"
-        prop="address"
-      >
-        <el-input
-          v-model="formData.address"
-          placeholder="接口地址"
-        />
+      <el-form-item label="接口地址" prop="address">
+        <el-input v-model="formData.address" placeholder="接口地址" />
       </el-form-item>
-      <el-form-item
-        label="状态"
-        prop="status"
-      >
-        <el-switch
-          v-model="formData.status"
-          :active-value="1"
-          :inactive-value="0"
-        />
+      <el-form-item label="状态" prop="status">
+        <el-switch v-model="formData.status" :active-value="1" :inactive-value="0" />
       </el-form-item>
-      <el-form-item
-        label="备注"
-        prop="remark"
-      >
-        <el-input
-          v-model="formData.remark"
-          type="textarea"
-          :rows="3"
-        />
+      <el-form-item label="备注" prop="remark">
+        <el-input v-model="formData.remark" type="textarea" :rows="3" />
       </el-form-item>
     </el-form>
     <template #footer>
       <div class="dialog-footer">
         <el-button @click="showDialog = false">取消</el-button>
-        <el-button
-          type="primary"
-          @click="onSubmit"
-        >确定</el-button>
+        <el-button type="primary" @click="onSubmit">确定</el-button>
       </div>
     </template>
   </el-dialog>
@@ -94,6 +43,7 @@ const baseForm: ApiRow = {
   menuIds: [],
   id: undefined,
   name: '',
+  types: 2,
   address: '',
   remark: '',
   status: 1,

+ 5 - 3
src/views/system/api/index.vue

@@ -32,7 +32,7 @@
           </el-form-item>
         </el-form>
       </div>
-      <el-table :data="tableData" style="width: 100%" v-loading="loading">
+      <el-table :data="tableData" style="width: 100%" v-loading="loading" row-key="id" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
         <el-table-column type="index" label="序号" width="60" align="center" />
         <el-table-column prop="name" v-col="'name'" label="接口名称" show-overflow-tooltip></el-table-column>
         <el-table-column prop="address" v-col="'address'" label="接口地址" show-overflow-tooltip></el-table-column>
@@ -44,8 +44,10 @@
         </el-table-column>
         <el-table-column label="操作" width="100" align="center" v-col="'handle'">
           <template #default="scope">
-            <el-button size="small" text type="warning" @click="addOrEdit(scope.row)" v-auth="'edit'">修改</el-button>
-            <el-button size="small" text type="danger" @click="onDel(scope.row)" v-auth="'del'">删除</el-button>
+            <template v-if="scope.row.types===2">
+              <el-button size="small" text type="warning" @click="addOrEdit(scope.row)" v-auth="'edit'">修改</el-button>
+              <el-button size="small" text type="danger" @click="onDel(scope.row)" v-auth="'del'">删除</el-button>
+            </template>
           </template>
         </el-table-column>
       </el-table>

+ 2 - 2
src/views/system/city/component/edit.vue

@@ -27,8 +27,8 @@
 					<el-input v-model.number="ruleForm.sort" placeholder="请输入序号" />
 				</el-form-item>
 				<el-form-item label="状态" prop="status">
-					<el-radio v-model="ruleForm.status" :label="1">在线</el-radio>
-					<el-radio v-model="ruleForm.status" :label="0">不在线</el-radio>
+					<el-radio v-model="ruleForm.status" :label="1">启用</el-radio>
+					<el-radio v-model="ruleForm.status" :label="0">禁用</el-radio>
 				</el-form-item>
 			</el-form>
 			<template #footer>

+ 2 - 1
src/views/system/datahub/modeling/index.vue

@@ -42,6 +42,7 @@
         <el-table-column label="ID" align="center" prop="id" width="80" v-col="'id'" />
         <!--				<el-table-column label="模型标识" prop="key" :show-overflow-tooltip="true" />-->
         <el-table-column label="模型名称" prop="name" :show-overflow-tooltip="true" v-col="'name'" />
+        <el-table-column label="描述" prop="desc" :show-overflow-tooltip="true" v-col="'desc'" />
         <el-table-column prop="status" label="状态" width="100" align="center" v-col="'status'">
           <template #default="scope">
             <el-tag type="success" size="small" v-if="scope.row.status==1">已发布</el-tag>
@@ -138,7 +139,7 @@ export default defineComponent({
     };
     // 打开修改模型弹窗
     const onOpenEdit = (row: TableDataRow) => {
-      editDicRef.value.openDialog(row);
+      editDicRef.value.openDialog({ ...row });
     };
     //打开数据记录
     const onOpenRecord = (row: TableDataRow) => {

+ 24 - 3
src/views/system/datahub/source/component/edit.vue

@@ -145,14 +145,16 @@
 					</el-radio-group>
 				</el-form-item>
 
-					<el-form-item label="主机地址" >
+					<div class="inline">
+						<el-form-item label="主机地址" >
 							<el-input v-model="tabconfig.host" placeholder="请输入主机地址"   />
 						</el-form-item>
 
 						<el-form-item label="端口号">
 							<el-input v-model="tabconfig.port" placeholder="请输入端口号" />
 						</el-form-item>
-
+					</div>
+					<div class="inline">
 						<el-form-item label="用户名">
 							<el-input v-model="tabconfig.user" placeholder="请输入用户名" />
 						</el-form-item>
@@ -160,11 +162,27 @@
 						<el-form-item label="密码">
 							<el-input v-model="tabconfig.passwd" placeholder="请输入密码" />
 						</el-form-item>
-
+					</div>
+					
 						<el-form-item label="数据库名称">
 							<el-input v-model="tabconfig.dbName" placeholder="请输入数据库名称" />
 						</el-form-item>
 
+						<el-form-item label="执行方式" prop="type">
+							<el-radio-group v-model="tabconfig.tabtype" >
+								<el-radio label="tab">数据表</el-radio>
+								<el-radio label="sql">Sql</el-radio>
+							
+							</el-radio-group>
+						</el-form-item>
+						
+						<el-form-item label="">
+							<el-input
+								v-model="textarea2"
+								type="textarea"
+							/>
+						</el-form-item>
+
 						<el-form-item label="表名称">
 							<el-input v-model="tabconfig.tableName" placeholder="请输入表名称" />
 						</el-form-item>
@@ -606,6 +624,9 @@ export default defineComponent({
 });
 </script>
 <style>
+.inline{
+	display: inline-flex;
+}
 .el-input__wrapper {
 	width: 98%;
 }

+ 1 - 1
src/views/system/menu/index.vue

@@ -25,7 +25,7 @@
           </el-form-item>
         </el-form>
       </div>
-      <el-table :data="state.menuTableData" default-expand-all style="width: 100%" row-key="path" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" v-loading="state.loading">
+      <el-table :data="state.menuTableData" :default-expand-all="false" style="width: 100%" row-key="path" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" v-loading="state.loading">
         <el-table-column label="菜单名称" show-overflow-tooltip v-col="'title'">
           <template #default="scope">
             <SvgIcon :name="scope.row.icon" />

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.