shaogen1995 3 tahun lalu
induk
melakukan
038743d93a

+ 0 - 205
houtai/src/components/Tab5DialogThree.vue

@@ -1,205 +0,0 @@
-<template>
-  <div class="Tab5DialogThree">
-    <el-dialog
-      :title="ruleForm.id ? '修改' : '新增'"
-      :visible="isShow"
-      @close="btnX()"
-    >
-      <el-form
-        :model="ruleForm"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
-        <el-form-item label="年份:" prop="year">
-          <el-input v-model="ruleForm.year" style="width:500px"></el-input>
-        </el-form-item>
-        <!-- 图片和附件 -->
-        <el-form-item label="进度图片:">
-          <i class="biaoshi"></i>
-          <el-upload
-            class="avatar-uploader"
-            :action="baseURL + '/cms/site/img/upload'"
-            :headers="{
-              token,
-            }"
-            :show-file-list="false"
-            :before-upload="beforethumbUpload"
-            :on-success="upload_thumb_success"
-          >
-            <div v-if="ruleForm.thumb" class="imgdiv">
-              <img
-                style="width: 100%; height: 100%"
-                :src="baseURL + ruleForm.thumb"
-              />
-              <i
-                class="el-icon-circle-close"
-                @click.stop="ruleForm.thumb = ''"
-              ></i>
-            </div>
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-          </el-upload>
-          <span>格式要求:支持png、jpg、gif和jpeg的图片格式;最大支持5M。</span>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="btnX">取 消</el-button>
-        <el-button type="primary" @click="btnOk">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { videoDetailById3, siteImgSave } from '@/apis/tab5'
-
-import axios from '@/utils/request'
-export default {
-  name: 'Tab5DialogThree',
-  props: {
-    isShow: {
-      type: Boolean,
-      default: false
-    }
-  },
-  components: {},
-  data () {
-    return {
-      // 服务器前缀地址
-      baseURL: '',
-      token: '',
-      ruleForm: {
-        id: '',
-        thumb: '',
-        year: ''
-      },
-      rules: {
-        year: [{ required: true, message: '不能为空', trigger: 'blur' }]
-      }
-    }
-  },
-  computed: {},
-  watch: {
-
-  },
-  methods: {
-    // 点击关闭
-    btnX () {
-      this.$emit('update:isShow', false)
-      // 清空表单
-      this.ruleForm = {
-        id: '',
-        thumb: '',
-        year: ''
-      }
-      // 关闭验证
-      this.$refs.ruleForm.resetFields()
-    },
-    // 点击确定
-    async btnOk () {
-      if (this.ruleForm.thumb === '') { return this.$message.warning('封面图片不能为空') }
-      if (this.ruleForm.year.trim() === '') { return this.$message.warning('年份不能为空') }
-      const obj = { ...this.ruleForm }
-      const res = await siteImgSave(obj)
-      if (res.code === 0) {
-        this.$message.success('操作成功')
-        // 通知父组件刷新页面
-        this.$emit('refresh')
-        this.btnX()
-      } else return this.$message.warning(res.msg)
-      // console.log(998, res)
-    },
-    // 上传图片
-    beforethumbUpload (file) {
-      // console.log(998, file)
-      // 限制图片大小和格式
-      const sizeOk = file.size / 1024 / 1024 < 5
-      const typeOk =
-        file.type === 'image/png' ||
-        (file.type === 'image/jpeg' && !file.name.includes('.jfif')) ||
-        file.type === 'image/gif'
-
-      return new Promise((resolve, reject) => {
-        if (!typeOk) {
-          this.$message.error('照片格式有误!')
-          reject(file)
-        } else if (!sizeOk) {
-          this.$message.error('照片大小超过5M!')
-          reject(file)
-        } else if (file.name.length > 32) {
-          this.$message.error('照片名字不能超过32个字!')
-          reject(file)
-        } else {
-          this.$message.success('上传成功')
-          resolve(file)
-        }
-      })
-    },
-    upload_thumb_success (data) {
-      // console.log('图片上传成功', data.data.urlPath)
-      this.ruleForm.thumb = data.data.urlPath
-    },
-    // 通过id获取详情---让父组件调用
-    async videoDetailById3 (id) {
-      const res = await videoDetailById3(id)
-      this.ruleForm = res.data
-      // console.log(998, res)
-    }
-  },
-  // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-    // 获取服务器前缀地址
-    this.baseURL = axios.defaults.baseURL
-    // 获取用户token
-    this.token = localStorage.getItem('CQLJXU_token')
-  },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {},
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style lang='less' scoped>
-.biaoshi::before {
-  top: 1px;
-}
-.biaoshi2::before {
-  top: -10px;
-  left: -64px;
-}
-/deep/.el-upload-list {
-  width: 500px;
-}
-/deep/.el-icon-plus {
-  border: 1px dashed #ccc;
-}
-.avatar-uploader .el-upload {
-  border-radius: 6px;
-  cursor: pointer;
-  position: relative;
-  overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-  border-color: #3e5eb3;
-}
-.avatar-uploader-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 178px;
-  height: 178px;
-  line-height: 178px;
-  text-align: center;
-}
-/deep/.el-icon-circle-close {
-  font-size: 20px;
-}
-.imgdiv {
-  max-width: 400px;
-}
-</style>

