From bd25d9a8a058e8c618ee4188ed5f15a898c0f7e8 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期六, 27 一月 2024 11:43:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
platform/src/api/system/menu.js | 16
company/src/api/system/menuCom.js | 50 ++
platform/src/components/business/OperaDispatchUnitWindow.vue | 293 ++++++++++++++
company/src/components/common/MenuSelect.vue | 32 +
platform/src/api/business/worktype.js | 6
company/src/views/system/menuCom.vue | 24
platform/src/views/business/dispatchUnit.vue | 116 +++++
platform/src/components/business/dispatchUnitDetails.vue | 261 +++++++++++++
platform/src/api/business/dispatchUnit.js | 23 +
company/src/components/system/menu/OperaMenuComWindow.vue | 164 ++++++++
platform/src/components/business/addJobType.vue | 60 +++
platform/src/components/common/UploadAvatarVideo.vue | 128 ++++++
platform/src/api/business/duWorktype.js | 6
platform/.env.development | 4
company/.env.development | 6
15 files changed, 1,167 insertions(+), 22 deletions(-)
diff --git a/company/.env.development b/company/.env.development
index ad31e4a..81d95d5 100644
--- a/company/.env.development
+++ b/company/.env.development
@@ -1,7 +1,11 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
-VUE_APP_API = 'http://192.168.0.104:10023/'
+# VUE_APP_API = 'http://192.168.0.104:10023/'
+<<<<<<< HEAD
+VUE_APP_API = 'http://192.168.0.134:10023/'
+=======
VUE_APP_API = 'http://localhost:10023/'
# VUE_APP_API = 'http://192.168.0.134:10023/'
+>>>>>>> c6c95a49be6194989c124b8fd316fb5d434bd153
diff --git a/company/src/api/system/menuCom.js b/company/src/api/system/menuCom.js
new file mode 100644
index 0000000..24cd87c
--- /dev/null
+++ b/company/src/api/system/menuCom.js
@@ -0,0 +1,50 @@
+import request from '@/utils/request'
+
+// 鏌ヨ----骞冲彴鑿滃崟
+export function fetchTree () {
+ return request.post(`/system/menu/treeList/0`)
+}
+
+// 鏌ヨ----浼佷笟鑿滃崟
+export function fetchTree1 () {
+ return request.post(`/system/menu/treeList/1`)
+}
+
+// 鏂板缓
+export function create (data) {
+ return request.post('/system/menu/create', data)
+}
+
+// 淇敼
+export function updateById (data) {
+ return request.post('/system/menu/updateById', data)
+}
+
+// 淇敼鐘舵��
+export function updateStatus (data) {
+ return request.post('/system/menu/updateStatus', data)
+}
+
+// 鍒犻櫎
+export function deleteById (id) {
+ return request.get(`/system/menu/delete/${id}`)
+}
+
+// 鎵归噺鍒犻櫎
+export function deleteByIdInBatch (ids) {
+ return request.get('/system/menu/delete/batch', {
+ params: {
+ ids
+ }
+ })
+}
+
+// 鏌ヨ鑿滃崟鏍�
+export function fetchMenuTree () {
+ return request.get('/system/menu/treeNodes?type=0')
+}
+
+// 鎺掑簭
+export function sort (data) {
+ return request.post('/system/menu/updateSort', data)
+}
diff --git a/company/src/components/common/MenuSelect.vue b/company/src/components/common/MenuSelect.vue
index ea5f26c..3471617 100644
--- a/company/src/components/common/MenuSelect.vue
+++ b/company/src/components/common/MenuSelect.vue
@@ -12,7 +12,7 @@
<script>
import TreeSelect from './TreeSelect'
-import { fetchTree } from '@/api/system/menu'
+import { fetchTree, fetchTree1 } from '@/api/system/menu'
export default {
name: 'MenuSelect',
components: { TreeSelect },
@@ -20,6 +20,9 @@
value: {},
inline: {
default: true
+ },
+ type: {
+ default: '0'
},
placeholder: {
default: '璇烽�夋嫨鑿滃崟'
@@ -47,14 +50,25 @@
methods: {
// 鑾峰彇鎵�鏈夎彍鍗�
fetchData () {
- fetchTree()
- .then(records => {
- this.data = []
- this.__fillData(this.data, records)
- })
- .catch(e => {
- this.$tip.apiFailed(e)
- })
+ if (this.type === '1') {
+ fetchTree1()
+ .then(records => {
+ this.data = []
+ this.__fillData(this.data, records)
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ } else {
+ fetchTree()
+ .then(records => {
+ this.data = []
+ this.__fillData(this.data, records)
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ }
},
// 濉厖鑿滃崟鏍�
__fillData (list, pool) {
diff --git a/company/src/components/system/menu/OperaMenuComWindow.vue b/company/src/components/system/menu/OperaMenuComWindow.vue
new file mode 100644
index 0000000..efafc84
--- /dev/null
+++ b/company/src/components/system/menu/OperaMenuComWindow.vue
@@ -0,0 +1,164 @@
+<template>
+ <GlobalWindow
+ class="handle-table-dialog"
+ :title="title"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ <p class="tip" v-if="form.parent != null && form.id == null">涓� <em>{{parentName}}</em> 鏂板缓瀛愯彍鍗�</p>
+ <el-form :model="form" ref="form" :rules="rules">
+ <el-form-item label="涓婄骇鑿滃崟" prop="parentId">
+ <MenuSelect v-if="visible" type="1" v-model="form.parentId" placeholder="璇烽�夋嫨涓婄骇鑿滃崟" :exclude-id="excludeMenuId" clearable :inline="false"/>
+ </el-form-item>
+ <el-form-item label="鑿滃崟鍚嶇О" prop="name" required>
+ <el-input v-model="form.name" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" v-trim maxlength="50"/>
+ </el-form-item>
+ <el-form-item label="璁块棶璺緞" prop="path">
+ <el-input v-model="form.path" placeholder="璇疯緭鍏ヨ闂矾寰�" v-trim maxlength="200"/>
+ </el-form-item>
+ <el-form-item label="鍥炬爣" prop="icon" class="form-item-icon">
+ <el-radio-group v-model="form.icon">
+ <el-radio :label="icon" v-for="icon in icons" :key="icon">
+ <i :class="{[icon]: true}"></i>
+ </el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input type="textarea" v-model="form.remark" placeholder="璇疯緭鍏ヨ彍鍗曞娉�" v-trim :rows="3" maxlength="500"/>
+ </el-form-item>
+ </el-form>
+ </GlobalWindow>
+</template>
+
+<script>
+ import BaseOpera from '@/components/base/BaseOpera'
+ import GlobalWindow from '@/components/common/GlobalWindow'
+ import MenuSelect from '@/components/common/MenuSelect'
+ import icons from '@/utils/icons'
+ export default {
+ name: 'OperaMenuWindow',
+ extends: BaseOpera,
+ components: { MenuSelect, GlobalWindow },
+ data () {
+ return {
+ icons,
+ // 涓婄骇鑿滃崟鍚嶇О
+ parentName: '',
+ // 闇�鎺掗櫎閫夋嫨鐨勮彍鍗旾D
+ excludeMenuId: null,
+ // 琛ㄥ崟鏁版嵁
+ form: {
+ id: null,
+ parentId: null,
+ name: '',
+ path: '',
+ icon: '',
+ remark: '',
+ type: '1'
+ },
+ // 楠岃瘉瑙勫垯
+ rules: {
+ name: [
+ { required: true, message: '璇疯緭鍏ヨ彍鍗曞悕绉�' }
+ ]
+ }
+ }
+ },
+ methods: {
+ /**
+ * @title: 绐楀彛鏍囬
+ * @target: 缂栬緫鐨勮彍鍗曞璞�
+ * @parent: 鏂板缓鏃剁殑涓婄骇鑿滃崟
+ */
+ open (title, target, parent) {
+ this.title = title
+ this.visible = true
+ // 鏂板缓锛宮enu涓虹┖鏃惰〃绀烘柊寤鸿彍鍗�
+ if (target == null) {
+ this.excludeMenuId = null
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form.id = null
+ this.form.type = parent.type
+ this.form.parentId = parent == null ? null : parent.id
+ this.parentName = parent == null ? null : parent.name
+ })
+ return
+ }
+ // 缂栬緫
+ this.$nextTick(() => {
+ this.excludeMenuId = target.id
+ for (const key in this.form) {
+ this.form[key] = target[key]
+ }
+ })
+ }
+ },
+ created () {
+ this.config({
+ api: '/system/menu'
+ })
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ @import "@/assets/style/variables";
+ $icon-background-color: $primary-color;
+ .global-window {
+ .tip {
+ margin-bottom: 12px;
+ em {
+ font-style: normal;
+ color: $primary-color;
+ font-weight: bold;
+ }
+ }
+ // 鍥炬爣
+ /deep/ .form-item-icon {
+ .el-form-item__content {
+ height: 193px;
+ overflow-y: auto;
+ }
+ .el-radio-group {
+ background: $icon-background-color;
+ padding: 4px;
+ .el-radio {
+ margin-right: 0;
+ color: #fff;
+ padding: 6px;
+ &.is-checked {
+ background: $icon-background-color - 30;
+ border-radius: 10px;
+ }
+ .el-radio__input.is-checked + .el-radio__label {
+ color: #fff;
+ }
+ }
+ .el-radio__input {
+ display: none;
+ }
+ .el-radio__label {
+ padding-left: 0;
+ // element-ui鍥炬爣
+ i {
+ font-size: 30px;
+ }
+ // 鑷畾涔夊浘鏍�
+ [class^="eva-icon-"], [class*=" eva-icon-"] {
+ width: 30px;
+ height: 30px;
+ background-size: 25px;
+ vertical-align: bottom;
+ }
+ }
+ .el-radio--small {
+ height: auto;
+ padding: 8px;
+ margin-left: 0;
+ }
+ }
+ }
+ }
+</style>
diff --git a/company/src/views/system/menuCom.vue b/company/src/views/system/menuCom.vue
index 8481f79..6dd790e 100644
--- a/company/src/views/system/menuCom.vue
+++ b/company/src/views/system/menuCom.vue
@@ -3,7 +3,7 @@
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['system:menu:create', 'system:menu:delete', 'system:menu:sort']">
- <li><el-button type="primary" @click="$refs.operaMenuWindow.open('鏂板缓涓�绾ц彍鍗�')" icon="el-icon-plus" v-permissions="['system:menu:create']">鏂板缓</el-button></li>
+ <li><el-button type="primary" @click="$refs.OperaMenuComWindow.open('鏂板缓涓�绾ц彍鍗�')" icon="el-icon-plus" v-permissions="['system:menu:create']">鏂板缓</el-button></li>
<li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:menu:delete']">鍒犻櫎</el-button></li>
<li><el-button @click="sort('top')" :loading="isWorking.sort" icon="el-icon-sort-up" v-permissions="['system:menu:sort']">涓婄Щ</el-button></li>
<li><el-button @click="sort('bottom')" :loading="isWorking.sort" icon="el-icon-sort-down" v-permissions="['system:menu:sort']">涓嬬Щ</el-button></li>
@@ -42,33 +42,33 @@
</template>
</el-table-column>
<el-table-column
- v-if="containPermissions(['system:menu:update', 'system:menu:create', 'system:menu:delete'])"
- label="鎿嶄綔"
- min-width="220"
- fixed="right"
+ v-if="containPermissions(['system:menu:update', 'system:menu:create', 'system:menu:delete'])"
+ label="鎿嶄綔"
+ min-width="220"
+ fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" icon="el-icon-edit" @click="$refs.operaMenuWindow.open('缂栬緫鑿滃崟', row)" v-permissions="['system:menu:update']">缂栬緫</el-button>
- <el-button type="text" icon="el-icon-plus" @click="$refs.operaMenuWindow.open('鏂板缓瀛愯彍鍗�', null, row)" v-permissions="['system:menu:create']">鏂板缓瀛愯彍鍗�</el-button>
+ <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMenuComWindow.open('缂栬緫鑿滃崟', {...row, type: 1})" v-permissions="['system:menu:update']">缂栬緫</el-button>
+ <el-button type="text" icon="el-icon-plus" @click="$refs.OperaMenuComWindow.open('鏂板缓瀛愯彍鍗�', null, {...row, type: 1})" v-permissions="['system:menu:create']">鏂板缓瀛愯彍鍗�</el-button>
<el-button v-if="!row.fixed" type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:menu:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
</template>
<!-- 鏂板缓/淇敼 -->
- <OperaMenuWindow ref="operaMenuWindow" @success="handlePageChange(tableData.pagination.pageIndex)"/>
+ <OperaMenuComWindow ref="OperaMenuComWindow" @success="handlePageChange(tableData.pagination.pageIndex)"/>
</TableLayout>
</template>
<script>
import TableLayout from '@/layouts/TableLayout'
import BaseTable from '@/components/base/BaseTable'
- import OperaMenuWindow from '@/components/system/menu/OperaMenuWindow'
- import { fetchTree, updateStatus, sort } from '@/api/system/menu'
+ import OperaMenuComWindow from '@/components/system/menu/OperaMenuComWindow'
+ import { fetchTree1, updateStatus, sort } from '@/api/system/menu'
export default {
name: 'SystemMenu',
extends: BaseTable,
- components: { OperaMenuWindow, TableLayout },
+ components: { OperaMenuComWindow, TableLayout },
data () {
return {
// 鏄惁姝e湪澶勭悊涓�
@@ -81,7 +81,7 @@
// 鏌ヨ鏁版嵁
handlePageChange () {
this.isWorking.search = true
- fetchTree(1)
+ fetchTree1()
.then(records => {
this.tableData.list = records
})
diff --git a/platform/.env.development b/platform/.env.development
index c1a5ac8..efa685a 100644
--- a/platform/.env.development
+++ b/platform/.env.development
@@ -1,6 +1,9 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
+<<<<<<< HEAD
+VUE_APP_API = 'http://192.168.0.134:10025/'
+=======
VUE_APP_CONTEXT_PATH = '/'
VUE_APP_API_PREFIX = '/api'
@@ -13,3 +16,4 @@
# #娴嬭瘯鏈嶅姟鍣�
#VUE_APP_API = 'https://dmtest.ahapp.net/preselect_admin_interface'
+>>>>>>> c6c95a49be6194989c124b8fd316fb5d434bd153
diff --git a/platform/src/api/business/dispatchUnit.js b/platform/src/api/business/dispatchUnit.js
new file mode 100644
index 0000000..22a2e2a
--- /dev/null
+++ b/platform/src/api/business/dispatchUnit.js
@@ -0,0 +1,23 @@
+import request from '../../utils/request'
+
+// 鏌ヨ
+export function fetchList (data) {
+ return request.post('/business/dispatchUnit/page', data, {
+ trim: true
+ })
+}
+
+// 鍒涘缓
+export function create (data) {
+ return request.post('/business/dispatchUnit/create', data)
+}
+
+// 淇敼
+export function updateById (data) {
+ return request.post('/business/dispatchUnit/updateById', data)
+}
+
+// 鏍规嵁ID鏌ヨ
+export function getById (id) {
+ return request.get(`/business/dispatchUnit/${id}`)
+}
diff --git a/platform/src/api/business/duWorktype.js b/platform/src/api/business/duWorktype.js
new file mode 100644
index 0000000..ea873af
--- /dev/null
+++ b/platform/src/api/business/duWorktype.js
@@ -0,0 +1,6 @@
+import request from '../../utils/request'
+
+// 鏍规嵁ID鍒犻櫎
+export function deleteById (id) {
+ return request.get(`/business/duWorktype/delete/${id}`)
+}
diff --git a/platform/src/api/business/worktype.js b/platform/src/api/business/worktype.js
new file mode 100644
index 0000000..ea9c218
--- /dev/null
+++ b/platform/src/api/business/worktype.js
@@ -0,0 +1,6 @@
+import request from '../../utils/request'
+
+// 鏍规嵁鏉′欢宸ョ鍒楄〃
+export function findListByDTO (data) {
+ return request.post('/business/worktype/findListByDTO', data)
+}
diff --git a/platform/src/api/system/menu.js b/platform/src/api/system/menu.js
index a88bc4f..ad94c4b 100644
--- a/platform/src/api/system/menu.js
+++ b/platform/src/api/system/menu.js
@@ -1,8 +1,19 @@
import request from '@/utils/request'
+<<<<<<< HEAD
+// 鏌ヨ----骞冲彴鑿滃崟
+export function fetchTree () {
+ return request.post('/system/menu/treeList/0')
+}
+
+// 鏌ヨ----浼佷笟鑿滃崟
+export function fetchTree1 () {
+ return request.post('/system/menu/treeList/1')
+=======
// 鏌ヨ
export function fetchTree (data, type) {
return request.post(`/system/menu/treeList/${type}`, data)
+>>>>>>> c6c95a49be6194989c124b8fd316fb5d434bd153
}
// 鏂板缓
@@ -35,8 +46,13 @@
}
// 鏌ヨ鑿滃崟鏍�
+<<<<<<< HEAD
+export function fetchMenuTree () {
+ return request.get('/system/menu/treeNodes?type=1')
+=======
export function fetchMenuTree (params) {
return request.get('/system/menu/treeNodes', { params })
+>>>>>>> c6c95a49be6194989c124b8fd316fb5d434bd153
}
// 鎺掑簭
diff --git a/platform/src/components/business/OperaDispatchUnitWindow.vue b/platform/src/components/business/OperaDispatchUnitWindow.vue
new file mode 100644
index 0000000..a9d80df
--- /dev/null
+++ b/platform/src/components/business/OperaDispatchUnitWindow.vue
@@ -0,0 +1,293 @@
+<template>
+ <GlobalWindow
+ :title="title"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ <el-form :model="form" ref="form" :rules="rules">
+ <el-form-item label="娲鹃仯鍗曚綅鍚嶇О" prop="name">
+ <el-input v-model="form.name" placeholder="璇疯緭鍏�" v-trim/>
+ </el-form-item>
+ <el-form-item label="娲鹃仯鍗曚綅淇$敤浠g爜" prop="code">
+ <el-input v-model="form.code" placeholder="璇疯緭鍏�" v-trim/>
+ </el-form-item>
+ <el-form-item label="娲鹃仯鍗曚綅鎻忚堪" prop="content">
+ <el-input v-model="form.content" placeholder="璇疯緭鍏�" v-trim/>
+ </el-form-item>
+ </el-form>
+ <div class="list">
+ <el-button type="primary" style="margin-bottom: 15px;" @click="add">娣诲姞鏂规</el-button>
+ <div class="list_item" v-for="(item, index) in form.saveDuSolutionDTOList" :key="index">
+ <div class="list_item_input">
+ <div class="list_item_input_label"><span>*</span>淇濋櫓鏂规</div>
+ <div class="list_item_input_val">
+ <el-select v-model="item.solutionId" @change="changeTypeWork($event, index)" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in insuranceScheme"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ <div style="display: flex; align-items: center;">
+ <el-button type="primary" @click="addItem(index)">娣诲姞</el-button>
+ <el-button type="danger" @click="deleItem(index)">鍒犻櫎</el-button>
+ </div>
+ </div>
+ </div>
+ <div class="list_item_table">
+ <el-table
+ :data="item.saveDuWorkTypeDTOList"
+ border
+ style="width: 100%">
+ <el-table-column label="搴忓彿" width="80px">
+ <template slot-scope="scope">
+ <span>{{scope.$index + 1}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="name"
+ label="鎵�灞炲伐绉�">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.workTypeId" @change="changeGZ($event, index, scope.$index)" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in item.typeWork"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="address"
+ label="鎿嶄綔瑙嗛锛堥潪蹇呭~锛�">
+ <template slot-scope="scope">
+ <div style="width: 100px; height: 100px;">
+ <UploadAvatarVideo :uploadData="{ folder: 'unit' }" :file="scope.row.file" @uploadSuccess="result($event, index, scope.$index)" />
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ width="90"
+ fixed="right">
+ <template slot-scope="scope">
+ <el-button type="text" @click="dele(index, scope.$index)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
+ </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import UploadAvatarVideo from '@/components/common/UploadAvatarVideo'
+import { all } from '@/api/business/solutions'
+import { findListByDTO } from '@/api/business/worktype'
+export default {
+ name: 'OperaDispatchUnitWindow',
+ extends: BaseOpera,
+ components: { GlobalWindow, UploadAvatarVideo },
+ data () {
+ return {
+ // 琛ㄥ崟鏁版嵁
+ form: {
+ id: null,
+ name: '',
+ code: '',
+ content: '',
+ saveDuSolutionDTOList: [
+ {
+ id: '',
+ saveDuWorkTypeDTOList: [
+ {
+ videoUrl: '',
+ workTypeId: '',
+ workTypeName: '',
+ file: {
+ videourl: '',
+ videourlfull: ''
+ }
+ }
+ ],
+ typeWork: [],
+ solutionId: '',
+ solutionName: ''
+ }
+ ]
+ },
+ // 楠岃瘉瑙勫垯
+ rules: {
+ name: [
+ { required: true, message: '璇疯緭鍏ユ淳閬e崟浣嶅悕绉�' }
+ ],
+ code: [
+ { required: true, message: '璇疯緭鍏ユ淳閬e崟浣嶄俊鐢ㄤ唬鐮�' }
+ ],
+ content: [
+ { required: true, message: '璇疯緭鍏ユ淳閬e崟浣嶆弿杩�' }
+ ]
+ },
+ insuranceScheme: []
+ }
+ },
+ created () {
+ this.config({
+ api: '/business/dispatchUnit',
+ 'field.id': 'id'
+ })
+ all({})
+ .then(res => {
+ this.insuranceScheme = res
+ })
+ },
+ methods: {
+ open (title, target) {
+ this.title = title
+ this.visible = true
+ this.form.saveDuSolutionDTOList = [
+ {
+ id: '',
+ saveDuWorkTypeDTOList: [
+ {
+ videoUrl: '',
+ workTypeId: '',
+ workTypeName: '',
+ file: {
+ videourl: '',
+ videourlfull: ''
+ }
+ }
+ ],
+ typeWork: [],
+ solutionId: '',
+ solutionName: ''
+ }
+ ]
+ // 鏂板缓
+ if (target == null) {
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form[this.configData['field.id']] = null
+ })
+ return
+ }
+ // 缂栬緫
+ this.$nextTick(() => {
+ for (const key in this.form) {
+ this.form[key] = target[key]
+ }
+ })
+ },
+ // 鍒囨崲宸ョ
+ changeGZ(a, b, c) {
+ let text = ''
+ this.form.saveDuSolutionDTOList[b].typeWork.forEach(item => {
+ if (item.id === a) {
+ text = item.name
+ }
+ })
+ this.form.saveDuSolutionDTOList[b].saveDuWorkTypeDTOList[c].workTypeName = text
+ },
+ // 鍒囨崲鏂规
+ changeTypeWork(id, index) {
+ findListByDTO({ queryType: 0, id })
+ .then(res => {
+ this.form.saveDuSolutionDTOList[index].typeWork = res
+ })
+ let text = ''
+ this.insuranceScheme.forEach(item => {
+ if (item.id === id) {
+ text = item.name
+ }
+ })
+ this.form.saveDuSolutionDTOList[index].solutionName = text
+ },
+ add() {
+ this.form.saveDuSolutionDTOList.unshift({
+ id: '',
+ saveDuWorkTypeDTOList: [
+ {
+ videoUrl: '',
+ workTypeId: '',
+ file: {
+ videourl: '',
+ videourlfull: ''
+ }
+ }
+ ],
+ solutionId: ''
+ })
+ },
+ addItem(index) {
+ this.form.saveDuSolutionDTOList[index].saveDuWorkTypeDTOList.push({
+ videoUrl: '',
+ workTypeId: '',
+ file: {
+ videourl: '',
+ videourlfull: ''
+ }
+ })
+ },
+ deleItem(index) {
+ if (this.form.saveDuSolutionDTOList.length === 1) {
+ this.$message.warning('鑷冲皯淇濈暀涓�椤瑰唴瀹�')
+ return
+ }
+ this.form.saveDuSolutionDTOList.splice(index, 1)
+ },
+ result(e, a, b) {
+ this.form.saveDuSolutionDTOList[a].saveDuWorkTypeDTOList[b].videoUrl = e.imgurl
+ },
+ dele(a, b) {
+ if (this.form.saveDuSolutionDTOList[a].saveDuWorkTypeDTOList.length === 1) {
+ this.$message.warning('鑷冲皯淇濈暀涓�椤瑰唴瀹�')
+ return
+ }
+ this.form.saveDuSolutionDTOList[a].saveDuWorkTypeDTOList.splice(b, 1)
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+ .list {
+ width: 100%;
+ margin-bottom: 20px;
+ .list_item {
+ width: 100%;
+ margin-bottom: 20px;
+ &:last-child {
+ margin: 0 !important;
+ }
+ .list_item_input {
+ width: 100%;
+ margin-bottom: 15px;
+ .list_item_input_label {
+ margin-bottom: 10px;
+ font-size: 14px;
+ color: #606266;
+ span {
+ color: red;
+ margin-right: 4px;
+ }
+ }
+ .list_item_input_val {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ }
+ }
+ .list_item_table {
+
+ }
+ }
+ }
+</style>
diff --git a/platform/src/components/business/addJobType.vue b/platform/src/components/business/addJobType.vue
new file mode 100644
index 0000000..999934c
--- /dev/null
+++ b/platform/src/components/business/addJobType.vue
@@ -0,0 +1,60 @@
+<template>
+ <GlobalWindow
+ :title="title"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ 淇濋櫓鏂规
+ </GlobalWindow>
+</template>
+
+<script>
+ import BaseOpera from '@/components/base/BaseOpera'
+ import GlobalWindow from '@/components/common/GlobalWindow'
+ export default {
+ name: 'addJobType',
+ extends: BaseOpera,
+ components: { GlobalWindow },
+ data () {
+ return {
+ // 琛ㄥ崟鏁版嵁
+ form: {
+ id: null,
+ duSolutionList: [],
+ saveDuSolutionDTOList: [
+ {
+ id: '',
+ saveDuWorkTypeDTOList: [
+ {
+ videoUrl: '',
+ workTypeId: '',
+ file: {
+ videourl: '',
+ videourlfull: ''
+ }
+ }
+ ],
+ typeWork: [],
+ solutionId: ''
+ }
+ ]
+ },
+ insuranceScheme: []
+ }
+ },
+ created () {
+ this.config({
+ api: '/business/dispatchUnit',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+
+</style>
diff --git a/platform/src/components/business/dispatchUnitDetails.vue b/platform/src/components/business/dispatchUnitDetails.vue
new file mode 100644
index 0000000..3913223
--- /dev/null
+++ b/platform/src/components/business/dispatchUnitDetails.vue
@@ -0,0 +1,261 @@
+<template>
+ <GlobalWindow
+ :title="title"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ <div class="info">
+ <div class="info_list">
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅锛�</div>
+ <div class="info_list_item_val">{{form.name}}</div>
+ </div>
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅淇$敤浠g爜锛�</div>
+ <div class="info_list_item_val">{{form.code}}</div>
+ </div>
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅鐘舵�侊細</div>
+ <div class="info_list_item_val" v-if="form.unitStatus === 0">寰呭鏍�</div>
+ <div class="info_list_item_val" style="color: green;" v-if="form.unitStatus === 1">瀹℃牳閫氳繃</div>
+ <div class="info_list_item_val" style="color: red;" v-if="form.unitStatus === 2">瀹℃牳涓嶉�氳繃</div>
+ </div>
+ <div class="info_list_item">
+ <div class="info_list_item_label">娲鹃仯鍗曚綅璇﹁堪锛�</div>
+ <div class="info_list_item_val">{{form.content}}</div>
+ </div>
+ </div>
+ <div class="info_btns">
+ <el-button type="primary">淇敼娲鹃仯鍗曚綅</el-button>
+ <el-button type="primary">娣诲姞宸ョ</el-button>
+ </div>
+ <div class="info_table">
+ <div class="info_table_item" v-for="(item, index) in form.duSolutionList" :key="index">
+ <div class="info_table_item_label">淇濋櫓鏂规锛歿{item.solutionName}}</div>
+ <div class="info_table_item_content">
+ <el-table
+ :data="item.duWorktypeList"
+ border
+ style="width: 100%">
+ <el-table-column label="搴忓彿" width="80px">
+ <template slot-scope="scope">
+ <span>{{scope.$index + 1}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="workTypeName"
+ label="鎵�灞炲伐绉�">
+ </el-table-column>
+ <el-table-column
+ prop="name"
+ label="鎿嶄綔瑙嗛">
+ <template slot-scope="{row}">
+ <video loop controls width="150px" height="150px" :src="row.videoUrlFull"></video>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="checkDate"
+ label="瀹℃牳閫氳繃鏃ユ湡">
+ </el-table-column>
+ <el-table-column
+ label="鐘舵��">
+ <template slot-scope="{row}">
+ <span v-if="row.status === 0">寰呭鏍�</span>
+ <span v-if="row.status === 1">瀹℃牳閫氳繃</span>
+ <span v-if="row.status === 2">瀹℃牳涓嶉�氳繃</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔">
+ <template slot-scope="scope">
+ <el-button type="text" style="color: red;" v-if="scope.row.status === 2" @click="dele(scope.row.id, index, scope.$index)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
+ <div class="info_status">
+ <div class="info_status_label">瀹℃牳娴佺▼</div>
+ <div class="info_status_list">
+ <el-timeline :reverse="reverse">
+ <el-timeline-item
+ v-for="(activity, index) in form.duLogList"
+ :key="index">
+ <div style="display: flex; flex-direction: column;">
+ <span style="font-size: 16px; font-weight: 400; color: black;">
+ {{activity.title}}
+ <span style="font-size: 16px; font-weight: 400; color: black; margin-left: 10px;" v-if="activity.objType === 5 || activity.objType === 6 || activity.objType === 1 || activity.objType === 2">
+ 鎻愪氦鎰忚: -
+ </span>
+ </span>
+ <span style="margin-top: 5px; font-size: 12px; font-weight: 400; color: #999999;">
+ 鎿嶄綔鍛�-{{activity.creatorName}}锛坽{activity.companyName}}锛墈{activity.createDate}}
+ </span>
+ </div>
+ </el-timeline-item>
+ </el-timeline>
+ </div>
+ </div>
+ </div>
+ </GlobalWindow>
+</template>
+
+<script>
+ import BaseOpera from '@/components/base/BaseOpera'
+ import GlobalWindow from '@/components/common/GlobalWindow'
+ import { getById } from '@/api/business/dispatchUnit'
+ import { deleteById } from '@/api/business/duWorktype'
+ export default {
+ name: 'OperaDispatchUnitWindow',
+ extends: BaseOpera,
+ components: { GlobalWindow },
+ data () {
+ return {
+ // 琛ㄥ崟鏁版嵁
+ form: {
+ id: null,
+ name: '',
+ code: '',
+ content: '',
+ unitStatus: '',
+ duLogList: [],
+ duSolutionList: [],
+ saveDuSolutionDTOList: [
+ {
+ id: '',
+ saveDuWorkTypeDTOList: [
+ {
+ videoUrl: '',
+ workTypeId: '',
+ file: {
+ videourl: '',
+ videourlfull: ''
+ }
+ }
+ ],
+ typeWork: [],
+ solutionId: ''
+ }
+ ]
+ },
+ tableData: [],
+ insuranceScheme: [],
+ reverse: true,
+ activities: [{
+ content: '娲诲姩鎸夋湡寮�濮�',
+ timestamp: '2018-04-15'
+ }, {
+ content: '閫氳繃瀹℃牳',
+ timestamp: '2018-04-13'
+ }, {
+ content: '鍒涘缓鎴愬姛',
+ timestamp: '2018-04-11'
+ }]
+ }
+ },
+ created () {
+ this.config({
+ api: '/business/dispatchUnit',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ dele (id, b, c) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ュ伐绉�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deleteById(id)
+ .then(res => {
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.getDetails()
+ })
+ }).catch(() => {
+
+ });
+ },
+ open (title, target) {
+ this.title = title
+ this.form.id = target.id
+ this.visible = true
+ this.getDetails()
+ },
+ async getDetails() {
+ let res = await getById(this.form.id)
+ for (const key in this.form) {
+ this.form[key] = res[key]
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .info {
+ width: 100%;
+ .info_list {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ .info_list_item {
+ width: 33.3%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+ .info_list_item_label {
+ flex-shrink: 0;
+ width: 150px;
+ font-size: 14px;
+ color: black;
+ }
+ .info_list_item_val {
+ flex: 1;
+ font-size: 14px;
+ color: black;
+ }
+ }
+ }
+ .info_btns {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+ }
+ .info_table {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 15px;
+ .info_table_item {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 15px;
+ &:last-child {
+ margin: 0 !important;
+ }
+ .info_table_item_label {
+ font-size: 14px;
+ color: black;
+ margin-bottom: 10px;
+ }
+ .info_table_item_content {
+ width: 100%;
+ }
+ }
+ }
+ .info_status {
+ width: 100%;
+ .info_status_label {
+ width: 100%;
+ font-size: 18px;
+ font-weight: bold;
+ margin-bottom: 15px;
+ }
+ }
+ }
+</style>
diff --git a/platform/src/components/common/UploadAvatarVideo.vue b/platform/src/components/common/UploadAvatarVideo.vue
new file mode 100644
index 0000000..5031b58
--- /dev/null
+++ b/platform/src/components/common/UploadAvatarVideo.vue
@@ -0,0 +1,128 @@
+<template>
+ <div>
+ <el-upload
+ class="avatar-uploader"
+ accept=".mp4"
+ :style="customStyle"
+ :action="uploadImgUrl"
+ :data="uploadData"
+ :show-file-list="false"
+ :on-success="handleAvatarSuccess"
+ :on-error="uploadError"
+ :before-upload="beforeAvatarUpload">
+ <video v-if="file.videourlfull" :src="file.videourlfull" :style="customStyle" class="avatar" />
+ <div v-else :style="customStyle">
+ <i class="el-icon-plus avatar-uploader-icon"></i>
+ <div class="tips-style">{{ tipsLabel }}</div>
+ </div>
+ </el-upload>
+ </div>
+
+</template>
+
+<script>
+export default {
+ props: {
+ file: {
+ type: Object,
+ default: () => {}
+ },
+ tipsLabel: '',
+ customStyle: {
+ type: String,
+ default: 'width: 90px; height: 90px;'
+ },
+ uploadData: Object
+ },
+ data() {
+ return {
+ uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload'
+ }
+ },
+
+ methods: {
+ // 涓婁紶鍥剧墖
+ handleAvatarSuccess(res, file) {
+ if (res.code == 200) {
+ let { data } = res
+ this.file.videourl = data.imgaddr;
+ this.file.videourlfull = data.url;
+ this.$message.success('涓婁紶鎴愬姛')
+ this.$emit('uploadSuccess', { imgurl: data.imgaddr, imgurlfull: data.url, name: data.originname })
+ } else {
+ this.$tip.apiFailed('涓婁紶澶辫触')
+ }
+ this.$emit('uploadEnd')
+ },
+ uploadError() {
+ this.$tip.apiFailed('涓婁紶澶辫触')
+ this.$emit('endUpload')
+ },
+ // // 鎷︽埅
+ beforeAvatarUpload(file) {
+ this.$emit('uploadBegin')
+ return true
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+$image-width: 100px;
+.avatar-uploader {
+ width: $image-width;
+ height: $image-width;
+}
+::v-deep .el-upload {
+ border: 1px dashed #d9d9d9;
+ border-radius: 6px;
+ cursor: pointer;
+ position: relative;
+ width: $image-width;
+ height: $image-width;
+ overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+ border-color: #409EFF;
+}
+.avatar-uploader-icon {
+ line-height: 90px;
+ font-size: 28px;
+ color: #8c939d;
+ width: $image-width;
+ height: $image-width;
+ text-align: center;
+}
+.avatar {
+ width: $image-width;
+ height: $image-width;
+ display: block;
+}
+.tips-style {
+ height: 13px;
+ font-size: 13px;
+ font-weight: 400;
+ color: #999999;
+ line-height: 13px;
+}
+</style>
+<style lang="scss" scoped>
+::v-deep .el-upload--picture-card{
+ width: 90px !important;
+ height: 90px !important;
+}
+::v-deep .el-upload-list__item {
+ width: 90px !important;
+ height: 90px !important;
+}
+.icon {
+ -webkit-transform: translate(-50%,-50%);
+ -ms-transform: translate(-50%,-50%);
+ transform: translate(0%, -85%);
+}
+::v-deep .el-upload-list__item {
+ width: 90px !important;
+ height: 90px !important;
+}
+</style>
+
diff --git a/platform/src/views/business/dispatchUnit.vue b/platform/src/views/business/dispatchUnit.vue
new file mode 100644
index 0000000..52506af
--- /dev/null
+++ b/platform/src/views/business/dispatchUnit.vue
@@ -0,0 +1,116 @@
+<template>
+ <TableLayout :permissions="['business:dispatchunit:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="娲鹃仯鍗曚綅" prop="name">
+ <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ョ敤宸ュ崟浣嶅悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <ul class="toolbar" v-permissions="['business:dispatchunit:create']">
+ <li><el-button type="primary" @click="$refs.operaDispatchUnitWindow.open('娣诲姞娲鹃仯鍗曚綅')" v-permissions="['business:dispatchunit:create']">鏂板娲鹃仯鍗曚綅</el-button></li>
+ </ul>
+ <el-table
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ stripe
+ >
+ <el-table-column label="搴忓彿" width="80px">
+ <template slot-scope="scope">
+ <span>{{scope.$index + 1}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="name" label="娲鹃仯鍗曚綅"></el-table-column>
+ <el-table-column label="浼佷笟鐘舵��">
+ <template slot-scope="{row}">
+ <span v-if="row.unitStatus === 0">寰呭鏍�</span>
+ <span v-if="row.unitStatus === 1" style="color: green;">瀹℃牳閫氳繃</span>
+ <span v-if="row.unitStatus === 2" style="color: red;">瀹℃牳涓嶉�氳繃</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="createDate" label="娣诲姞鏃ユ湡"></el-table-column>
+ <el-table-column label="鏄惁鍋滅敤">
+ <template slot-scope="{row}">
+ <el-switch
+ @change="changeStatus($event, row)"
+ v-model="row.status"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ :active-value="1"
+ :inactive-value="0">
+ </el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column
+ v-if="containPermissions(['business:dispatchunit:update', 'business:dispatchunit:delete'])"
+ label="鎿嶄綔"
+ min-width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.dispatchUnitDetails.open('娲鹃仯鍗曚綅璇︽儏', row)" v-permissions="['business:dispatchunit:update']">鏌ョ湅璇︽儏</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ >
+ </pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaDispatchUnitWindow ref="operaDispatchUnitWindow" @success="handlePageChange"/>
+ <!-- 璇︽儏 -->
+ <dispatchUnitDetails ref="dispatchUnitDetails" @success="handlePageChange"/>
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaDispatchUnitWindow from '@/components/business/OperaDispatchUnitWindow'
+import dispatchUnitDetails from '@/components/business/dispatchUnitDetails'
+import { updateById } from '@/api/business/dispatchUnit'
+export default {
+ name: 'DispatchUnit',
+ extends: BaseTable,
+ components: { TableLayout, Pagination, OperaDispatchUnitWindow, dispatchUnitDetails },
+ data () {
+ return {
+ // 鎼滅储
+ searchForm: {
+ name: '',
+ dataType: 0
+ }
+ }
+ },
+ created () {
+ this.config({
+ module: '娲鹃仯鍗曚綅淇℃伅琛�',
+ api: '/business/dispatchUnit',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.search()
+ },
+ methods: {
+ // 淇敼鐘舵��
+ changeStatus(status, row) {
+ updateById({ status, id: row.id })
+ .then(res => {
+ this.search()
+ })
+ .catch(err => {
+ row.status = row.status === 0 ? 1 : 0
+ })
+ }
+ }
+}
+</script>
--
Gitblit v1.9.3