jiangping
2024-02-26 8f553085e1f5de85798d7027f8f56b29a1e7f6c1
整理
已修改8个文件
115 ■■■■ 文件已修改
admin/src/api/business/parks.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/plugins/messagebox.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/device.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/deviceRole_f.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/internalCompany.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/internalMember.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/parks.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/parks.js
@@ -13,3 +13,8 @@
    trim: true
  })
}
export function syncParks (data) {
  return request.post('/business/hksync/syncParks', data)
}
admin/src/plugins/messagebox.js
@@ -3,6 +3,13 @@
export default {
  ...MessageBox,
  // 删除二次确认
  actionConfirm (title,message) {
    return MessageBox.confirm(message, title, {
      confirmButtonText: '确认',
      cancelButtonText: '取消',
      type: 'warning'
    })
  },
  deleteConfirm (message) {
    return MessageBox.confirm(message, '删除提醒', {
      confirmButtonText: '确认删除',
admin/src/views/business/device.vue
@@ -66,6 +66,7 @@
import Pagination from '@/components/common/Pagination'
import OperaDeviceWindow from '@/components/business/OperaDeviceWindow'
import { syncDevices } from '@/api/business/device'
import { memberSync } from '@/api/business/member'
export default {
  name: 'Device',
  extends: BaseTable,
@@ -91,22 +92,22 @@
  },
  methods: {
    synchronousData () {
      this.$confirm('确认同步吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        syncDevices({})
          .then(res => {
            this.$message({
              type: 'success',
              message: '同步成功'
      this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?')
        .then(() => {
          this.isWorking.delete = true
          syncDevices({})
            .then(res => {
              this.$tip.apiSuccess(res || '同步成功')
              this.search()
            })
            this.search()
          })
      }).catch(() => {
      })
            .catch(e => {
              this.$tip.apiFailed(e)
            })
            .finally(() => {
              this.isWorking.delete = false
            })
        })
        .catch(() => {})
    }
  }
}
admin/src/views/business/deviceRole_f.vue
@@ -13,7 +13,7 @@
        <!-- 表格和分页 -->
        <template v-slot:table-wrap>
            <ul class="toolbar">
                <li><el-button type="primary" @click="synchronousData">同步</el-button></li>
                <li><el-button type="primary"  v-permissions="['business:hksync:privilege']" @click="synchronousData">同步</el-button></li>
            </ul>
            <el-table
                v-loading="isWorking.search"
admin/src/views/business/internalCompany.vue
@@ -54,6 +54,7 @@
import TableLayout from '@/layouts/TableLayout'
import { companySync } from '@/api/business/company'
import OperaInternalCompanyWindow from '@/components/business/OperaInternalCompanyWindow'
import { memberSync } from '@/api/business/member'
export default {
  name: 'internalCompany',
  extends: BaseTable,
@@ -95,9 +96,22 @@
    },
    // 同步信息
    async synchronous () {
      const message = await companySync({})
      this.$message.success(message)
      this.search()
      this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?')
        .then(() => {
          this.isWorking.delete = true
          companySync({})
            .then(res => {
              this.$tip.apiSuccess(res || '同步成功')
              this.search()
            })
            .catch(e => {
              this.$tip.apiFailed(e)
            })
            .finally(() => {
              this.isWorking.delete = false
            })
        })
        .catch(() => {})
    }
  }
}
admin/src/views/business/internalMember.vue
@@ -57,6 +57,7 @@
                        <span v-if="row.sex === 2">女</span>
                    </template>
                </el-table-column>
              <el-table-column prop="companyName" label="所属部门" min-width="100px"></el-table-column>
                <el-table-column prop="status" label="状态" min-width="100px">
                    <template slot-scope="{row}">
                        <span v-if="row.status === 0">正常</span>
@@ -121,8 +122,8 @@
import TableLayout1 from '@/layouts/TableLayout1'
import Pagination from '@/components/common/Pagination'
import Tree from '@/components/common/Tree'
import { fetchList} from '@/api/business/company'
import {memberSync} from "@/api/business/member";
import { fetchList } from '@/api/business/company'
import { memberSync } from '@/api/business/member'
export default {
  name: 'internalMember',
  extends: BaseTable,
@@ -166,10 +167,23 @@
    },
    // 同步信息
    async synchronous () {
      const message = await memberSync({})
      this.$message.success(message)
      this.search()
    } ,
      this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?')
        .then(() => {
          this.isWorking.delete = true
          memberSync({})
            .then(res => {
              this.$tip.apiSuccess(res || '同步成功')
              this.search()
            })
            .catch(e => {
              this.$tip.apiFailed(e)
            })
            .finally(() => {
              this.isWorking.delete = false
            })
        })
        .catch(() => {})
    },
    callback (row) {
      console.log(row)
      this.searchForm.erpOrgId = row.erpId
admin/src/views/business/parks.vue
@@ -23,7 +23,7 @@
        <!-- 表格和分页 -->
        <template v-slot:table-wrap>
            <ul class="toolbar">
                <li><el-button type="primary">同步</el-button></li>
                <li><el-button type="primary"  v-permissions="['business:hksync:park']"  @click="syncParks()">同步</el-button></li>
            </ul>
            <el-table
                v-loading="isWorking.search"
@@ -49,7 +49,7 @@
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import { findList } from '@/api/business/parks'
import {findList, syncParks} from '@/api/business/parks'
export default {
  name: 'Parks',
  extends: BaseTable,
@@ -75,6 +75,24 @@
    this.getfindList()
  },
  methods: {
    syncParks(){
      this.$dialog.actionConfirm("操作确认提醒","您确认同步全部信息吗?")
          .then(() => {
            this.isWorking.delete = true
            this.api.syncParks({})
                .then(res => {
                  this.$tip.apiSuccess(res || '同步成功')
                  this.__afterDelete()
                })
                .catch(e => {
                  this.$tip.apiFailed(e)
                })
                .finally(() => {
                  this.isWorking.delete = false
                })
          })
          .catch(() => {})
    },
    getfindList () {
      findList({})
        .then(res => {
admin/vue.config.js
@@ -14,7 +14,7 @@
        // http://192.168.0.110:10013   磊磊
        // http://192.168.0.132:10013   帅哥
        // https://dmtest.ahapp.net/admin_api   测试服
        target: 'http://localhost:10028',
        target: 'http://localhost:10033',
        changeOrigin: true,
        pathRewrite: {
          [`^${[process.env.VUE_APP_API_PREFIX]}`]: ''