+ 0 - 273
houtai/src/components/tab3Dialog.vue

@@ -1,273 +0,0 @@
-<template>
-  <div class="tab3Dialog">
-    <el-dialog :title="ruleForm.id?'修改':'新增'" :visible="isShow" @close="btnX()">
-      <el-form
-        :model="ruleForm"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
-        <el-form-item label="标题:" prop="name">
-          <el-input
-            v-model="ruleForm.name"
-            maxlength="25"
-            show-word-limit
-            style="width: 500px"
-          ></el-input>
-        </el-form-item>
-        <!-- 图片和附件 -->
-        <el-form-item label="封面图片:">
-          <i class="biaoshi"></i>
-          <el-upload
-            class="avatar-uploader"
-            :action="baseURL + '/cms/security/video/upload/img'"
-            :headers="{
-              token,
-            }"
-            :show-file-list="false"
-            :before-upload="beforethumbUpload"
-            :on-success="upload_thumb_success"
-          >
-            <div v-if="ruleForm.thumb" class="imgdiv">
-              <img
-                style="width: 100%; height: 100%"
-                :src="baseURL + ruleForm.thumb"
-              />
-              <i
-                class="el-icon-circle-close"
-                @click.stop="ruleForm.thumb = ''"
-              ></i>
-            </div>
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-          </el-upload>
-          <span>格式要求:支持png、jpg、gif和jpeg的图片格式;最大支持5M。</span>
-        </el-form-item>
-        <!-- 上传附件 -->
-        <el-form-item label="视频文件:">
-          <i class="biaoshi"></i>
-          <el-upload
-            multiple
-            class="upload-demo"
-            :file-list='fileList'
-            :action="baseURL + '/cms/security/video/upload/video'"
-            :headers="{ token }"
-            :before-upload="beforeFujian"
-            :on-success="successFujian"
-            :before-remove="beforeRemove"
-            :on-remove="handleRemove"
-            :limit="1"
-            :on-exceed="handleExceed"
-            :show-file-list="true"
-          >
-            <el-button size="small" type="primary">点击上传</el-button>
-            <div class="el-upload__tip" slot="tip">
-              支持AVI、mov、rmvb、rm、FLV、mp4、3GP等格式的视频文件,大小不超过1GB。
-            </div>
-          </el-upload>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="btnX">取 消</el-button>
-        <el-button type="primary" @click="btnOk">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { videoDetailById, videoSave } from '@/apis/tab3'
-
-import axios from '@/utils/request'
-export default {
-  name: 'tab3Dialog',
-  props: {
-    isShow: {
-      type: Boolean,
-      default: false
-    }
-  },
-  components: {},
-  data () {
-    return {
-      fileList: [],
-      // 服务器前缀地址
-      baseURL: '',
-      token: '',
-      ruleForm: {
-        id: '',
-        name: '',
-        thumb: '',
-        video: '',
-        fileName: ''
-      },
-      rules: {
-        name: [{ required: true, message: '不能为空', trigger: 'blur' }]
-      }
-    }
-  },
-  computed: {},
-  methods: {
-    // 点击关闭
-    btnX () {
-      this.$emit('update:isShow', false)
-      // 清空表单
-      this.ruleForm = {
-        id: '',
-        name: '',
-        thumb: '',
-        video: '',
-        fileName: ''
-      }
-      this.fileList = []
-    },
-    // 点击确定
-    async btnOk () {
-      if (this.ruleForm.name.trim() === '') return this.$message.warning('标题不能为空')
-      if (this.ruleForm.thumb === '') return this.$message.warning('封面图片不能为空')
-      if (this.ruleForm.video === '') return this.$message.warning('视频文件不能为空')
-      const obj = { ...this.ruleForm }
-      const res = await videoSave(obj)
-      if (res.code === 0) {
-        this.$message.success('操作成功')
-        // 通知父组件刷新页面
-        this.$emit('refresh')
-        this.btnX()
-      } else this.$message.warning(res.msg)
-      // console.log(998, res)
-    },
-    // 上传图片
-    beforethumbUpload (file) {
-      // console.log(998, file)
-      // 限制图片大小和格式
-      const sizeOk = file.size / 1024 / 1024 < 5
-      const typeOk =
-        file.type === 'image/png' ||
-        (file.type === 'image/jpeg' && !file.name.includes('.jfif')) ||
-        file.type === 'image/gif'
-
-      return new Promise((resolve, reject) => {
-        if (!typeOk) {
-          this.$message.error('照片格式有误!')
-          reject(file)
-        } else if (!sizeOk) {
-          this.$message.error('照片大小超过5M!')
-          reject(file)
-        } else if (file.name.length > 32) {
-          this.$message.error('照片名字不能超过32个字!')
-          reject(file)
-        } else {
-          this.$message.success('上传成功')
-          resolve(file)
-        }
-      })
-    },
-    upload_thumb_success (data) {
-      // console.log('图片上传成功', data.data.urlPath)
-      this.ruleForm.thumb = data.data.urlPath
-    },
-    // 上传附件
-    beforeFujian (file) {
-      console.log('附件上传前', file)
-      const sizeOk = file.size / 1024 / 1024 < 1024
-      const typeOk =
-        file.type === 'video/mp4' ||
-        file.type === 'video/avi' ||
-        file.type === 'video/quicktime' || file.type === 'video/rm' || (file.type === '' && (file.name.includes('.flv') || file.name.includes('.rmvb'))) || file.type === 'video/3gpp'
-      return new Promise((resolve, reject) => {
-        if (file.name.length > 32) {
-          this.$message.error('视频名字不能超过32个字')
-          reject(file)
-        } else if (!sizeOk) {
-          this.$message.error('视频大小超过1GB!')
-          reject(file)
-        } else if (!typeOk) {
-          this.$message.error('视频格式有误!')
-          reject(file)
-        } else {
-          resolve(file)
-        }
-      })
-    },
-    successFujian (file) {
-      console.log('上传附件成功', file)
-      if (file.code === 0) {
-        this.ruleForm.video = file.data.urlPath
-        this.ruleForm.fileName = file.data.fileName
-        this.$message.success('上传成功')
-      } else if (file.code === -1) {
-        this.$message.warning('上传失败,不支持的文件格式')
-      }
-    },
-    beforeRemove (file, fileList) {
-      if (file && file.status === 'success') {
-        return this.$confirm(`确定移除 ${file.name}?`)
-      }
-    },
-    handleRemove (file, fileList) {
-      this.ruleForm.video = ''
-      this.ruleForm.fileName = ''
-    },
-    handleExceed (files, fileList) {
-      this.$message.warning('只能上传一个视频,请删除原视频后操作')
-    },
-    // 通过id获取详情---让父组件调用
-    async videoDetailById (id) {
-      const res = await videoDetailById(id)
-      this.ruleForm = res.data
-      this.fileList = [{ name: res.data.fileName }]
-      // console.log(998, res)
-    }
-  },
-  // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-    // 获取服务器前缀地址
-    this.baseURL = axios.defaults.baseURL
-    // 获取用户token
-    this.token = localStorage.getItem('CQLJXU_token')
-  },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {},
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style lang='less' scoped>
-.biaoshi::before {
-  top: 1px;
-}
-/deep/.el-upload-list{
-  width: 500px;
-}
-/deep/.el-icon-plus {
-  border: 1px dashed #ccc;
-}
-.avatar-uploader .el-upload {
-  border-radius: 6px;
-  cursor: pointer;
-  position: relative;
-  overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-  border-color: #3e5eb3;
-}
-.avatar-uploader-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 178px;
-  height: 178px;
-  line-height: 178px;
-  text-align: center;
-}
-/deep/.el-icon-circle-close {
-  font-size: 20px;
-}
-.imgdiv {
-  max-width: 400px;
-}
-</style>

