Merge remote-tracking branch 'origin/master'
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | 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 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | |
| | | |
| | | <script> |
| | | import TreeSelect from './TreeSelect' |
| | | import { fetchTree } from '@/api/system/menu' |
| | | import { fetchTree, fetchTree1 } from '@/api/system/menu' |
| | | export default { |
| | | name: 'MenuSelect', |
| | | components: { TreeSelect }, |
| | |
| | | value: {}, |
| | | inline: { |
| | | default: true |
| | | }, |
| | | type: { |
| | | default: '0' |
| | | }, |
| | | placeholder: { |
| | | default: 'è¯·éæ©èå' |
| | |
| | | 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) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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: '', |
| | | // éæé¤éæ©çèåID |
| | | 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 |
| | | // æ°å»ºï¼menu为空æ¶è¡¨ç¤ºæ°å»ºèå |
| | | 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> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <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> |
| | |
| | | </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 { |
| | | // æ¯å¦æ£å¨å¤çä¸ |
| | |
| | | // æ¥è¯¢æ°æ® |
| | | handlePageChange () { |
| | | this.isWorking.search = true |
| | | fetchTree(1) |
| | | fetchTree1() |
| | | .then(records => { |
| | | this.tableData.list = records |
| | | }) |
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | NODE_ENV = 'development' |
| | | |
| | | <<<<<<< HEAD |
| | | VUE_APP_API = 'http://192.168.0.134:10025/' |
| | | ======= |
| | | VUE_APP_CONTEXT_PATH = '/' |
| | | VUE_APP_API_PREFIX = '/api' |
| | | |
| | |
| | | |
| | | # #æµè¯æå¡å¨ |
| | | #VUE_APP_API = 'https://dmtest.ahapp.net/preselect_admin_interface' |
| | | >>>>>>> c6c95a49be6194989c124b8fd316fb5d434bd153 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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}`) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ ¹æ®IDå é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/duWorktype/delete/${id}`) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ ¹æ®æ¡ä»¶å·¥ç§å表 |
| | | export function findListByDTO (data) { |
| | | return request.post('/business/worktype/findListByDTO', data) |
| | | } |
| | |
| | | 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 |
| | | } |
| | | |
| | | // æ°å»º |
| | |
| | | } |
| | | |
| | | // æ¥è¯¢èåæ |
| | | <<<<<<< HEAD |
| | | export function fetchMenuTree () { |
| | | return request.get('/system/menu/treeNodes?type=1') |
| | | ======= |
| | | export function fetchMenuTree (params) { |
| | | return request.get('/system/menu/treeNodes', { params }) |
| | | >>>>>>> c6c95a49be6194989c124b8fd316fb5d434bd153 |
| | | } |
| | | |
| | | // æåº |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="æ´¾é£åä½ä¿¡ç¨ä»£ç " 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: '请è¾å
¥æ´¾é£åä½åç§°' } |
| | | ], |
| | | code: [ |
| | | { required: true, message: '请è¾å
¥æ´¾é£åä½ä¿¡ç¨ä»£ç ' } |
| | | ], |
| | | content: [ |
| | | { required: true, message: '请è¾å
¥æ´¾é£åä½æè¿°' } |
| | | ] |
| | | }, |
| | | 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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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">æ´¾é£åä½ä¿¡ç¨ä»£ç ï¼</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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |