Просмотр исходного кода

Merge branch 'master' of http://47.111.81.118:3000/yuanMM/ele-usky-admin

fanghuisheng 3 лет назад
Родитель
Сommit
e7ba3dfcb2
31 измененных файлов с 212 добавлено и 326 удалено
  1. 7 0
      .env.development
  2. 7 0
      .env.production
  3. 5 4
      package.json
  4. 10 0
      public/static/config.js
  5. 1 1
      src/api/platManage/index.js
  6. 1 1
      src/api/statisManage/loginLog.js
  7. 3 1
      src/layout/vab-avatar/index.vue
  8. 14 7
      src/main.js
  9. 31 14
      src/store/modules/routes.js
  10. 5 1
      src/utils/request.js
  11. 11 8
      src/vab/plugins/permissions.js
  12. 2 2
      src/views/alarmManage/dialogComponent.vue
  13. 1 1
      src/views/dataManage/energyReport/tables/index.vue
  14. 2 2
      src/views/deviceManage/powerEquip/communicateEquip/index.vue
  15. 10 23
      src/views/perCenter/index.vue
  16. 1 1
      src/views/planOutage/index.vue
  17. 2 2
      src/views/platManage/dialogComponent.vue
  18. 13 6
      src/views/platManage/index.vue
  19. 2 2
      src/views/siteManage/basicInfo/index.vue
  20. 2 2
      src/views/siteManage/camera/index.vue
  21. 2 2
      src/views/siteManage/variableList/index.vue
  22. 2 2
      src/views/siteManage/watchDog/index.vue
  23. 1 1
      src/views/statisManage/loginLog/index.vue
  24. 25 199
      src/views/statisManage/operLog/dialogComponent.vue
  25. 18 27
      src/views/statisManage/operLog/index.vue
  26. 3 3
      src/views/systemManage/userManage/dialogComponent.vue
  27. 1 1
      src/views/tenantManage/adminConfig/index.vue
  28. 1 1
      src/views/tenantManage/authConfig/index.vue
  29. 7 7
      src/views/tenantManage/systemConfig/dialogComponent.vue
  30. 1 1
      src/views/tenantManage/systemConfig/index.vue
  31. 21 4
      src/views/tenantManage/tenantUnit/index.vue

+ 7 - 0
.env.development

@@ -0,0 +1,7 @@
+	// development 开发环境
+	NODE_ENV='development'
+	VUE_APP_ENV = development
+	// 下面的为接口地址。此处/api是我经过webpack设置跨域代理之后的地址
+	VUE_APP_BASE_URL='https://qhome.usky.cn/uskypower/'
+	VUE_APP_IMAGES='https://qhome.usky.cn/uskyfile/'
+	VUE_APP_FILE_URL='https://qhome.usky.cn/uskyfile/'

+ 7 - 0
.env.production

@@ -0,0 +1,7 @@
+// production 生产环境
+NODE_ENV = 'production'
+VUE_APP_ENV = production
+// 下方链接为生产环境接口地址
+VUE_APP_BASE_URL='http://qhome-pro.usky.cn/uskypower/'
+VUE_APP_IMAGES='http://qhome-pro.usky.cn/uskyfile/'
+VUE_APP_FILE_URL='http://qhome-pro.usky.cn/uskyfile/'

+ 5 - 4
package.json