+ 0 - 203
houtai/src/components/tab4Dialog.vue

@@ -1,203 +0,0 @@
-<!--  -->
-<template>
-  <div class="tab4Dialog">
-    <el-dialog :title="ruleForm.id?'修改':'新增'" :visible="isShow" @close="btnX()">
-      <el-form
-        :model="ruleForm"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
-        <el-form-item label="报警设备:" prop="name">
-          <el-input
-            v-model="ruleForm.name"
-            maxlength="10"
-            show-word-limit
-            style="width: 500px"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="报警位置:" prop="location">
-          <el-input
-            v-model="ruleForm.location"
-            maxlength="8"
-            show-word-limit
-            style="width: 500px"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="报警时间:">
-          <i class="biaoshi"></i>
-          <el-date-picker
-            v-model="timeBJ"
-            type="datetime"
-            placeholder="选择日期时间"
-            align="right"
-            :picker-options="pickerOptions"
-          >
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="更新时间:">
-          <i class="biaoshi"></i>
-          <el-date-picker
-            v-model="time"
-            type="datetime"
-            placeholder="选择日期时间"
-            align="right"
-            :picker-options="pickerOptions"
-          >
-          </el-date-picker>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="btnX">取 消</el-button>
-        <el-button type="primary" @click="btnOk">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { alarmSave, videoDetailById } from '@/apis/tab4'
-export default {
-  name: 'tab4Dialog',
-  props: {
-    isShow: {
-      type: Boolean,
-      default: false
-    }
-  },
-  components: {},
-  data () {
-    return {
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: '今天',
-            onClick (picker) {
-              picker.$emit('pick', new Date())
-            }
-          },
-          {
-            text: '昨天',
-            onClick (picker) {
-              const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24)
-              picker.$emit('pick', date)
-            }
-          },
-          {
-            text: '一周前',
-            onClick (picker) {
-              const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
-              picker.$emit('pick', date)
-            }
-          }
-        ]
-      },
-      disTimeBJ: '',
-      timeBJ: '',
-      time: '',
-      disTime: '',
-      ruleForm: {
-        id: '',
-        name: '',
-        location: ''
-      },
-      rules: {
-        name: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        location: [{ required: true, message: '不能为空', trigger: 'blur' }]
-      }
-    }
-  },
-  watch: {
-    time (val) {
-      const temp = this.moment(val).format('YYYY-MM-DD HH:mm:ss')
-      this.disTime = temp
-    },
-    timeBJ (val) {
-      const temp = this.moment(val).format('YYYY-MM-DD HH:mm:ss')
-      this.disTimeBJ = temp
-    }
-  },
-  computed: {},
-  methods: {
-    btnX () {
-      this.$emit('update:isShow', false)
-      this.$refs.ruleForm.resetFields()
-      this.ruleForm = {
-        id: '',
-        name: '',
-        location: ''
-      }
-      this.timeBJ = ''
-    },
-    async btnOk () {
-      if (this.timeBJ === null) return this.$message.warning('报警时间不能为空!')
-      if (this.time === null) return this.$message.warning('更新时间不能为空!')
-      try {
-        await this.$refs.ruleForm.validate()
-        const obj = {}
-        if (this.ruleForm.id) obj.id = Number(this.ruleForm.id)
-        obj.location = this.ruleForm.location
-        obj.name = this.ruleForm.name
-        obj.userCreateTime = this.disTimeBJ
-        obj.userUpdateTime = this.disTime
-        const res = await alarmSave(obj)
-        if (res.code === 0) {
-          this.$message.success('操作成功')
-          // 通知父组件刷新页面
-          this.$emit('refresh')
-          this.btnX()
-        } else this.$message.warning(res.msg)
-        // console.log(999, res)
-        // console.log(777777777777, obj)
-      } catch (error) {
-        console.log(error)
-      }
-    },
-    getCurrentTime () {
-      // 获取当前时间并打印
-      var _this = this
-      const yy = new Date().getFullYear()
-      const mm = new Date().getMonth() + 1
-      const dd = new Date().getDate()
-      const hh = new Date().getHours()
-      const mf =
-        new Date().getMinutes() < 10
-          ? '0' + new Date().getMinutes()
-          : new Date().getMinutes()
-      const ss =
-        new Date().getSeconds() < 10
-          ? '0' + new Date().getSeconds()
-          : new Date().getSeconds()
-      _this.gettime = yy + '/' + mm + '/' + dd + ' ' + hh + ':' + mf + ':' + ss
-      this.time = _this.gettime
-      console.log(_this.gettime)
-    },
-    // 通过id获取详情---让父组件调用
-    async videoDetailById (id) {
-      const res = await videoDetailById(id)
-      this.ruleForm = res.data
-      this.timeBJ = res.data.userCreateTime
-      // console.log(998, res)
-      this.getCurrentTime()
-    }
-  },
-  // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-  },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {},
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style lang='less' scoped>
-//@import url(); 引入公共css类
-</style>

