¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="50%" |
| | | :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="type"> |
| | | <el-radio-group v-model="form.type" > |
| | | <el-radio :label="0" >宿³°ç©æµå¸è´§</el-radio> |
| | | <el-radio :label="1" >宿³°ç©æµè£
è´§</el-radio> |
| | | <el-radio :label="2" >å¸å
¬å¸å¸è´§</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="工使¶é´ï¼" prop="startTime"> |
| | | <div style=" display: inline-block"> |
| | | <el-time-picker |
| | | style="width: 150px;display: inline-block" |
| | | v-model="form.startTime" |
| | | format="HH:mm" |
| | | value-format="HH:mm" |
| | | placeholder="è¯·éæ©å¼å§æ¶é´" |
| | | > |
| | | </el-time-picker> è³ |
| | | <el-time-picker |
| | | style="width: 150px;display: inline-block" |
| | | v-model="form.endTime" |
| | | format="HH:mm" |
| | | value-format="HH:mm" |
| | | placeholder="è¯·éæ©ç»ææ¶é´" |
| | | > |
| | | </el-time-picker> |
| | | </div> |
| | | |
| | | </el-form-item> |
| | | <el-form-item label="å«å·çå¾
æ¶é´(åé)ï¼" prop="waitCallTime"> |
| | | <el-input type="number" v-model="form.waitCallTime" placeholder="请è¾å
¥å«å·çå¾
æ¶é´(åé)" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { numRuleGtZero } from '@/utils/form' |
| | | import { allList } from '@/api/platform/platformGroup' |
| | | import { getList as deviceList } from '@/api/business/device' |
| | | export default { |
| | | name: 'OperaPlatformWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | groupList: [], |
| | | broadcastList: [], |
| | | ledList: [], |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | type: 0, |
| | | startTime: '', |
| | | endTime: '', |
| | | waitCallTime: '' |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [{ required: true, message: '请è¾å
¥åç»åç§° ', trigger: 'blur' }], |
| | | type: [{ required: true, message: 'è¯·éæ©ä¸å¡ç±»å '}] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/platform/platformGroup', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | seleTime(){}, |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | // æ°å»º |
| | | 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] |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .labelTip{ |
| | | font-size: 12px; |
| | | color: #666666; |
| | | } |
| | | </style> |
| | |
| | | <SearchFormCollapse slot="search-form" :need-more="false"> |
| | | <el-form ref="searchForm" :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-input v-model="searchForm.name" clearable placeholder="请è¾å
¥æå°åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" > |
| | | <el-select v-model="searchForm.groupId" placeholder="è¯·éæ©æå°åç»" @change="search" clearable> |
| | | <el-option |
| | | v-for="item in groupList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:hksync:platforms']"> |
| | | <li><el-button type="primary" :loading="working" @click="syncData" icon="el-icon-plus" v-permissions="['business:hksync:platforms']">忥</el-button></li> |
| | | <li><el-button type="primary" :loading="working1" @click="syncStatus" icon="el-icon-plus" v-permissions="['business:hksync:platforms']">åæ¥ç¶æ</el-button></li> |
| | | <li><el-button type="primary" :loading="working1" @click="syncStatus" icon="el-icon-plus" v-permissions="['business:hksync:platforms']">忥宿¶ç¶æ</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="æå°åç§°" fixed min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="æå°ç¼ç " fixed min-width="100px"></el-table-column> |
| | | <el-table-column prop="groupName" label="æå±æå°ç»" fixed min-width="100px"></el-table-column> |
| | | <el-table-column prop="groupName" label="æå±æå°ç»" fixed min-width="150px"></el-table-column> |
| | | <el-table-column prop="workingNum" label="åæ¶å«å·è½¦è¾æ°" min-width="120px"></el-table-column> |
| | | <el-table-column prop="stayTmeoutAlarmTime" label="åçè¶
æ¶æ¥è¦æ¶é´(åéï¼" min-width="180px"> |
| | | <template scope="{row}">{{row.stayTmeoutAlarmTime?(row.stayTmeoutAlarmTime):'-'}}</template> |
| | |
| | | <template scope="{row}"> {{row.workTimeoutAlarmTime?(row.workTimeoutAlarmTime):'-'}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="workRate" label="æå°ä½ä¸æç(ä¸åª/å°æ¶)" min-width="180px"></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="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="platformStatus" label="æå°ç¶æ" min-width="100px"> |
| | | <template scope="{row}"> |
| | | <span v-if="row.platformStatus == 0">æ 车</span> |
| | |
| | | import SearchFormCollapse from '@/components/common/SearchFormCollapse' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaPlatformWindow from '@/components/business/OperaPlatformWindow' |
| | | import {allList} from "@/api/platform/platformGroup"; |
| | | export default { |
| | | name: 'Platform', |
| | | extends: BaseTable, |
| | | components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformWindow }, |
| | | data () { |
| | | return { |
| | | groupList:[], |
| | | // æç´¢ |
| | | working: false, |
| | | working1: false, |
| | | searchForm: { |
| | | name: '' |
| | | name: '', |
| | | groupId:null |
| | | } |
| | | } |
| | | }, |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.loadGroupList() |
| | | }, |
| | | methods: { |
| | | loadGroupList () { |
| | | allList({}) |
| | | .then(res => { |
| | | this.groupList = res || [] |
| | | }) |
| | | }, |
| | | changeStatus (e, row) { |
| | | this.api.updateStatusById({ |
| | | id: row.id, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:platformgroup:query']"> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:platformgroup:create','business:platformgroup:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaPlatformGroupWindow.open('æ°å»ºæå°åç»')" icon="el-icon-plus" v-permissions="['business:platformgroup:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:platformgroup:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="æå°ç»åç§°" fixed min-width="150px" align="center"></el-table-column> |
| | | <el-table-column prop="startTime" label="工使¶é´" min-width="150px" align="center"> |
| | | <template scope="{row}"> |
| | | {{row.startTime || ' '}} - {{row.endTime || ' '}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="ä¸å¡ç±»å" align="center" min-width="150px"> |
| | | <template scope="{row}"> |
| | | <span v-if="row.type == 0">宿³°ç©æµå¸è´§</span> |
| | | <span v-if="row.type == 1">宿³°ç©æµè£
è´§</span> |
| | | <span v-if="row.type == 2">å¸å
¬å¸å¸è´§</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="waitCallTime" label="å«å·çå¾
æ¶é´ï¼åéï¼" min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="editDate" label="æè¿æ´æ°æ¶é´" min-width="140px" align="center"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:platformgroup:update', 'business:platformgroup:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | align="center" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaPlatformGroupWindow.open('ç¼è¾æå°åç»', row)" icon="el-icon-edit" v-permissions="['business:platformgroup:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:platformgroup:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaPlatformGroupWindow ref="operaPlatformGroupWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaPlatformGroupWindow from '@/components/business/OperaPlatformGroupWindow' |
| | | export default { |
| | | name: 'Platform', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaPlatformGroupWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | working: false, |
| | | working1: false, |
| | | searchForm: { |
| | | name: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'æå°ä¿¡æ¯è¡¨', |
| | | api: '/platform/platformGroup', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | } |
| | | } |
| | | </script> |
| | |
| | | )>0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯¥ç±»ååç»å·²ç»å建ï¼è¯·è¿åå·æ°é¡µé¢æ¥çï¼"); |
| | | } |
| | | |
| | | platformGroup.setStatus(Constants.ZERO); |
| | | platformGroup.setIsdeleted(Constants.ZERO); |
| | | platformGroup.setCreator(platformGroup.getLoginUserInfo().getId()); |
| | | platformGroup.setCreateDate(new Date()); |
| | | platformGroup.setEditDate(platformGroup.getEditDate()); |
| | | platformGroup.setEditDate(platformGroup.getCreateDate()); |
| | | platformGroup.setEditor(platformGroup.getCreator()); |
| | | platformGroupMapper.insert(platformGroup); |
| | | return platformGroup.getId(); |
| | |
| | | )>0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯¥ç±»ååç»å·²ç»å建ï¼è¯·è¿åå·æ°é¡µé¢æ¥çï¼"); |
| | | } |
| | | platformGroup.setEditDate(platformGroup.getEditDate()); |
| | | platformGroup.setEditor(platformGroup.getCreator()); |
| | | platformGroup.setEditDate(new Date()); |
| | | platformGroup.setEditor(platformGroup.getLoginUserInfo().getId()); |
| | | platformGroupMapper.updateById(platformGroup); |
| | | } |
| | | |
| | |
| | | job.setIsdeleted(Constants.ZERO); |
| | | job.setType(Constants.platformJobType.wxcxh);//é»è®¤æ¯å¤å车å¸è´§ |
| | | job.setStatus(Constants.PlatformJobStatus.WAIT_CONFIRM.getKey());//é»è®¤å¾
ç¡®è®¤ç¶æ |
| | | //æ¥è¯¢è½¦è¾æ¯å¦èªæè½¦ï¼ä»¥åjobNumè¡¨ç¤ºä½æ±ä½ä¸æ°éï¼é已离åçä½ä¸æ°) |
| | | Cars car = carsMapper.selectOne(new QueryWrapper<Cars>() |
| | | .select("*,(select count(1) from platform_job b where b.plate_num='"+param.getPlateNumber()+"' and b.status in("+ |
| | | Constants.PlatformJobStatus.LEAVED+")) as jobNum") |
| | |
| | | job.setIsdeleted(Constants.ZERO); |
| | | job.setType(Constants.platformJobType.wxczh);//é»è®¤æ¯å¤å车è£
好 |
| | | job.setStatus(Constants.PlatformJobStatus.WAIT_CONFIRM.getKey());//é»è®¤å¾
ç¡®è®¤ç¶æ |
| | | //æ¥è¯¢è½¦è¾æ¯å¦èªæè½¦ï¼ä»¥åjobNumè¡¨ç¤ºä½æ±ä½ä¸æ°éï¼é已离åçä½ä¸æ°) |
| | | Cars car = carsMapper.selectOne(new QueryWrapper<Cars>() |
| | | .select("*,(select count(1) from platform_job b where b.plate_num='"+param.getPlateNumber()+"' and b.status in("+ |
| | | Constants.PlatformJobStatus.LEAVED+")) as jobNum") |