@@ -5,6 +5,8 @@
   "scripts": {
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",
+    "build:development": "vue-cli-service build --mode development",
+    "build:production": "vue-cli-service build --mode production",
     "lint": "vue-cli-service lint",
     "clear": "rimraf node_modules&&npm install --registry=https://registry.npm.taobao.org",
     "use:npm": "nrm use npm",
@@ -27,14 +29,13 @@
     "video.js": "^7.17.0",
     "videojs-contrib-hls": "^5.15.0",
     "vue": "^3.2.18",
-    "vue-grid-layout": "^3.0.0-beta1",
     "vue-amap": "^0.5.10",
+    "vue-grid-layout": "^3.0.0-beta1",
     "vue-router": "^4.0.3",
     "vuex": "^4.0.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "^4.5.9",
-    "@vue/cli-plugin-eslint": "^4.5.9",
     "@vue/cli-service": "^4.5.9",
     "@vue/compiler-sfc": "^3.0.5",
     "@vue/eslint-config-prettier": "^6.0.0",
@@ -42,7 +43,7 @@
     "body-parser": "^1.19.0",
     "chalk": "^4.1.0",
     "chokidar": "^3.5.1",
-    "eslint": "^7.19.0",
+    "eslint": "^8.17.0",
     "eslint-plugin-prettier": "^3.3.1",
     "eslint-plugin-vue": "^7.5.0",
     "filemanager-webpack-plugin": "^3.1.0",
@@ -54,7 +55,7 @@
     "node-sass": "^4.14.1",
     "prettier": "^2.2.1",
     "sass": "^1.42.1",
-    "sass-loader": "^7.1.0",
+    "sass-loader": "^7.3.1",
     "stylelint": "^13.9.0",
     "stylelint-config-prettier": "^8.0.2",
     "stylelint-config-recess-order": "^2.3.0",

+ 10 - 0
public/static/config.js

@@ -1,8 +1,18 @@
 // api 请求路径
+
+
 var PLATFROM_CONFIG = {};
 // PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
 // PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/" //超博本地
 
+// let aUrl = window.location.host
+// let arrUrl = aUrl.split(':')
+
+// alert(arrUrl[0])
+
+// console.log('goooooo' + process.env.VUE_APP_BASE_URL);
+// console.log('goooooo' + process.env.VUE_APP_ENV);
+
 PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/uskypower/" //线上--->测试
 PLATFROM_CONFIG.images = "https://qhome.usky.cn/uskyfile/" //线上图片--->测试
 PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/uskyfile/" //xlsx文件访问路径--->测试

+ 1 - 1
src/api/platManage/index.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-//平台管理-列表查询
+//模板管理-列表查询
 export function getPlatformList(params) {
     return request({
         url: '/sysPlatform/getPlatformList',

+ 1 - 1
src/api/statisManage/loginLog.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-//平台管理-列表查询
+//模板管理-列表查询
 export function getLoginLogList(params) {
     return request({
         url: '/sysLoginLog/getLoginLogList',

+ 3 - 1
src/layout/vab-avatar/index.vue

@@ -116,7 +116,7 @@ export default {
       }
     },
     goAlarmingPage() {
-      this.$router.push('/alarmManage/index')
+      this.$router.push('/alarmManage')
     },
 
      async closeAllTabs() {
@@ -133,6 +133,8 @@ export default {
         // this.$router.push(`/login?redirect=${fullPath}`)
 
         // this.$store.visitedRoutes=[]
+   
+        this.$store.state.homePageUrl=''
 
         this.closeAllTabs()
 

+ 14 - 7
src/main.js

@@ -30,10 +30,8 @@ import VueGridLayout from 'vue-grid-layout'
  * @author chuzhixin 1204505056@qq.com
  * @description 正式环境默认使用mock,正式项目记得注释后再打包
  */
-// if (process.env.NODE_ENV === 'production') {
-//   const { mockXHR } = require('@/utils/static')
-//   mockXHR()
-// }
+
+
 
 var app = createApp(App)
 
@@ -67,15 +65,24 @@ app
     .mount('#app')
 
 
+if (process.env.NODE_ENV === 'production') {
+    // console.log("process.env.NODE_ENV111" + process.env.NODE_ENV)
+
+    // const { mockXHR } = require('@/utils/static')
+    // mockXHR()
+
+    // console.log("process.env.NODE_ENV111 正式环境域名" + process.env.VUE_APP_BASE_URL)
+} else {
+    // console.log("process.env.NODE_ENV111 测试环境域名" + process.env.VUE_APP_BASE_URL)
+}
+
+
 /**
  * @需添加路由拦截 --登录后执行
  */
 
 
 router.beforeEach((to) => {
-
-
-
     if (to.path != '/login') {
         store.commit("publicSiteList");
         store.commit('publicDeviceList')

+ 31 - 14
src/store/modules/routes.js

@@ -53,13 +53,32 @@ const actions = {
             store.state.auth = 1
         }
         data[0].meta.affix = false
-        data[0].children[0].meta.affix = true
+
+
+        //根据首页请求地址动态配置affix的标签项
+        if (store.state.homePageUrl) {
+            data.forEach(function(item) {
+                item.children.forEach(function(aa) {
+                    if (aa.component == store.state.homePageUrl) {
+                        aa.meta.affix = true
+                    }
+                })
+            })
+
+        } else {
+            data[0].children[0].meta.affix = true
+
+        }
+
+
+
+
 
 
         // data.unshift({
-        //     path: "/home",
+        //     path: "/",
         //     hidden: false,
-        //     redirect: "/index/index",
+        //     redirect: "/index",
         //     component: "Layout",
         //     meta: {
         //         title: "数据看板",
@@ -67,11 +86,11 @@ const actions = {
 
         //     },
         //     children: [{
-        //         path: "/index/index",
+        //         path: "index",
         //         hidden: false,
-        //         component: "@/views/index/index",
+        //         component: "@/views/index",
         //         meta: {
-        //             title: "数据看板",
+        //             title: "数据看板1",
         //             icon: "home",
         //             affix: true
 
@@ -80,21 +99,19 @@ const actions = {
         // })
 
 
-
-
         data.push({
             path: "/platManage",
             hidden: false,
             redirect: "/platManage/index",
             component: "Layout",
             meta: {
-                title: "平台管理",
+                title: "模板管理",
                 icon: "platManage",
 
             },
             children: [{
                 meta: {
-                    title: "平台管理",
+                    title: "模板管理",
                     icon: "platManage",
 
                 },
@@ -119,9 +136,9 @@ const actions = {
                     icon: "statisManage",
 
                 },
-                path: "/loginLog",
+                path: "loginLog",
                 hidden: false,
-                component: "@/views/statisManage/loginLog",
+                component: "@/views/statisManage/loginLog/index",
 
             }, {
                 meta: {
@@ -129,9 +146,9 @@ const actions = {
                     icon: "statisManage",
 
                 },
-                path: "/operLog",
+                path: "operLog",
                 hidden: false,
-                component: "@/views/statisManage/operLog",
+                component: "@/views/statisManage/operLog/index",
 
             }]
         })

+ 5 - 1
src/utils/request.js

@@ -52,8 +52,12 @@ const handleCode = (code, msg) => {
  * @author chuzhixin 1204505056@qq.com
  * @description axios初始化
  */
-const baseURL = window.PLATFROM_CONFIG.baseUrl
+// const baseURL = window.PLATFROM_CONFIG.baseUrl
+const baseURL = process.env.VUE_APP_BASE_URL
+    // alert(baseURL)
+    // alert(process.env.VUE_APP_BASE_URL)
     // console.log(baseURL)
+    // const baseURL = process.env.VUE_APP_BASE_URL
 const instance = axios.create({
     baseURL,
     timeout: requestTimeout,

+ 11 - 8
src/vab/plugins/permissions.js

@@ -77,16 +77,19 @@ router.beforeEach(async(to, from, next) => {
                     if (store.state.middleStatus == 1 && store.state.firstMiddleState == true) {
                         next('/middle')
                     } else {
-                        // alert(store.state.homePageUrl)
-                        next(accessRoutes[0].children[0].path)
-                            // if (store.state.homePageUrl) {
-                            //     var pathUrl = (store.state.homePageUrl).slice(8);
-                            //     next(pathUrl)
+                        var aa = (store.state.homePageUrl).slice(7)
+                        var bb = aa.slice(0, -6)
 
-                        // } else {
-                        //     next(accessRoutes[0].children[0].path)
+                        // alert(bb)
 
-                        // }
+                        // 首页请求地址动态配置
+                        if (store.state.homePageUrl) {
+                            var pathUrl = bb
+                            next(pathUrl)
+                        } else {
+                            next(accessRoutes[0].children[0].path)
+
+                        }
 
                     }
 

+ 2 - 2
src/views/alarmManage/dialogComponent.vue

@@ -175,13 +175,13 @@ export default defineComponent({
     const dialogVisible = ref(false)
     const accessToken = ref(store.state.user.accessToken)
     const dialogImageUrl = ref('')
-    const fileImages = ref(window.PLATFROM_CONFIG.images)
+    const fileImages = ref(process.env.VUE_APP_IMAGES)
     const image = ref('')
     const imageFile = ref([])
 
     const dataSet = reactive({
       uploadUrl:
-        window.PLATFROM_CONFIG.baseUrl +
+        process.env.VUE_APP_BASE_URL +
         '/patrolInspectionDevice/pictureUpload',
       fileList: [],
     })

+ 1 - 1
src/views/dataManage/energyReport/tables/index.vue

@@ -127,7 +127,7 @@ export default defineComponent({
             deviceCode: deviceCode.value,
       }).then((requset) => {
         if (requset.status === 'SUCCESS') {
-          window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+          window.location.href = process.env.VUE_APP_FILE_URL + requset.data
           ElMessage.success({
             message: '导出成功',
             type: 'success',

+ 2 - 2
src/views/deviceManage/powerEquip/communicateEquip/index.vue

@@ -242,7 +242,7 @@ export default defineComponent({
     const cloneDialogBool = ref(false)
     const DialogArray = ref([])
 
-    const fileUrl = ref(window.PLATFROM_CONFIG.baseUrl)
+    const fileUrl = ref(process.env.VUE_APP_BASE_URL)
     const fileList = ref([])
     const accessToken = ref(store.state.user.accessToken)
 
@@ -292,7 +292,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_IMAGES + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 10 - 23
src/views/perCenter/index.vue

@@ -79,10 +79,11 @@
         <!-- 修改密码start -->
         <el-tab-pane label="修改密码" name="second">
           <el-form
-            :model="form"
             ref="formInfo2"
-            :rules="rules"
-            label-width="120px"
+              :model="form"
+              class="demo-form-inline"
+              label-width="150px"
+              :rules="rules"
           >
             <el-form-item label="账号" prop="userName">
               <el-input v-model="form.userName" disabled />
@@ -139,8 +140,6 @@ export default defineComponent({
 
     const form = ref([])
     const formInfo = ref(null)
-
-    const form2 = ref([])
     const formInfo2 = ref(null)
 
     const validatePass = (rule, value, callback) => {
@@ -227,7 +226,9 @@ export default defineComponent({
 
     // 保存-修改密码操作
     const submitForm2 = () => {
-      formInfo.value.validate((valid) => {
+      alert(2)
+      formInfo2.value.validate((valid) =>{
+         alert(3)
         if (valid) {
           api
             .updatePwd({
@@ -289,6 +290,7 @@ export default defineComponent({
       activeName,
       form,
       formInfo,
+      formInfo2,
       rules: {
         tenantName: [
           { required: true, message: '请输入分组名称', trigger: 'blur' },
@@ -324,23 +326,8 @@ export default defineComponent({
           { validator: validatePass2, trigger: 'blur', required: true },
         ],
       },
-      form2,
-      formInfo2,
-      rules2: {
-        userName: [{ required: true, message: '请输入账号', trigger: 'blur' }],
-        password: [
-          { required: true, message: '请输入原密码', trigger: 'blur' },
-          { validator: validatePass, trigger: 'blur' },
-        ],
-        newPass: [
-          { required: true, message: '请输入密码', trigger: 'blur' },
-          { validator: validatePass, trigger: 'blur' },
-        ],
-        passAgain: [
-          { required: true, message: '请再次输入密码', trigger: 'blur' },
-          { validator: validatePass2, trigger: 'blur', required: true },
-        ],
-      },
+
+      
     }
   },
 })

+ 1 - 1
src/views/planOutage/index.vue

@@ -342,7 +342,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 2 - 2
src/views/platManage/dialogComponent.vue

@@ -13,7 +13,7 @@
       :rules="rules"
     >
       <el-form-item
-        label="平台名称:"
+        label="模板名称:"
         prop="platformName"
         v-if="dialogTitle == '添加模板'"
       >
@@ -260,7 +260,7 @@ export default defineComponent({
 
       rules: {
         platformName: [
-          { required: true, message: '请输入平台名称', trigger: 'blur' },
+          { required: true, message: '请输入模板名称', trigger: 'blur' },
           {
             min: 1,
             max: 30,

+ 13 - 6
src/views/platManage/index.vue

@@ -4,7 +4,7 @@
     <div class="filter-container mb-10">
       <div class="left">
         <div>
-          <a class="" style="margin-right: 30px">平台管理列表</a>
+          <a class="" style="margin-right: 30px">模板管理列表</a>
           <el-button
             icon="el-icon-plus"
             type="success"
@@ -19,7 +19,7 @@
     <div class="filter-container mb-10">
       <div style="margin-top: 20px">
         <div class="filter-item">
-          平台名称:
+          模板名称:
           <el-input
             v-model="platformName"
             placeholder="请输入内容"
@@ -64,7 +64,7 @@
       <el-table-column type="index" label="序号" width="50px"></el-table-column>
       <el-table-column
         prop="platformName"
-        label="平台名称"
+        label="模板名称"
       ></el-table-column>
       <el-table-column
         prop="tenantCount"
@@ -73,7 +73,15 @@
       <el-table-column
         prop="createTime"
         label="创建时间"
-      ></el-table-column>
+      >
+
+      <template #default="scope">
+         <span>
+           {{scope.row.createTime}}
+         </span>
+        </template>
+      
+      </el-table-column>
      
 
   
@@ -86,7 +94,6 @@
           >
             编辑
           </el-button>
-          
         </template>
       </el-table-column>
     </el-table>
@@ -304,7 +311,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 2 - 2
src/views/siteManage/basicInfo/index.vue

@@ -250,7 +250,7 @@ export default defineComponent({
     activeName: String,
   },
   setup(props, context) {
-    const fileImages = ref(window.PLATFROM_CONFIG.images)
+    const fileImages = ref(process.env.VUE_APP_IMAGES)
     const store = useStore()
     const isDisable = ref(false)
     const routeDropData = ref([])
@@ -276,7 +276,7 @@ export default defineComponent({
 
     const dataSet = reactive({
       uploadUrl:
-        window.PLATFROM_CONFIG.baseUrl +
+        process.env.VUE_APP_BASE_URL +
         '/patrolInspectionDevice/pictureUpload',
       // uploadUrl:'https://wx.ewoogi.com/USKYOF/USKYOF.php/Home/MonitoringReporting/setUpload',
       fileList: [],

+ 2 - 2
src/views/siteManage/camera/index.vue

@@ -223,7 +223,7 @@ export default defineComponent({
     const tableItem = reactive([])
     const dialogTitle = ref('')
 
-    const fileUrl = ref(window.PLATFROM_CONFIG.baseUrl)
+    const fileUrl = ref(process.env.VUE_APP_BASE_URL)
     const fileList = ref([])
     const accessToken = ref(store.state.user.accessToken)
     const labelCom = ref(store.state.siteManageLabelCom)
@@ -377,7 +377,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_IMAGES + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 2 - 2
src/views/siteManage/variableList/index.vue

@@ -221,7 +221,7 @@ export default defineComponent({
     const showDialog = ref(false)
     const dialogTitle = ref('')
 
-    const fileUrl = ref(window.PLATFROM_CONFIG.baseUrl)
+    const fileUrl = ref(process.env.VUE_APP_BASE_URL)
     const fileList = ref([])
     const accessToken = ref(store.state.user.accessToken)
 
@@ -408,7 +408,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_IMAGES + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 2 - 2
src/views/siteManage/watchDog/index.vue

@@ -189,7 +189,7 @@ export default defineComponent({
   setup(props, { emit }) {
     const store = useStore()
     store
-    const fileUrl = ref(window.PLATFROM_CONFIG.baseUrl)
+    const fileUrl = ref(process.env.VUE_APP_BASE_URL)
     const fileList = ref([])
     const accessToken = ref(store.state.user.accessToken)
 
@@ -352,7 +352,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_IMAGES + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 1 - 1
src/views/statisManage/loginLog/index.vue

@@ -372,7 +372,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 25 - 199
src/views/statisManage/operLog/dialogComponent.vue

@@ -15,48 +15,46 @@
     >
       <el-row>
         <el-col :span="12" :gutter="20">
-          <el-form-item label="操作模块:" prop="tenantName">
-            <el-input v-model="form.tenantName"></el-input>
+          <el-form-item label="操作模块:" prop="title">
+            <el-input v-model="form.title"></el-input>
           </el-form-item>
-          <el-form-item label="登录信息:" prop="tenantManager">
+          <!-- <el-form-item label="登录信息:" prop="tenantManager">
             <el-input v-model="form.tenantManager"></el-input>
+          </el-form-item> -->
+            <el-form-item label="请求方法:" prop="requestMethod">
+            <el-input v-model="form.requestMethod"></el-input>
           </el-form-item>
 
         </el-col>
         <el-col :span="12" :gutter="20">
-           <el-form-item label="请求地址:" prop="phoneNumber">
-            <el-input v-model="form.phoneNumber"></el-input>
-          </el-form-item>
-           <el-form-item label="请求方法:" prop="address">
-            <el-input v-model="form.address"></el-input>
+           <el-form-item label="请求地址:" prop="operUrl">
+            <el-input v-model="form.operUrl"></el-input>
           </el-form-item>
+         
           
          
         </el-col>
       </el-row>
 
     
-      <el-form-item label="操作方法:" prop="remark">
+      <el-form-item label="操作方法:" prop="method">
         <el-input
-          v-model="form.remark"
+          v-model="form.method"
           type="text"
-          placeholder="请输入..."
           style="width: 670px"
         />
       </el-form-item>
-      <el-form-item label="请求参数:" prop="remark">
+      <el-form-item label="请求参数:" prop="operParam">
         <el-input
-          v-model="form.remark"
+          v-model="form.operParam"
           type="text"
-          placeholder="请输入..."
           style="width: 670px"
         />
       </el-form-item>
-      <el-form-item label="返回参数:" prop="remark">
+      <el-form-item label="返回参数:" prop="jsonResult">
         <el-input
-          v-model="form.remark"
+          v-model="form.jsonResult"
           type="text"
-          placeholder="请输入..."
           style="width: 670px"
         />
       </el-form-item>
@@ -66,14 +64,14 @@
           <el-form-item label="操作状态:" prop="status">
             <el-select v-model="form.status" placeholder="请选择">
               <el-option label="正常" :value="0"></el-option>
-              <el-option label="停用" :value="1"></el-option>
+              <el-option label="异常" :value="1"></el-option>
             </el-select>
           </el-form-item>
 
         </el-col>
         <el-col :span="12" :gutter="20">
-           <el-form-item label="操作时间:" prop="phoneNumber">
-            <el-input v-model="form.phoneNumber"></el-input>
+           <el-form-item label="操作时间:" prop="operTime">
+            <el-input v-model="form.operTime"></el-input>
           </el-form-item>
           <!-- <el-form-item label="有效期限:" prop="tenantTerm">
             <el-radio-group v-model="form.tenantTerm">
@@ -97,21 +95,20 @@
       <br />
 
       <div style="text-align: right">
-        <el-button @click="closeDialog(0)">取消</el-button>
-        <el-button type="primary" @click="submitForm()">保存</el-button>
+        <el-button @click="closeDialog(0)">关闭</el-button>
       </div>
     </el-form>
   </el-dialog>
 </template>
 <script>
 // 地图
-import AMap from 'AMap'
+// import AMap from 'AMap'
 import { useStore } from 'vuex'
 import { defineComponent, ref, watchEffect, onMounted } from 'vue'
-import * as api from '@/api/tenantManage/tenantUnit.js'
-import { ElMessage } from 'element-plus'
+// import * as api from '@/api/tenantManage/tenantUnit.js'
+// import { ElMessage } from 'element-plus'
 // import { parseTime } from '@/utils'
-import { validatorPhone, parseTime, isEmail } from '@/utils'
+// import { validatorPhone, parseTime, isEmail } from '@/utils'
 
 export default defineComponent({
   name: 'DialogComponent',
@@ -149,94 +146,13 @@ export default defineComponent({
       return time.getTime() < Date.now()
     }
 
-    // 保存操作
-    const submitForm = () => {
-      formInfo.value.validate((valid) => {
-        if (valid) {
-          var aa = form.value
-          if (aa.tenantTerm == 3) {
-            aa.tenantTerm = '永久有效'
-          }
-          if (aa.tenantTerm == 4) {
-            if (!form.value.value1) {
-              ElMessage.warning('请选择日期')
-              return
-            }
-            aa.tenantTerm = form.value.value1
-
-            parseTime
-
-            aa.tenantTerm
-              ? (aa.tenantTerm = parseTime(aa.tenantTerm).substring(0, 10))
-              : ''
-          }
-
-          if (props.dialogTitle === '新增') {
-            api.addTenantData(form.value).then((requset) => {
-              if (requset.status === 'SUCCESS') {
-                ElMessage.success({
-                  message: '新增成功',
-                  type: 'success',
-                })
-                closeDialog()
-              } else {
-                ElMessage.error(requset.msg)
-              }
-            })
-          } else {
-            api.updateTenantData(form.value).then((requset) => {
-              if (requset.status === 'SUCCESS') {
-                ElMessage.success({
-                  message: '修改成功',
-                  type: 'success',
-                })
-                closeDialog()
-              } else {
-                ElMessage.error(requset.msg)
-              }
-            })
-          }
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    }
     const marker = ref([])
 
-    function initMap() {
-      // AMap start
-      var map = new AMap.Map('mapF', {
-        resizeEnable: true,
-      })
-      //为地图注册click事件获取鼠标点击出的经纬度坐标
-
-      var marker = new AMap.Marker({})
-      map.on('click', function (e) {
-                form.value.geoPosition = e.lnglat.getLng() + ',' + e.lnglat.getLat()
-
-        map.remove([marker])
-        marker = new AMap.Marker({
-          position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
-        })
-
-        map.add([marker])
-
-      })
-      // AMap end
-    }
-
     const open = () => {
-      // initMap()
-      setTimeout(function () {
-        initMap()
-      }, 10)
-
       form.value = props.itemInfo
       console.log('form.value')
       console.log(form.value)
 
-      optionselect()
     }
 
     // 关闭弹框
@@ -250,43 +166,23 @@ export default defineComponent({
       formInfo.value.resetFields()
     }
 
-    //角色下拉请求
-    function optionselect() {
-      api.getPlatformBoxList().then((requset) => {
-        if (requset.status === 'SUCCESS') {
-          getPlatformBoxList.value = requset.data
-        } else {
-          ElMessage.error(requset.msg)
-        }
-      })
-    }
-
     watchEffect((fn, options) => {
       fn, options
       showDialog.value = props.show_Dialog
     })
 
-    //禁止选择以前的时间
-    const pickerEndDate = (time) => {
-      const timeRange = 1 * 24 * 60 * 60 * 1000
-      return time.getTime() <= Date.now() - timeRange * 1
-    }
-
     onMounted(() => {})
 
     return {
-      pickerEndDate,
       roleValid,
-      submitForm,
       closeDialog,
       open,
 
-      // map123,
       store,
       beginTime,
       showDialog,
 
-      initMap,
+   
       nowDate,
       disabledDate,
       marker,
@@ -297,77 +193,7 @@ export default defineComponent({
       getPlatformBoxList,
 
       rules: {
-        tenantName: [
-          { required: true, message: '请输入租户名称', trigger: 'blur' },
-          {
-            min: 1,
-            max: 30,
-            message: '长度在 1 到 30个字符',
-            trigger: 'blur',
-          },
-        ],
-        tenantManager: [
-          { required: true, message: '请输入租户负责人', trigger: 'blur' },
-          {
-            min: 1,
-            max: 10,
-            message: '长度在 1 到 10个字符',
-            trigger: 'blur',
-          },
-        ],
-        tenantTerm: [
-          { required: true, message: '请选择有效期限', trigger: 'change' },
-        ],
-        status: [{ required: true, message: '请选择状态', trigger: 'change' }],
-        geoPosition: [
-          { required: true, message: '请选输入地理位置', trigger: 'blur' },
-        ],
-
-        tenantType: [
-          { required: true, message: '请输入租户类型', trigger: 'blur' },
-        ],
-        phoneNumber: [
-          {
-            required: true,
-            message: '请输入负责人手机号码',
-            trigger: 'blur',
-          },
-          {
-            validator: validatorPhone,
-            message: '输入的电话号码不正确',
-            trigger: 'blur',
-          },
-        ],
-        systemName: [
-          { required: true, message: '请选择系统平台', trigger: 'blur' },
-        ],
-        email: [
-          { required: true, message: '请输入邮箱地址', trigger: 'blur' },
-
-          {
-            validator: isEmail,
-            message: '输入的邮箱地址不正确',
-            trigger: 'blur',
-          },
-        ],
-        address: [
-          { required: true, message: '请输入联系地址', trigger: 'blur' },
-          {
-            min: 1,
-            max: 30,
-            message: '长度在 1 到 30个字符',
-            trigger: 'blur',
-          },
-        ],
-        domain: [
-          { required: true, message: '请输入域名地址', trigger: 'blur' },
-          {
-            min: 1,
-            max: 250,
-            message: '长度在 1 到 250个字符',
-            trigger: 'blur',
-          },
-        ],
+      
       },
     }
   },

+ 18 - 27
src/views/statisManage/operLog/index.vue

@@ -132,13 +132,14 @@
       <template #default="scope">
           <span>
             {{
-              scope.row.status === '0'
-                ? '其他'
-                : '1'
-                ? '新增'
-                : '2'
-                ? '修改'
-                : '删除'
+           
+                scope.row.businessType == 0
+          ? '其他'
+          : scope.row.businessType == 1
+          ? '新增'
+          : scope.row.businessType == 2
+          ? '修改'
+          : '删除'
             }}
           </span>
         </template>
@@ -170,10 +171,10 @@
         <template #default="scope">
           <span
             :style="{
-              color: scope.row.status == '0' ? '#8DCF6E' : '#FF747B',
+              color: scope.row.status == 0 ? '#8DCF6E' : '#FF747B',
             }"
           >
-            {{ scope.row.status === '0' ? '正常' : '异常' }}
+            {{ scope.row.status ==0 ? '正常' : '异常' }}
           </span>
         </template>
       </el-table-column>
@@ -291,25 +292,14 @@ export default defineComponent({
     }
     // 编辑操作
     const editRow = (row) => {
+      console.log('row')
       console.log(row)
-      tableItem.value = {
-        id: row.id,
-        tenantName: row.tenantName,
-        tenantManager: row.tenantManager,
-        tenantTerm: row.tenantTerm == '永久有效' ? 3 : 4,
-        value1: row.tenantTerm,
-        status: Number(row.status),
-        geoPosition: row.geoPosition,
-        tenantType: Number(row.tenantType),
-        phoneNumber: row.phoneNumber,
-        systemName: Number(row.systemName),
-        email: row.email,
-        address: row.address,
-        remark: row.remark,
-        domain: row.domain,
-      }
+      tableItem.value=row
+   
       dialogTitle.value = '操作日志详情'
       showDialog.value = true
+
+      // Select(row.operId)
     }
 
     // 关闭操作
@@ -343,7 +333,7 @@ export default defineComponent({
     }
 
     //查询设备列表
-    function Select() {
+    function Select(params) {
       store.commit('TimeAll_function', dateTime.value)
       const time = store.state.Time_Data
       api
@@ -356,6 +346,7 @@ export default defineComponent({
           title: title.value,
           operName: operName.value,
           businessType: businessType.value,
+          operId:params
 
           
 
@@ -426,7 +417,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 3 - 3
src/views/systemManage/userManage/dialogComponent.vue

@@ -306,9 +306,9 @@ export default defineComponent({
         password: [
           { required: true, message: '请输入密码', trigger: 'blur' },
           {
-            min: 3,
-            max: 6,
-            message: '长度在 3 到 6 个字符',
+            min: 6,
+            max: 25,
+            message: '长度在 6 到 25 个字符',
             trigger: 'blur',
           },
         ],

+ 1 - 1
src/views/tenantManage/adminConfig/index.vue

@@ -286,7 +286,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 1 - 1
src/views/tenantManage/authConfig/index.vue

@@ -391,7 +391,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 7 - 7
src/views/tenantManage/systemConfig/dialogComponent.vue

@@ -339,7 +339,7 @@ export default defineComponent({
 
     const dataSet = reactive({
       uploadUrl:
-        window.PLATFROM_CONFIG.baseUrl +
+        process.env.VUE_APP_BASE_URL +
         '/patrolInspectionDevice/pictureUpload',
       fileList: [],
     })
@@ -358,22 +358,22 @@ export default defineComponent({
 
     //上传成功的回调
     function handleUpAvatar(res) {
-      form.value.homeLogo = window.PLATFROM_CONFIG.fileUrl + res.data
+      form.value.homeLogo = process.env.VUE_APP_IMAGES + res.data
     }
     function handleUpAvatar2(res) {
-      form.value.loginLogo = window.PLATFROM_CONFIG.fileUrl + res.data
+      form.value.loginLogo = process.env.VUE_APP_IMAGES + res.data
     }
     function handleUpAvatar22(res) {
-      form.value.loginBackUrl = window.PLATFROM_CONFIG.fileUrl + res.data
+      form.value.loginBackUrl = process.env.VUE_APP_IMAGES + res.data
     }
     function handleUpAvatar222(res) {
-      form.value.labelIcon = window.PLATFROM_CONFIG.fileUrl + res.data
+      form.value.labelIcon = process.env.VUE_APP_IMAGES + res.data
     }
     function handleUpAvatar3(res) {
-      form.value.middleLogo = window.PLATFROM_CONFIG.fileUrl + res.data
+      form.value.middleLogo = process.env.VUE_APP_IMAGES + res.data
     }
     function handleUpAvatar33(res) {
-      form.value.middleBackUrl = window.PLATFROM_CONFIG.fileUrl + res.data
+      form.value.middleBackUrl = process.env.VUE_APP_IMAGES + res.data
     }
 
     function handleRemove() {

+ 1 - 1
src/views/tenantManage/systemConfig/index.vue

@@ -316,7 +316,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',

+ 21 - 4
src/views/tenantManage/tenantUnit/index.vue

@@ -55,7 +55,7 @@
           ></el-input>
         </div>
         <div class="filter-item">
-          试用租户/正式租户:
+          客户类型:
           <el-select
             v-model="tenantType"
             placeholder="请选择"
@@ -63,8 +63,8 @@
             clearable
             :disabled="store.state.authorities.indexOf('查询') == -1"
           >
-            <el-option label="试用户" :value="0"></el-option>
-            <el-option label="正式户" :value="1"></el-option>
+            <el-option label="试用户" :value="0"></el-option>
+            <el-option label="正式户" :value="1"></el-option>
           </el-select>
         </div>
         <div class="filter-item">
@@ -138,6 +138,21 @@
             {{ scope.row.tenantType === '0' ? '试用客户' : '正式客户' }}
           </span>
         </template>
+      </el-table-column>
+      <el-table-column
+        prop="domain"
+        label="域名"
+        min-width="200px"
+      >
+
+      <template #default="scope">
+          <a  target="_blank" :href='`http://${scope.row.domain}`'> 
+            {{ scope.row.domain}}
+          </a>
+        </template>
+
+      
+      
       </el-table-column>
       <el-table-column
         prop="tenantTerm"
@@ -320,6 +335,8 @@ export default defineComponent({
         }
       })
     }
+
+ 
     //是否删除  ---- 否
     const cancelEvent = () => {
       console.log('cancel!')
@@ -405,7 +422,7 @@ export default defineComponent({
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            window.location.href = process.env.VUE_APP_FILE_URL + requset.data
             ElMessage.success({
               message: '导出成功',
               type: 'success',