+ 0 - 310
houtai/src/components/tab5Dialog.vue

@@ -1,310 +0,0 @@
-<template>
-  <div class="tab5Dialog">
-    <el-dialog :title="ruleForm.id?'修改':'新增'" :visible="isShow" @close="btnX()">
-      <el-form
-        :model="ruleForm"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
-        <el-form-item label="标题:" prop="name">
-          <el-input
-            v-model="ruleForm.name"
-            maxlength="25"
-            show-word-limit
-            style="width: 500px"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="经度:" prop="lon">
-          <el-input
-            type="number"
-            v-model.number="ruleForm.lon"
-            maxlength="8"
-            show-word-limit
-            style="width: 500px"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="纬度:" prop="lat">
-          <el-input
-            type="number"
-            v-model.number="ruleForm.lat"
-            maxlength="8"
-            show-word-limit
-            style="width: 500px"
-          ></el-input>
-        </el-form-item>
-        <!-- 图片和附件 -->
-        <el-form-item label="封面图片:">
-          <i class="biaoshi"></i>
-          <el-upload
-            class="avatar-uploader"
-            :action="baseURL + '/cms/site/video/upload/img'"
-            :headers="{
-              token,
-            }"
-            :show-file-list="false"
-            :before-upload="beforethumbUpload"
-            :on-success="upload_thumb_success"
-          >
-            <div v-if="ruleForm.thumb" class="imgdiv">
-              <img
-                style="width: 100%; height: 100%"
-                :src="baseURL + ruleForm.thumb"
-              />
-              <i
-                class="el-icon-circle-close"
-                @click.stop="ruleForm.thumb = ''"
-              ></i>
-            </div>
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-          </el-upload>
-          <span>格式要求:支持png、jpg、gif和jpeg的图片格式;最大支持5M。</span>
-        </el-form-item>
-        <!-- 上传附件 -->
-        <el-form-item label="视频文件:">
-          <i class="biaoshi"></i>
-          <el-upload
-            multiple
-            class="upload-demo"
-            :file-list='fileList'
-            :action="baseURL + '/cms/site/video/upload/video'"
-            :headers="{ token }"
-            :before-upload="beforeFujian"
-            :on-success="successFujian"
-            :before-remove="beforeRemove"
-            :on-remove="handleRemove"
-            :limit="1"
-            :on-exceed="handleExceed"
-            :show-file-list="true"
-          >
-            <el-button size="small" type="primary">点击上传</el-button>
-            <div class="el-upload__tip" slot="tip">
-              支持AVI、mov、rmvb、rm、FLV、mp4、3GP等格式的视频文件,大小不超过1GB。
-            </div>
-          </el-upload>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="btnX">取 消</el-button>
-        <el-button type="primary" @click="btnOk">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { videoDetailById, siteVideoSave } from '@/apis/tab5'
-
-import axios from '@/utils/request'
-export default {
-  name: 'tab5Dialog',
-  props: {
-    isShow: {
-      type: Boolean,
-      default: false
-    }
-  },
-  components: {},
-  data () {
-    // 这里存放数据
-    const validatePass = (rule, value, callback) => {
-      if (value > 99999999.99) {
-        callback(new Error('不能超过99999999.99'))
-      } else {
-        callback()
-      }
-    }
-    return {
-      fileList: [],
-      // 服务器前缀地址
-      baseURL: '',
-      token: '',
-      ruleForm: {
-        id: '',
-        name: '',
-        thumb: '',
-        video: '',
-        fileName: '',
-        lon: '',
-        lat: ''
-      },
-      rules: {
-        name: [{ required: true, message: '不能为空', trigger: 'blur' }],
-        lon: [{ required: true, message: '不能为空', trigger: 'blur' }, { validator: validatePass, trigger: 'blur' }],
-        lat: [{ required: true, message: '不能为空', trigger: 'blur' }, { validator: validatePass, trigger: 'blur' }]
-      }
-    }
-  },
-  computed: {},
-  methods: {
-    // 点击关闭
-    btnX () {
-      this.$emit('update:isShow', false)
-      // 清空表单
-      this.ruleForm = {
-        id: '',
-        name: '',
-        thumb: '',
-        video: '',
-        fileName: '',
-        lon: '',
-        lat: ''
-      }
-      this.$refs.ruleForm.resetFields()
-      this.fileList = []
-    },
-    // 点击确定
-    async btnOk () {
-      if (this.ruleForm.thumb === '') return this.$message.warning('封面图片不能为空')
-      if (this.ruleForm.video === '') return this.$message.warning('视频文件不能为空')
-      try {
-        await this.$refs.ruleForm.validate()
-        const obj = { ...this.ruleForm }
-        const res = await siteVideoSave(obj)
-        if (res.code === 0) {
-          this.$message.success('操作成功')
-          // 通知父组件刷新页面
-          this.$emit('refresh')
-          this.btnX()
-        } else this.$message.warning(res.msg)
-      } catch (error) {
-        console.log(error)
-      }
-      // console.log(998, res)
-    },
-    // 上传图片
-    beforethumbUpload (file) {
-      // console.log(998, file)
-      // 限制图片大小和格式
-      const sizeOk = file.size / 1024 / 1024 < 5
-      const typeOk =
-        file.type === 'image/png' ||
-        (file.type === 'image/jpeg' && !file.name.includes('.jfif')) ||
-        file.type === 'image/gif'
-
-      return new Promise((resolve, reject) => {
-        if (!typeOk) {
-          this.$message.error('照片格式有误!')
-          reject(file)
-        } else if (!sizeOk) {
-          this.$message.error('照片大小超过5M!')
-          reject(file)
-        } else if (file.name.length > 32) {
-          this.$message.error('照片名字不能超过32个字!')
-          reject(file)
-        } else {
-          this.$message.success('上传成功')
-          resolve(file)
-        }
-      })
-    },
-    upload_thumb_success (data) {
-      // console.log('图片上传成功', data.data.urlPath)
-      this.ruleForm.thumb = data.data.urlPath
-    },
-    // 上传附件
-    beforeFujian (file) {
-      // console.log('附件上传前', file)
-      const sizeOk = file.size / 1024 / 1024 < 1024
-      const typeOk =
-        file.type === 'video/mp4' ||
-        file.type === 'video/avi' ||
-        file.type === 'video/quicktime' || file.type === 'video/rm' || (file.type === '' && (file.name.includes('.flv') || file.name.includes('.rmvb'))) || file.type === 'video/3gpp'
-      return new Promise((resolve, reject) => {
-        if (file.name.length > 32) {
-          this.$message.error('视频名字不能超过32个字')
-          reject(file)
-        } else if (!sizeOk) {
-          this.$message.error('视频大小超过1GB!')
-          reject(file)
-        } else if (!typeOk) {
-          this.$message.error('视频格式有误!')
-          reject(file)
-        } else {
-          resolve(file)
-        }
-      })
-    },
-    successFujian (file) {
-      console.log('上传附件成功', file)
-      if (file.code === 0) {
-        this.ruleForm.video = file.data.urlPath
-        this.ruleForm.fileName = file.data.fileName
-        this.$message.success('上传成功')
-      } else if (file.code === -1) {
-        this.$message.warning('上传失败,不支持的文件格式')
-      }
-    },
-    beforeRemove (file, fileList) {
-      if (file && file.status === 'success') {
-        return this.$confirm(`确定移除 ${file.name}?`)
-      }
-    },
-    handleRemove (file, fileList) {
-      this.ruleForm.video = ''
-      this.ruleForm.fileName = ''
-    },
-    handleExceed (files, fileList) {
-      this.$message.warning('只能上传一个视频,请删除原视频后操作')
-    },
-    // 通过id获取详情---让父组件调用
-    async videoDetailById (id) {
-      const res = await videoDetailById(id)
-      this.ruleForm = res.data
-      this.fileList = [{ name: res.data.fileName }]
-      // console.log(998, res)
-    }
-  },
-  // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-    // 获取服务器前缀地址
-    this.baseURL = axios.defaults.baseURL
-    // 获取用户token
-    this.token = localStorage.getItem('CQLJXU_token')
-  },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {},
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style lang='less' scoped>
-.biaoshi::before {
-  top: 1px;
-}
-/deep/.el-upload-list{
-  width: 500px;
-}
-/deep/.el-icon-plus {
-  border: 1px dashed #ccc;
-}
-.avatar-uploader .el-upload {
-  border-radius: 6px;
-  cursor: pointer;
-  position: relative;
-  overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-  border-color: #3e5eb3;
-}
-.avatar-uploader-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 178px;
-  height: 178px;
-  line-height: 178px;
-  text-align: center;
-}
-/deep/.el-icon-circle-close {
-  font-size: 20px;
-}
-.imgdiv {
-  max-width: 400px;
-}
-</style>

