all před 5 roky
rodič
revize
90b343716c

+ 15 - 4
frontend_web/.env

@@ -1,14 +1,25 @@
-# 所有环境默认
+# 开发环境
 
 # 页面 title 前缀
 VUE_APP_TITLE=Lims
 
+# 登录验证地址
+VUE_APP_LOGINAPI=http://192.168.0.252:12005/login
+VUE_APP_LOGOUTAPI=http://192.168.0.252:12005/logout
+
 # 网络请求公用地址
-VUE_APP_API=/api/
+#VUE_APP_API=http://39.98.34.197:9905/api/
+VUE_APP_API=http://192.168.0.252:12005/api/
+#VUE_APP_API=http://localhost:9635/api/
+
+# 第二后端API地址
+#VUE_APP_API02=http://39.98.34.197:9915/api/
+VUE_APP_API02=http://192.168.0.252:12002/api/
+#VUE_APP_API02=http://127.0.0.1:9635/api/
 
 # 分模块地址
 VUE_APP_MODULE01=http://localhost:8081/#
 VUE_APP_MODULE02=http://localhost:8082/#
 
-# 仓库地址
-VUE_APP_REPO=https://github.com/d2-projects/d2-admin-start-kit
+# 租户
+VUE_APP_TENANT=CU6zmPWhZp

+ 113 - 0
frontend_web/src/views/demo/page1/components/informationInfoDialog.vue

@@ -0,0 +1,113 @@
+<template>
+  <el-dialog title="信息发布"
+             :visible.sync="dialogvisible"
+             @opened="dialogOpen"
+             @closed="dialogClose"
+             width="50%">
+    <el-form size="mini"
+             :model="information"
+             :rules="rulesinformationForm"
+             label-width="100px"
+             ref="informationForm">
+      <el-row :gutter="24">
+        <el-col :span="24">
+          <el-form-item label="信息标题:"
+                        prop="title"
+                        label-width="120px">
+            <span style="float:left;font-size:20px">{{information.title}}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="信息内容:"
+                        label-width="120px">
+            <span style="float:left;font-size:20px">{{information.content}}</span>
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+    </el-form>
+    <span slot="footer">
+      <!-- <el-button size="mini"
+                 @click="save(0)">保存草稿</el-button>
+      <el-button size="mini"
+                 type="primary"
+                 @click="save(1)">发布</el-button> -->
+
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+
+import InformationApi from '@/api/information'
+export default {
+  name: 'informationDialog',
+  props: {
+    informationId: Number
+  },
+  data () {
+    return {
+      dialogvisible: false,
+      information: {},
+      rulesinformationForm: {
+        title: [{
+          required: true,
+          message: '请输入信息标题',
+          trigger: 'blur'
+        }],
+        content: [{
+          required: true,
+          message: '请输入信息内容',
+          trigger: 'blur'
+        }]
+      }
+    }
+  },
+  created () {
+    this.getData()
+  },
+  methods: {
+    dialogOpen () {
+      this.information = {}
+      this.$refs.informationForm.resetFields()
+      this.getData()
+    },
+    dialogClose () {
+      this.information = {}
+      this.$refs.informationForm.resetFields()
+      this.$emit('handleClose')
+      this.dialogVisible = false
+    },
+    save (flag) {
+      this.$refs.informationForm.validate(valid => {
+        if (valid) {
+          this.information.status = flag
+          InformationApi.save(this.information, {})
+            .then(res => {
+              this.$emit('handleClose')
+              this.dialogvisible = false
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    getData () {
+      if (this.informationId > 0) {
+        var id = {
+          id: this.informationId
+        }
+        InformationApi.getById(id)
+          .then(res => {
+            this.information = res
+          })
+      }
+    }
+  }
+}
+</script>

+ 21 - 8
frontend_web/src/views/demo/page1/index.vue

@@ -30,6 +30,7 @@
                   :data="activities"
                   border
                   fit
+                  @row-click="openDetails"
                   tooltip-effect="dark"
                   style="width: 100%;margin: 5px;"
                   height="280px">
@@ -258,6 +259,12 @@
         </el-pagination>
       </el-card>
     </el-row>
+
+    <!-- 信息发布 -->
+    <informationInfoDialog ref="informationDialog"
+                           @handleClose="handleClose"
+                           :informationId="informationId"
+                           width="75"></informationInfoDialog>
   </d2-container>
 </template>
 
@@ -267,11 +274,11 @@ import ClassApi from '@/api/class'
 import InformationApi from '@/api/information'
 import CourseApi from '@/api/course'
 import DutyApi from '@/api/duty'
-// import informationInfoDialog from './components/informationInfoDialog'
+import informationInfoDialog from './components/informationInfoDialog'
 export default {
   name: 'informationIndex',
   components: {
-    // informationInfoDialog
+    informationInfoDialog
   },
   data () {
     return {
@@ -328,11 +335,17 @@ export default {
     this.initDatas()
     this.initDatasCourse()
     this.initSelectYear()
-    this.initDatas_duty()
+    // this.initDatas_duty()
     this.initDatas_class()
     this.getTerm()
   },
   methods: {
+    openDetails (row) {
+      this.informationId = row.id
+      this.$refs.informationDialog.dialogvisible = true
+      console.log('-----row--', row)
+    },
+
     // 获取字典表
     getTerm () {
       itemDetailApi.getItemDetailByItemCode({ ItemCode: 'Term' })
@@ -412,11 +425,11 @@ export default {
     openinformationadd () {
       this.$refs.informationDialog.dialogvisible = true
     },
-    // 打开 编辑弹窗
-    informationedit (informationId) {
-      this.informationId = informationId
-      this.$refs.informationDialog.dialogvisible = true
-    },
+    // // 打开 编辑弹窗
+    // informationedit (informationId) {
+    //   this.informationId = informationId
+    //   this.$refs.informationDialog.dialogvisible = true
+    // },
     // 新增修改弹窗关闭 返回页面
     handleClose () {
       this.informationId = -1

+ 2 - 9
frontend_web/src/views/managingrooms/index.vue

@@ -90,13 +90,13 @@
                      style="margin-left:5px"
                      icon="el-icon-delete"
                      circle></el-button>
-          <!-- <el-button size="mini"
+          <el-button size="mini"
                      @click="openRoleUserDialog(scope.row)"
                      type="warning"
                      title="设备关联"
                      style="margin-left:5px"
                      icon="el-icon-star-off"
-                     circle></el-button> -->
+                     circle></el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -228,13 +228,6 @@ export default {
         Order: this.Column.Order,
         Prop: this.Column.Prop
       }
-      if (this.CreateOn && this.CreateOn.length === 2) {
-        let params2 = {
-          CreateOnstart: this.CreateOn[0] / 1000,
-          CreateOnend: this.CreateOn[1] / 1000
-        }
-        params = Object.assign(params2)
-      }
       searchmanagingroomdata(params)
         .then(function (response) {
           console.log('------searchmanagingroomdata---', response)

+ 2 - 0
frontend_web/vue.config.js

@@ -10,6 +10,8 @@ process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')
 
 // 基础路径 注意发布之前要先修改这里
 let publicPath = '/'
+// 基础路径 打包时使用
+// let publicPath = './'
 
 module.exports = {
   publicPath, // 根据你的实际情况更改这里