+ 0 - 271
houtai/src/components/tab6Dialog.vue

@@ -1,271 +0,0 @@
-<template>
-  <div class="Tab6Dialog">
-    <el-dialog
-      :title="ruleForm.id ? '修改' : '新增'"
-      :visible="isShow"
-      @close="btnX()"
-    >
-      <el-form
-        :model="ruleForm"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
-        <el-form-item label="年份:" prop="year">
-          <el-input v-model="ruleForm.year" style="width:500px"></el-input>
-        </el-form-item>
-        <!-- 图片和附件 -->
-        <el-form-item label="图片:">
-          <i class="biaoshi biaoshi3"></i>
-          <el-upload
-            class="avatar-uploader"
-            :action="baseURL + '/cms/aerial/upload'"
-            :headers="{
-              token,
-            }"
-            :show-file-list="false"
-            :before-upload="beforethumbUpload"
-            :on-success="upload_thumb_success"
-          >
-            <div v-if="ruleForm.thumb" class="imgdiv">
-              <img
-                style="width: 100%; height: 100%"
-                :src="baseURL + ruleForm.thumb"
-              />
-              <i
-                class="el-icon-circle-close"
-                @click.stop="ruleForm.thumb = ''"
-              ></i>
-            </div>
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-          </el-upload>
-          <span>格式要求:支持png、jpg、gif和jpeg的图片格式;最大支持5M。</span>
-        </el-form-item>
-        <el-form-item label="更新时间:">
-          <i class="biaoshi"></i>
-          <el-date-picker
-            v-model="time"
-            type="datetime"
-            placeholder="选择日期时间"
-            align="right"
-            :picker-options="pickerOptions"
-          >
-          </el-date-picker>
-        </el-form-item>      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="btnX">取 消</el-button>
-        <el-button type="primary" @click="btnOk">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { imgDetailById, aerialImgSave } from '@/apis/tab6'
-
-import axios from '@/utils/request'
-export default {
-  name: 'Tab6Dialog',
-  props: {
-    isShow: {
-      type: Boolean,
-      default: false
-    }
-  },
-  components: {},
-  data () {
-    return {
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: '今天',
-            onClick (picker) {
-              picker.$emit('pick', new Date())
-            }
-          },
-          {
-            text: '昨天',
-            onClick (picker) {
-              const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24)
-              picker.$emit('pick', date)
-            }
-          },
-          {
-            text: '一周前',
-            onClick (picker) {
-              const date = new Date()
-              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
-              picker.$emit('pick', date)
-            }
-          }
-        ]
-      },
-      time: '', // 服务器前缀地址
-      baseURL: '',
-      token: '',
-      ruleForm: {
-        id: '',
-        thumb: '',
-        year: '',
-        userUpdateTime: ''
-      },
-      rules: {
-        year: [{ required: true, message: '不能为空', trigger: 'blur' }]
-      }
-    }
-  },
-  computed: {},
-  watch: {
-    time (val) {
-      const temp = this.moment(val).format('YYYY-MM-DD HH:mm:ss')
-      this.ruleForm.userUpdateTime = temp
-    }
-  },
-  methods: {
-    // 点击关闭
-    btnX () {
-      this.$emit('update:isShow', false)
-      // 清空表单
-      this.ruleForm = {
-        id: '',
-        thumb: '',
-        year: '',
-        userUpdateTime: ''
-      }
-      // 关闭验证
-      this.$refs.ruleForm.resetFields()
-    },
-    // 点击确定
-    async btnOk () {
-      if (this.ruleForm.thumb === '') { return this.$message.warning('封面图片不能为空') }
-      if (this.ruleForm.year.trim() === '') { return this.$message.warning('年份不能为空') }
-      if (this.time === null) return this.$message.warning('时间不能为空!')
-      const obj = { ...this.ruleForm }
-      const res = await aerialImgSave(obj)
-      if (res.code === 0) {
-        this.$message.success('操作成功')
-        // 通知父组件刷新页面
-        this.$emit('refresh')
-        this.btnX()
-      } else return this.$message.warning(res.msg)
-      // console.log(998, res)
-    },
-    // 上传图片
-    beforethumbUpload (file) {
-      // console.log(998, file)
-      // 限制图片大小和格式
-      const sizeOk = file.size / 1024 / 1024 < 5
-      const typeOk =
-        file.type === 'image/png' ||
-        (file.type === 'image/jpeg' && !file.name.includes('.jfif')) ||
-        file.type === 'image/gif'
-
-      return new Promise((resolve, reject) => {
-        if (!typeOk) {
-          this.$message.error('照片格式有误!')
-          reject(file)
-        } else if (!sizeOk) {
-          this.$message.error('照片大小超过5M!')
-          reject(file)
-        } else if (file.name.length > 32) {
-          this.$message.error('照片名字不能超过32个字!')
-          reject(file)
-        } else {
-          this.$message.success('上传成功')
-          resolve(file)
-        }
-      })
-    },
-    upload_thumb_success (data) {
-      // console.log('图片上传成功', data.data.urlPath)
-      this.ruleForm.thumb = data.data.urlPath
-    },
-    // 通过id获取详情---让父组件调用
-    async imgDetailById (id) {
-      const res = await imgDetailById(id)
-      this.ruleForm = res.data
-      // console.log(998, res)
-      this.getCurrentTime()
-    },
-    getCurrentTime () {
-      // 获取当前时间并打印
-      var _this = this
-      const yy = new Date().getFullYear()
-      const mm = new Date().getMonth() + 1
-      const dd = new Date().getDate()
-      const hh = new Date().getHours()
-      const mf =
-        new Date().getMinutes() < 10
-          ? '0' + new Date().getMinutes()
-          : new Date().getMinutes()
-      const ss =
-        new Date().getSeconds() < 10
-          ? '0' + new Date().getSeconds()
-          : new Date().getSeconds()
-      _this.gettime = yy + '/' + mm + '/' + dd + ' ' + hh + ':' + mf + ':' + ss
-      this.time = _this.gettime
-      // console.log(_this.gettime)
-    }
-  },
-  // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-    // 获取服务器前缀地址
-    this.baseURL = axios.defaults.baseURL
-    // 获取用户token
-    this.token = localStorage.getItem('CQLJXU_token')
-  },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {},
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
-}
-</script>
-<style lang='less' scoped>
-.biaoshi::before {
-  top: -10px;
-}
-.biaoshi2::before {
-  top: -10px;
-  left: -64px;
-}
-.biaoshi3::before {
-  top: 0px;
-  left: -64px;
-}
-/deep/.el-upload-list {
-  width: 500px;
-}
-/deep/.el-icon-plus {
-  border: 1px dashed #ccc;
-}
-.avatar-uploader .el-upload {
-  border-radius: 6px;
-  cursor: pointer;
-  position: relative;
-  overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-  border-color: #3e5eb3;
-}
-.avatar-uploader-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 178px;
-  height: 178px;
-  line-height: 178px;
-  text-align: center;
-}
-/deep/.el-icon-circle-close {
-  font-size: 20px;
-}
-.imgdiv {
-  max-width: 400px;
-}
-</style>

+ 2 - 3
houtai/src/views/forum/list.vue

@@ -34,12 +34,11 @@
     <!-- 底部 -->
     <div class="bottom">
       <!-- 分页 -->
-      <div class="paging"  v-if="total>5">
+      <div class="paging"  v-if="total>10">
         <el-pagination
           layout="prev, pager, next,jumper"
           :total="total"
           :current-page="formData.pageNum"
-          :page-size='formData.pageSize'
           @current-change="currentChange"
           @size-change="sizeChange"
         >
@@ -128,7 +127,7 @@ export default {
         status: 2,
         type: 'scene',
         pageNum: 1,
-        pageSize: 5,
+        pageSize: 10,
         bbsType: 'topic'
       },
       selectType: 'scene',

+ 2 - 3
houtai/src/views/forum/look.vue

@@ -72,12 +72,11 @@
     <!-- 底部 -->
     <div class="bottom">
       <!-- 分页 -->
-      <div class="paging" v-if="total > 5">
+      <div class="paging" v-if="total > 10">
         <el-pagination
           layout="prev, pager, next,jumper"
           :total="total"
           :current-page="formData.pageNum"
-          :page-size="formData.pageSize"
           @current-change="currentChange"
           @size-change="sizeChange"
         >
@@ -153,7 +152,7 @@ export default {
       formData: {
         parentId: null,
         pageNum: 1,
-        pageSize: 5
+        pageSize: 10
       },
       name2: ''
     }

+ 1 - 1
houtai/src/views/tab1/tab1Add.vue

@@ -102,7 +102,7 @@
           </el-upload>
           <div class="el-upload__tip" v-if="conLeftId === 'model'">
             <p class="upHint">格式要求:</p>
-            <p class="upHint">1、仅支持.4dge格式的模型文件。</p>
+            <p class="upHint">1、仅支持.4dage格式的模型文件。</p>
             <p class="upHint">2、最大支持500MB。</p>
           </div>
           <div class="el-upload__tip" v-else>

+ 2 - 2
web/src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 const service = axios.create({
   // baseURL: 'http://192.168.0.135:8005/', // 本地调试
-  baseURL: 'http://192.168.0.245:8005/', // 线上调试
-  // baseURL: '', // build
+  // baseURL: 'http://192.168.0.245:8005/', // 线上调试
+  baseURL: '', // build
   timeout: 5000
 })
 // 请求拦截器