正在显示
13 个修改的文件
包含
726 行增加
和
63 行删除
| @@ -975,6 +975,12 @@ | @@ -975,6 +975,12 @@ | ||
| 975 | "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", | 975 | "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", |
| 976 | "dev": true | 976 | "dev": true |
| 977 | }, | 977 | }, |
| 978 | + "babel-plugin-syntax-jsx": { | ||
| 979 | + "version": "6.18.0", | ||
| 980 | + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", | ||
| 981 | + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=", | ||
| 982 | + "dev": true | ||
| 983 | + }, | ||
| 978 | "babel-plugin-syntax-object-rest-spread": { | 984 | "babel-plugin-syntax-object-rest-spread": { |
| 979 | "version": "6.13.0", | 985 | "version": "6.13.0", |
| 980 | "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", | 986 | "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", |
| @@ -1317,6 +1323,15 @@ | @@ -1317,6 +1323,15 @@ | ||
| 1317 | "babel-types": "^6.24.1" | 1323 | "babel-types": "^6.24.1" |
| 1318 | } | 1324 | } |
| 1319 | }, | 1325 | }, |
| 1326 | + "babel-plugin-transform-vue-jsx": { | ||
| 1327 | + "version": "3.7.0", | ||
| 1328 | + "resolved": "https://registry.npmjs.org/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-3.7.0.tgz", | ||
| 1329 | + "integrity": "sha512-W39X07/n3oJMQd8tALBO+440NraGSF//Lo1ydd/9Nme3+QiRGFBb1Q39T9iixh0jZPPbfv3so18tNoIgLatymw==", | ||
| 1330 | + "dev": true, | ||
| 1331 | + "requires": { | ||
| 1332 | + "esutils": "^2.0.2" | ||
| 1333 | + } | ||
| 1334 | + }, | ||
| 1320 | "babel-polyfill": { | 1335 | "babel-polyfill": { |
| 1321 | "version": "6.26.0", | 1336 | "version": "6.26.0", |
| 1322 | "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", | 1337 | "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", |
| @@ -33,10 +33,13 @@ | @@ -33,10 +33,13 @@ | ||
| 33 | "autoprefixer": "^6.7.2", | 33 | "autoprefixer": "^6.7.2", |
| 34 | "axios-mock-adapter": "^1.7.1", | 34 | "axios-mock-adapter": "^1.7.1", |
| 35 | "babel-core": "^6.22.1", | 35 | "babel-core": "^6.22.1", |
| 36 | + "babel-helper-vue-jsx-merge-props": "^2.0.3", | ||
| 36 | "babel-loader": "^6.2.10", | 37 | "babel-loader": "^6.2.10", |
| 38 | + "babel-plugin-syntax-jsx": "^6.18.0", | ||
| 37 | "babel-plugin-transform-runtime": "^6.22.0", | 39 | "babel-plugin-transform-runtime": "^6.22.0", |
| 40 | + "babel-plugin-transform-vue-jsx": "^3.7.0", | ||
| 38 | "babel-polyfill": "^6.16.0", | 41 | "babel-polyfill": "^6.16.0", |
| 39 | - "babel-preset-env": "^1.2.1", | 42 | + "babel-preset-env": "^1.7.0", |
| 40 | "babel-preset-es2015": "^6.0.0", | 43 | "babel-preset-es2015": "^6.0.0", |
| 41 | "babel-preset-stage-2": "^6.22.0", | 44 | "babel-preset-stage-2": "^6.22.0", |
| 42 | "babel-register": "^6.22.0", | 45 | "babel-register": "^6.22.0", |
src/api/base.js
0 → 100644
src/api/empt/location_api.js
0 → 100644
| 1 | +import axios from 'axios' | ||
| 2 | + | ||
| 3 | +let base = 'empt-location/job'; | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +export const remove = params => { return axios({ | ||
| 10 | + method: 'DELETE', | ||
| 11 | + url: `${base}/del`, | ||
| 12 | + data: params, | ||
| 13 | + headers: { | ||
| 14 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 15 | + } | ||
| 16 | +})}; | ||
| 17 | + | ||
| 18 | +//批量删除 | ||
| 19 | +export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | ||
| 20 | + | ||
| 21 | +export const edit = params => { return axios({ | ||
| 22 | + method: 'PUT', | ||
| 23 | + url: `${base}/edit`, | ||
| 24 | + data: params, | ||
| 25 | + headers: { | ||
| 26 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 27 | + } | ||
| 28 | +})}; | ||
| 29 | + | ||
| 30 | +export const add = params => { return axios({ | ||
| 31 | + method: 'POST', | ||
| 32 | + url: `${base}/add`, | ||
| 33 | + params: params, | ||
| 34 | + headers: { | ||
| 35 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 36 | + } | ||
| 37 | +})}; | ||
| 38 | + | ||
| 39 | +export const update = params => { return axios({ | ||
| 40 | + method: 'PUT', | ||
| 41 | + url: `${base}/update`, | ||
| 42 | + data: params, | ||
| 43 | + headers: { | ||
| 44 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 45 | + } | ||
| 46 | +})}; |
| @@ -46,7 +46,7 @@ export default { | @@ -46,7 +46,7 @@ export default { | ||
| 46 | login: data =>{ | 46 | login: data =>{ |
| 47 | return axios({ | 47 | return axios({ |
| 48 | method: 'POST', // 请求协议 | 48 | method: 'POST', // 请求协议 |
| 49 | - url: '/hqpt-user-center/login', // 请求的地址 | 49 | + url: 'hqpt-user-center/login', // 请求的地址 |
| 50 | data: qs.stringify(data), // post 请求的数据 | 50 | data: qs.stringify(data), // post 请求的数据 |
| 51 | timeout: 30000, // 超时时间, 单位毫秒 | 51 | timeout: 30000, // 超时时间, 单位毫秒 |
| 52 | headers: { | 52 | headers: { |
src/api/job_api.js
0 → 100644
| 1 | +import axios from 'axios' | ||
| 2 | + | ||
| 3 | +let base = 'hqpt-process/job'; | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +export const remove = params => { return axios({ | ||
| 10 | + method: 'DELETE', | ||
| 11 | + url: `${base}/del`, | ||
| 12 | + data: params, | ||
| 13 | + headers: { | ||
| 14 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 15 | + } | ||
| 16 | +})}; | ||
| 17 | + | ||
| 18 | +//批量删除 | ||
| 19 | +export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | ||
| 20 | + | ||
| 21 | +export const edit = params => { return axios({ | ||
| 22 | + method: 'PUT', | ||
| 23 | + url: `${base}/edit`, | ||
| 24 | + data: params, | ||
| 25 | + headers: { | ||
| 26 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 27 | + } | ||
| 28 | +})}; | ||
| 29 | + | ||
| 30 | +export const add = params => { return axios({ | ||
| 31 | + method: 'POST', | ||
| 32 | + url: `${base}/add`, | ||
| 33 | + params: params, | ||
| 34 | + headers: { | ||
| 35 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 36 | + } | ||
| 37 | +})}; | ||
| 38 | + | ||
| 39 | +export const startJob = params => { return axios({ | ||
| 40 | + method: 'PUT', | ||
| 41 | + url: `${base}/start`, | ||
| 42 | + data: params, | ||
| 43 | + headers: { | ||
| 44 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 45 | + } | ||
| 46 | +})}; |
src/api/process_api.js
0 → 100644
| 1 | +import axios from 'axios' | ||
| 2 | + | ||
| 3 | +let base = 'hqpt-process/process'; | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +export const remove = params => { return axios({ | ||
| 10 | + method: 'DELETE', | ||
| 11 | + url: `${base}/del`, | ||
| 12 | + data: params, | ||
| 13 | + headers: { | ||
| 14 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 15 | + } | ||
| 16 | +})}; | ||
| 17 | + | ||
| 18 | +//批量删除 | ||
| 19 | +export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | ||
| 20 | + | ||
| 21 | +export const edit = params => { return axios({ | ||
| 22 | + method: 'PUT', | ||
| 23 | + url: `${base}/edit`, | ||
| 24 | + data: params, | ||
| 25 | + headers: { | ||
| 26 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 27 | + } | ||
| 28 | +})}; | ||
| 29 | + | ||
| 30 | +export const add = params => { return axios({ | ||
| 31 | + method: 'POST', | ||
| 32 | + url: `${base}/add`, | ||
| 33 | + params: params, | ||
| 34 | + headers: { | ||
| 35 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 36 | + } | ||
| 37 | +})}; | ||
| 38 | + | ||
| 39 | +export const updateRolePerm = params => { return axios({ | ||
| 40 | + method: 'PUT', | ||
| 41 | + url: `${base}/permSet`, | ||
| 42 | + data: params, | ||
| 43 | + headers: { | ||
| 44 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 45 | + } | ||
| 46 | +})}; | ||
| 47 | + | ||
| 48 | +export const vacationTypeOptions = [ | ||
| 49 | + { | ||
| 50 | + value: '0', | ||
| 51 | + label: '运维检查' | ||
| 52 | + }, | ||
| 53 | + { | ||
| 54 | + value: '1', | ||
| 55 | + label: '设备故障' | ||
| 56 | + }, | ||
| 57 | + { | ||
| 58 | + value: '2', | ||
| 59 | + label: '电话报修' | ||
| 60 | + } | ||
| 61 | +]; |
| @@ -24,6 +24,7 @@ import Key from './views/staff/key.vue' | @@ -24,6 +24,7 @@ import Key from './views/staff/key.vue' | ||
| 24 | import Maintain from './views/staff/maintain.vue' | 24 | import Maintain from './views/staff/maintain.vue' |
| 25 | import ComeCar from './views/staff/come_car.vue' | 25 | import ComeCar from './views/staff/come_car.vue' |
| 26 | import OnDuty from './views/staff/on_duty.vue' | 26 | import OnDuty from './views/staff/on_duty.vue' |
| 27 | +import Location from './views/empt/Location.vue' | ||
| 27 | 28 | ||
| 28 | let routes = [ | 29 | let routes = [ |
| 29 | { | 30 | { |
| @@ -75,6 +76,15 @@ let routes = [ | @@ -75,6 +76,15 @@ let routes = [ | ||
| 75 | ] | 76 | ] |
| 76 | }, | 77 | }, |
| 77 | { | 78 | { |
| 79 | + path: '/empt', | ||
| 80 | + component: Home, | ||
| 81 | + name: '能源管理', | ||
| 82 | + iconCls: 'fa fa-id-card-o', | ||
| 83 | + children: [ | ||
| 84 | + { path: '/location', component: Location, name: '能源缴费' }, | ||
| 85 | + ] | ||
| 86 | + }, | ||
| 87 | + { | ||
| 78 | path: '/satff', | 88 | path: '/satff', |
| 79 | component: Home, | 89 | component: Home, |
| 80 | name: '生活保障部门', | 90 | name: '生活保障部门', |
src/views/empt/Location.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <section> | ||
| 3 | + <!--工具条--> | ||
| 4 | + <el-col :span="24" class="toolbar" style="padding-bottom: 0px;"> | ||
| 5 | + <el-form :inline="true" :model="filters"> | ||
| 6 | + <el-form-item> | ||
| 7 | + <el-input v-model="filters.processName" placeholder="公寓名称"></el-input> | ||
| 8 | + </el-form-item> | ||
| 9 | + <el-form-item> | ||
| 10 | + <el-button type="primary" v-on:click="getProcessList()">查询</el-button> | ||
| 11 | + </el-form-item> | ||
| 12 | + <el-form-item> | ||
| 13 | + <el-button type="primary" @click="handleAdd()">新增</el-button> | ||
| 14 | + </el-form-item> | ||
| 15 | + </el-form> | ||
| 16 | + </el-col> | ||
| 17 | + | ||
| 18 | + <!--列表--> | ||
| 19 | + <tree-table :data="locationList" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange"> | ||
| 20 | + <el-table-column prop="adrname" label="名称" width="110px" align="center" sortable> | ||
| 21 | + <template slot-scope="scope"> | ||
| 22 | + <span>{{ scope.row.adrname }}</span> | ||
| 23 | + </template> | ||
| 24 | + </el-table-column> | ||
| 25 | + <el-table-column label="类型" width="120px" align="center" sortable> | ||
| 26 | + <template slot-scope="scope"> | ||
| 27 | + <span>{{ scope.row.type }}</span> | ||
| 28 | + </template> | ||
| 29 | + </el-table-column> | ||
| 30 | + <el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width"> | ||
| 31 | + <template slot-scope="scope"> | ||
| 32 | + <el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button> | ||
| 33 | + <el-button size="mini" type="danger" @click="handleModifyStatus(scope.row,'deleted')">{{ $t('table.delete') }}</el-button> | ||
| 34 | + </template> | ||
| 35 | + </el-table-column> | ||
| 36 | + </tree-table> | ||
| 37 | + | ||
| 38 | + <!--工具条--> | ||
| 39 | + <el-col :span="24" class="toolbar"> | ||
| 40 | + <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | ||
| 41 | + <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | ||
| 42 | + </el-pagination> | ||
| 43 | + </el-col> | ||
| 44 | + | ||
| 45 | + <!--编辑界面--> | ||
| 46 | + <el-dialog title="编辑" :visible.sync="editFormVisible" :close-on-click-modal="false"> | ||
| 47 | + <el-form :model="editForm" label-width="80px" :rules="editFormRules" ref="editForm"> | ||
| 48 | + <el-form-item label="ID"> | ||
| 49 | + <span>{{editForm.roleId}}</span> | ||
| 50 | + </el-form-item> | ||
| 51 | + <el-form-item label="岗位名称"> | ||
| 52 | + <el-input v-model="editForm.roleName" auto-complete="off" placeholder="请输入岗位/角色名称:例如:ROLE_name"></el-input> | ||
| 53 | + </el-form-item> | ||
| 54 | + <el-form-item label="岗位描述"> | ||
| 55 | + <el-input v-model="editForm.description" auto-complete="off" placeholder="请输入岗位/角色描述:例如:用户管理员"></el-input> | ||
| 56 | + </el-form-item> | ||
| 57 | + <el-form-item label="部门名称"> | ||
| 58 | + <el-select v-model="editForm.departmentId" placeholder="请选择"> | ||
| 59 | + <el-option | ||
| 60 | + v-for="item in departmentNameList" | ||
| 61 | + :key="item.departmentId" | ||
| 62 | + :label="item.departmentName" | ||
| 63 | + :value="item.departmentId"> | ||
| 64 | + </el-option> | ||
| 65 | + </el-select> | ||
| 66 | + </el-form-item> | ||
| 67 | + </el-form> | ||
| 68 | + <div slot="footer" class="dialog-footer"> | ||
| 69 | + <el-button @click.native="editFormVisible = false">取消</el-button> | ||
| 70 | + <el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button> | ||
| 71 | + </div> | ||
| 72 | + </el-dialog> | ||
| 73 | + | ||
| 74 | + <!--新增界面--> | ||
| 75 | + <el-dialog title="新增" :visible.sync="addFormVisible" width="60%"> | ||
| 76 | + <el-form :model="addForm" label-width="80px" :rules="addFormRules" ref="addForm"> | ||
| 77 | + <el-form-item label="工单名称" prop="processname"> | ||
| 78 | + <el-input v-model="addForm.processname" auto-complete="off" placeholder="请输入工单标题:"></el-input> | ||
| 79 | + </el-form-item> | ||
| 80 | + <el-form-item label="开始日期" prop="begindate"> | ||
| 81 | + <el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" placeholder="选择时间" v-model="addForm.begindate" style="width: 100%;"></el-date-picker> | ||
| 82 | + </el-form-item> | ||
| 83 | + <el-form-item label="结束日期" prop="enddate"> | ||
| 84 | + <el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" placeholder="选择时间" v-model="addForm.enddate" style="width: 100%;"></el-date-picker> | ||
| 85 | + </el-form-item> | ||
| 86 | + <el-form-item label="工单类型" prop="vacationtype"> | ||
| 87 | + <el-select v-model="addForm.vacationtype" placeholder="请选择"> | ||
| 88 | + <el-option label="运维检查" value="0"></el-option> | ||
| 89 | + <el-option label="设备故障" value="1"></el-option> | ||
| 90 | + <el-option label="电话报修" value="3"></el-option> | ||
| 91 | + </el-select> | ||
| 92 | + </el-form-item> | ||
| 93 | + <el-form-item label="工单内容" prop="reason"> | ||
| 94 | + <el-input type="textarea" v-model="addForm.reason"></el-input> | ||
| 95 | + </el-form-item> | ||
| 96 | + <el-form-item> | ||
| 97 | + <el-cascader-panel | ||
| 98 | + :options="options" | ||
| 99 | + v-model="jodUserId" | ||
| 100 | + @change="cascaderhandleChange" | ||
| 101 | + ></el-cascader-panel> | ||
| 102 | + </el-form-item> | ||
| 103 | + </el-form> | ||
| 104 | + <div slot="footer" class="dialog-footer"> | ||
| 105 | + <el-button @click.native="addFormVisible = false">取消</el-button> | ||
| 106 | + <el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button> | ||
| 107 | + </div> | ||
| 108 | + </el-dialog> | ||
| 109 | + </section> | ||
| 110 | +</template> | ||
| 111 | + | ||
| 112 | +<script> | ||
| 113 | + import util from '../../common/js/util' | ||
| 114 | + import { getList,add} from '@/api/empt/location_api'; | ||
| 115 | + import moment from 'moment' | ||
| 116 | + import parseTime from '@/utils' | ||
| 117 | + import loginUserInfo from '@/api/base' | ||
| 118 | + import ElFormItem from "../../../node_modules/element-ui/packages/form/src/form-item.vue"; | ||
| 119 | + export default { | ||
| 120 | + components: {ElFormItem}, | ||
| 121 | + data() { | ||
| 122 | + return { | ||
| 123 | + filters: { | ||
| 124 | + processName: '', | ||
| 125 | + parseTime: parseTime | ||
| 126 | + }, | ||
| 127 | + locationList:[], | ||
| 128 | + processList: [], | ||
| 129 | + permissons: [], | ||
| 130 | + permIds: [], | ||
| 131 | + total: 0, | ||
| 132 | + pageNum: 1, | ||
| 133 | + pageSize: 5, | ||
| 134 | + listLoading: false, | ||
| 135 | + sels: [],//列表选中列 | ||
| 136 | + //编辑界面是否显示 | ||
| 137 | + editFormVisible: false, | ||
| 138 | + editLoading: false, | ||
| 139 | + editFormRules: { | ||
| 140 | + roleName: [ | ||
| 141 | + { required: true, message: '请输入岗位/角色名称', trigger: 'blur' } | ||
| 142 | + ] | ||
| 143 | + }, | ||
| 144 | + //编辑界面数据 | ||
| 145 | + editForm: { | ||
| 146 | + roleId: 1, | ||
| 147 | + description: '', | ||
| 148 | + roleName: '', | ||
| 149 | + roleSign: 1, | ||
| 150 | + departmentId:'' | ||
| 151 | + }, | ||
| 152 | + //用户ID | ||
| 153 | + | ||
| 154 | + //执行任务人ID | ||
| 155 | + jodUserId: 0, | ||
| 156 | + //新增界面是否显示 | ||
| 157 | + addFormVisible: false, | ||
| 158 | + //设置权限界面是否显示 | ||
| 159 | + PermFormVisible: false, | ||
| 160 | + addLoading: false, | ||
| 161 | + addFormRules: { | ||
| 162 | + roleName: [ | ||
| 163 | + { required: true, message: '请输入岗位/角色名称', trigger: 'blur' } | ||
| 164 | + ], | ||
| 165 | + description: [ | ||
| 166 | + { required: true, message: '请输入岗位/角色描述', trigger: 'blur' } | ||
| 167 | + ] | ||
| 168 | + }, | ||
| 169 | + //新增界面数据 | ||
| 170 | + addForm: { | ||
| 171 | + processname: '', | ||
| 172 | + begindate: '', | ||
| 173 | + enddate: '', | ||
| 174 | + vacationtype:'', | ||
| 175 | + reason: '', | ||
| 176 | + userId: '' | ||
| 177 | + }, | ||
| 178 | + permForm: { | ||
| 179 | + roleId: 1, | ||
| 180 | + description: '', | ||
| 181 | + roleName: '', | ||
| 182 | + roleSign: 1, | ||
| 183 | + permissions: [] | ||
| 184 | + }, | ||
| 185 | + centerDialogVisible: false, | ||
| 186 | + dialogData:{ | ||
| 187 | + process:{ | ||
| 188 | + processname: '' | ||
| 189 | + } | ||
| 190 | + }, | ||
| 191 | + pickerOptions: { | ||
| 192 | + disabledDate(time) { | ||
| 193 | + return time.getTime() < Date.now(); | ||
| 194 | + }, | ||
| 195 | + shortcuts: [{ | ||
| 196 | + text: '今天', | ||
| 197 | + onClick(picker) { | ||
| 198 | + picker.$emit('pick', new Date()); | ||
| 199 | + } | ||
| 200 | + }, { | ||
| 201 | + text: '昨天', | ||
| 202 | + onClick(picker) { | ||
| 203 | + const date = new Date(); | ||
| 204 | + date.setTime(date.getTime() - 3600 * 1000 * 24); | ||
| 205 | + picker.$emit('pick', date); | ||
| 206 | + } | ||
| 207 | + }, { | ||
| 208 | + text: '一周前', | ||
| 209 | + onClick(picker) { | ||
| 210 | + const date = new Date(); | ||
| 211 | + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); | ||
| 212 | + picker.$emit('pick', date); | ||
| 213 | + } | ||
| 214 | + }] | ||
| 215 | + }, | ||
| 216 | + options:[{ | ||
| 217 | + value: '1', | ||
| 218 | + label: '测试公司', | ||
| 219 | + children: [{ | ||
| 220 | + value: '2', | ||
| 221 | + label: '测试部门一', | ||
| 222 | + children: [{ | ||
| 223 | + value: '1', | ||
| 224 | + label: '测试岗位1', | ||
| 225 | + children: [{ | ||
| 226 | + value: '1', | ||
| 227 | + label: '测试人员1' | ||
| 228 | + }] | ||
| 229 | + }] | ||
| 230 | + }, { | ||
| 231 | + value: '3', | ||
| 232 | + label: '测试部门二', | ||
| 233 | + children: [{ | ||
| 234 | + value: '2', | ||
| 235 | + label: '测试岗位2', | ||
| 236 | + children: [{ | ||
| 237 | + value: '1', | ||
| 238 | + label: '测试人员2' | ||
| 239 | + }] | ||
| 240 | + }, { | ||
| 241 | + value: '3', | ||
| 242 | + label: '测试岗位3', | ||
| 243 | + children: [{ | ||
| 244 | + value: '1', | ||
| 245 | + label: '测试人员3' | ||
| 246 | + }] | ||
| 247 | + }] | ||
| 248 | + }] | ||
| 249 | + }], | ||
| 250 | + } | ||
| 251 | + }, | ||
| 252 | + methods: { | ||
| 253 | + //性别显示转换 | ||
| 254 | + formatType: function (row, column) { | ||
| 255 | + let msg = '未知'; | ||
| 256 | + switch (row.auditresuld){ | ||
| 257 | + case 0: | ||
| 258 | + msg='未执行'; | ||
| 259 | + break; | ||
| 260 | + case 1: | ||
| 261 | + msg='执行中'; | ||
| 262 | + break; | ||
| 263 | + case 2: | ||
| 264 | + msg='执行完毕'; | ||
| 265 | + break; | ||
| 266 | + case 3: | ||
| 267 | + msg='任务转交'; | ||
| 268 | + break; | ||
| 269 | + } | ||
| 270 | + return msg; | ||
| 271 | + }, | ||
| 272 | + handleCurrentChange(val) { | ||
| 273 | + this.pageNum = val; | ||
| 274 | + }, | ||
| 275 | + //获取列表 | ||
| 276 | + getList() { | ||
| 277 | + let para = { | ||
| 278 | + pageNum: this.pageNum, | ||
| 279 | + pageSize: this.pageSize, | ||
| 280 | + }; | ||
| 281 | + this.listLoading = true; | ||
| 282 | + //NProgress.start(); | ||
| 283 | + getList(para).then((res) => { | ||
| 284 | + let resData = res.data.data; | ||
| 285 | + this.total = resData.total; | ||
| 286 | + this.locationList = resData.list; | ||
| 287 | + this.listLoading = false; | ||
| 288 | + //NProgress.done(); | ||
| 289 | + }).catch((error) => { | ||
| 290 | + this.listLoading = false; | ||
| 291 | + if(null!= error.response && error.response!==undefined){ | ||
| 292 | + let status= error.response.status; | ||
| 293 | + let msg = error.response.statusText; | ||
| 294 | + alert(status+msg); | ||
| 295 | + }else { | ||
| 296 | + alert(error); | ||
| 297 | + } | ||
| 298 | + | ||
| 299 | + }); | ||
| 300 | + | ||
| 301 | + }, | ||
| 302 | + //删除 | ||
| 303 | + handleDel: function (index, row) { | ||
| 304 | + this.$confirm('确认删除该记录吗?', '提示', { | ||
| 305 | + type: 'warning' | ||
| 306 | + }).then(() => { | ||
| 307 | + this.listLoading = true; | ||
| 308 | + //NProgress.start(); | ||
| 309 | + let para = { roleId: row.roleId }; | ||
| 310 | + remove(para).then((res) => { | ||
| 311 | + this.listLoading = false; | ||
| 312 | + //NProgress.done(); | ||
| 313 | + this.$message({ | ||
| 314 | + message: '删除成功', | ||
| 315 | + type: 'success' | ||
| 316 | + }); | ||
| 317 | + }).catch((error) => { | ||
| 318 | + this.listLoading = false; | ||
| 319 | + alert(error); | ||
| 320 | + }); | ||
| 321 | + }).catch(); | ||
| 322 | + }, | ||
| 323 | + /** | ||
| 324 | + * 显示编辑界面 | ||
| 325 | + * @param index | ||
| 326 | + * @param row 为这行的数据对象 | ||
| 327 | + */ | ||
| 328 | + handleEdit: function (index, row) { | ||
| 329 | + this.editFormVisible = true; | ||
| 330 | + this.editForm = Object.assign({}, row); | ||
| 331 | + this.getdepartmentNames(); | ||
| 332 | + }, | ||
| 333 | + //显示新增界面,每次点开初始化数据 | ||
| 334 | + handleAdd: function () { | ||
| 335 | + this.addFormVisible = true; | ||
| 336 | + this.addForm = { | ||
| 337 | + processname: '', | ||
| 338 | + begindate: '', | ||
| 339 | + enddate: '', | ||
| 340 | + vacationtype:'', | ||
| 341 | + reason: '', | ||
| 342 | + userid: loginUserInfo.userId | ||
| 343 | + } | ||
| 344 | + }, | ||
| 345 | + //编辑 | ||
| 346 | + editSubmit: function () { | ||
| 347 | + this.$refs.editForm.validate((valid) => { | ||
| 348 | + if (valid) { | ||
| 349 | + this.$confirm('确认提交吗?', '提示', {}).then(() => { | ||
| 350 | + this.editLoading = true; | ||
| 351 | + //NProgress.start(); | ||
| 352 | + let para = Object.assign({}, this.editForm); | ||
| 353 | + //不需要提交的 去掉,后端不好接收 | ||
| 354 | + para.authorities = null; | ||
| 355 | + para.permissions = null; | ||
| 356 | + para.roles = null; | ||
| 357 | +// para.birth = (!para.birth || para.birth == '') ? '' : util.formatDate.format(new Date(para.birth), 'yyyy-MM-dd'); | ||
| 358 | + /* | ||
| 359 | + 查询之后格式this.filters.column.create_start_date中日期发生变化; | ||
| 360 | + Wed Aug 09 2017 00:00:00 GMT+0800 (中国标准时间) 变成了 "2017-08-08T16:00:00.000Z"; | ||
| 361 | + 所以使用 moment 日期格式化插件将时间转换成 [ Wed Aug 09 2017 00:00:00 GMT+0800 (中国标准时间) ] 格 | ||
| 362 | + 式; | ||
| 363 | + */ | ||
| 364 | + /*moment 安装 npm install moment --save*/ | ||
| 365 | + para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss'); | ||
| 366 | + this.editLoading = false; | ||
| 367 | + edit(para).then((res) => { | ||
| 368 | + | ||
| 369 | + //NProgress.done(); | ||
| 370 | + this.$message({ | ||
| 371 | + message: '提交成功', | ||
| 372 | + type: 'success' | ||
| 373 | + }); | ||
| 374 | + this.$refs['editForm'].resetFields(); | ||
| 375 | + this.editFormVisible = false; | ||
| 376 | + }).catch(error => alert(error)); | ||
| 377 | + }); | ||
| 378 | + } | ||
| 379 | + }); | ||
| 380 | + }, | ||
| 381 | + //新增 | ||
| 382 | + addSubmit: function () { | ||
| 383 | + this.$refs.addForm.validate((valid) => { | ||
| 384 | + if (valid) { | ||
| 385 | + this.$confirm('确认提交吗?', '提示', {}).then(() => { | ||
| 386 | + this.addLoading = true; | ||
| 387 | + //NProgress.start(); | ||
| 388 | + let para = Object.assign({}, this.addForm); | ||
| 389 | + add(para).then((res) => { | ||
| 390 | + this.addLoading = false; | ||
| 391 | + if (res.status ===200) { | ||
| 392 | + this.$message({ | ||
| 393 | + message: '提交成功', | ||
| 394 | + type: 'success' | ||
| 395 | + }); | ||
| 396 | + this.$refs['permForm'].resetFields(); | ||
| 397 | + this.addFormVisible = false; | ||
| 398 | + this.getProcessList(); | ||
| 399 | + } | ||
| 400 | + }).catch(error => alert(error)); | ||
| 401 | + }); | ||
| 402 | + } | ||
| 403 | + }); | ||
| 404 | + }, | ||
| 405 | + startJob: function (index, row) { | ||
| 406 | + let loading = this.$loading({ fullscreen: true, | ||
| 407 | + background: 'gray', | ||
| 408 | + text: '正在处理'}); | ||
| 409 | + let jobdata = Object.assign({}, row); | ||
| 410 | + startJob(jobdata).then((res) => { | ||
| 411 | + if (res.status ===200) { | ||
| 412 | + this.getProcessList(); | ||
| 413 | + this.listLoading = false; | ||
| 414 | + this.$message({ | ||
| 415 | + message: '提交成功', | ||
| 416 | + type: 'success' | ||
| 417 | + }); | ||
| 418 | + } | ||
| 419 | + }).catch(error => alert(error)); | ||
| 420 | + loading.close(); | ||
| 421 | + }, | ||
| 422 | + selsChange: function (sels) { | ||
| 423 | + this.sels = sels; | ||
| 424 | + }, | ||
| 425 | + //批量删除 | ||
| 426 | + batchRemove: function () { | ||
| 427 | + var ids = this.sels.map(item => item.roleId).toString(); | ||
| 428 | + this.$confirm('确认删除选中记录吗?', '提示', { | ||
| 429 | + type: 'warning' | ||
| 430 | + }).then(() => { | ||
| 431 | + this.listLoading = true; | ||
| 432 | + //NProgress.start(); | ||
| 433 | + let para = { ids: ids }; | ||
| 434 | + batchRemove(para).then((res) => { | ||
| 435 | + this.listLoading = false; | ||
| 436 | + //NProgress.done(); | ||
| 437 | + this.$message({ | ||
| 438 | + message: '删除成功', | ||
| 439 | + type: 'success' | ||
| 440 | + }) | ||
| 441 | + }); | ||
| 442 | + }).catch(() => { | ||
| 443 | + | ||
| 444 | + }); | ||
| 445 | + }, | ||
| 446 | + shwoDialog(index,row) { | ||
| 447 | + this.dialogData = Object.assign({}, row); | ||
| 448 | + this.centerDialogVisible = true; | ||
| 449 | + }, | ||
| 450 | + cascaderhandleChange:function (value) { | ||
| 451 | + let defaultvalue = ["0","0","0","0"]; | ||
| 452 | + defaultvalue = value; | ||
| 453 | + console.log(defaultvalue); | ||
| 454 | + this.jodUserId = defaultvalue[3]; | ||
| 455 | + } | ||
| 456 | + }, | ||
| 457 | + mounted() { | ||
| 458 | + this.getList(); | ||
| 459 | + } | ||
| 460 | + } | ||
| 461 | + | ||
| 462 | +</script> | ||
| 463 | + | ||
| 464 | +<style scoped> | ||
| 465 | + | ||
| 466 | +</style> |
| @@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
| 6 | :visible.sync="centerDialogVisible" | 6 | :visible.sync="centerDialogVisible" |
| 7 | width="30%" | 7 | width="30%" |
| 8 | center> | 8 | center> |
| 9 | + <span>{{dialogData.process.processname}}</span> | ||
| 9 | <span>{{dialogData.coment}}</span> | 10 | <span>{{dialogData.coment}}</span> |
| 10 | <span slot="footer" class="dialog-footer"> | 11 | <span slot="footer" class="dialog-footer"> |
| 11 | <el-button @click="centerDialogVisible = false">取 消</el-button> | 12 | <el-button @click="centerDialogVisible = false">取 消</el-button> |
| @@ -41,10 +42,9 @@ | @@ -41,10 +42,9 @@ | ||
| 41 | </el-table-column> | 42 | </el-table-column> |
| 42 | <el-table-column label="操作" min-width="260"> | 43 | <el-table-column label="操作" min-width="260"> |
| 43 | <template slot-scope="scope"> | 44 | <template slot-scope="scope"> |
| 44 | - <el-button size="small" @click="setPerm(scope.$index, scope.row)">开始执行</el-button> | 45 | + <el-button size="small" @click="startJob(scope.$index, scope.row)">开始执行</el-button> |
| 45 | <el-button size="small" @click="setPerm(scope.$index, scope.row)">完成任务</el-button> | 46 | <el-button size="small" @click="setPerm(scope.$index, scope.row)">完成任务</el-button> |
| 46 | <el-button size="small" @click="setPerm(scope.$index, scope.row)">任务转交</el-button> | 47 | <el-button size="small" @click="setPerm(scope.$index, scope.row)">任务转交</el-button> |
| 47 | - <el-button size="small" @click="shwoDialog(scope.$index, scope.row)">工单内容</el-button> | ||
| 48 | <el-button size="small" @click="shwoDialog(scope.$index, scope.row)">任务内容</el-button> | 48 | <el-button size="small" @click="shwoDialog(scope.$index, scope.row)">任务内容</el-button> |
| 49 | <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> | 49 | <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> |
| 50 | </template> | 50 | </template> |
| @@ -127,8 +127,7 @@ | @@ -127,8 +127,7 @@ | ||
| 127 | 127 | ||
| 128 | <script> | 128 | <script> |
| 129 | import util from '../../common/js/util' | 129 | import util from '../../common/js/util' |
| 130 | - import NProgress from 'nprogress' | ||
| 131 | - import { getList,add} from '@/api/job_api'; | 130 | + import { getList,add,startJob} from '@/api/job_api'; |
| 132 | import moment from 'moment' | 131 | import moment from 'moment' |
| 133 | import parseTime from '@/utils' | 132 | import parseTime from '@/utils' |
| 134 | import loginUserInfo from '@/api/base' | 133 | import loginUserInfo from '@/api/base' |
| @@ -200,7 +199,11 @@ | @@ -200,7 +199,11 @@ | ||
| 200 | permissions: [] | 199 | permissions: [] |
| 201 | }, | 200 | }, |
| 202 | centerDialogVisible: false, | 201 | centerDialogVisible: false, |
| 203 | - dialogData:{}, | 202 | + dialogData:{ |
| 203 | + process:{ | ||
| 204 | + processname: '' | ||
| 205 | + } | ||
| 206 | + }, | ||
| 204 | pickerOptions: { | 207 | pickerOptions: { |
| 205 | disabledDate(time) { | 208 | disabledDate(time) { |
| 206 | return time.getTime() < Date.now(); | 209 | return time.getTime() < Date.now(); |
| @@ -308,7 +311,8 @@ | @@ -308,7 +311,8 @@ | ||
| 308 | let para = { | 311 | let para = { |
| 309 | pageNum: this.pageNum, | 312 | pageNum: this.pageNum, |
| 310 | pageSize: this.pageSize, | 313 | pageSize: this.pageSize, |
| 311 | - roleName: this.filters.processName | 314 | + userId: 0, |
| 315 | + processid: this.$route.params.formid | ||
| 312 | }; | 316 | }; |
| 313 | this.listLoading = true; | 317 | this.listLoading = true; |
| 314 | //NProgress.start(); | 318 | //NProgress.start(); |
| @@ -434,6 +438,23 @@ | @@ -434,6 +438,23 @@ | ||
| 434 | } | 438 | } |
| 435 | }); | 439 | }); |
| 436 | }, | 440 | }, |
| 441 | + startJob: function (index, row) { | ||
| 442 | + let loading = this.$loading({ fullscreen: true, | ||
| 443 | + background: 'gray', | ||
| 444 | + text: '正在处理'}); | ||
| 445 | + let jobdata = Object.assign({}, row); | ||
| 446 | + startJob(jobdata).then((res) => { | ||
| 447 | + if (res.status ===200) { | ||
| 448 | + this.getProcessList(); | ||
| 449 | + this.listLoading = false; | ||
| 450 | + this.$message({ | ||
| 451 | + message: '提交成功', | ||
| 452 | + type: 'success' | ||
| 453 | + }); | ||
| 454 | + } | ||
| 455 | + }).catch(error => alert(error)); | ||
| 456 | + loading.close(); | ||
| 457 | + }, | ||
| 437 | selsChange: function (sels) { | 458 | selsChange: function (sels) { |
| 438 | this.sels = sels; | 459 | this.sels = sels; |
| 439 | }, | 460 | }, |
| @@ -34,6 +34,9 @@ | @@ -34,6 +34,9 @@ | ||
| 34 | <el-table-column type="index" width="60"> | 34 | <el-table-column type="index" width="60"> |
| 35 | </el-table-column> | 35 | </el-table-column> |
| 36 | <el-table-column prop="processname" label="工单名称" width="100"> | 36 | <el-table-column prop="processname" label="工单名称" width="100"> |
| 37 | + <template slot-scope="scope"> | ||
| 38 | + <el-button size="small" type="text" @click="checkJobs(scope.$index, scope.row)">{{scope.row.processname}}</el-button> | ||
| 39 | + </template> | ||
| 37 | </el-table-column> | 40 | </el-table-column> |
| 38 | <el-table-column prop="user.realname" label="添加者" min-width="100" sortable> | 41 | <el-table-column prop="user.realname" label="添加者" min-width="100" sortable> |
| 39 | </el-table-column> | 42 | </el-table-column> |
| @@ -110,21 +113,24 @@ | @@ -110,21 +113,24 @@ | ||
| 110 | <el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" placeholder="选择时间" v-model="addForm.enddate" style="width: 100%;"></el-date-picker> | 113 | <el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" placeholder="选择时间" v-model="addForm.enddate" style="width: 100%;"></el-date-picker> |
| 111 | </el-form-item> | 114 | </el-form-item> |
| 112 | <el-form-item label="工单类型" prop="vacationtype"> | 115 | <el-form-item label="工单类型" prop="vacationtype"> |
| 113 | - <el-select v-model="addForm.vacationtype" placeholder="请选择"> | ||
| 114 | - <el-option label="运维检查" value="0"></el-option> | ||
| 115 | - <el-option label="设备故障" value="1"></el-option> | ||
| 116 | - <el-option label="电话报修" value="3"></el-option> | ||
| 117 | - </el-select> | 116 | + <el-cascader-panel |
| 117 | + :options="vacationTypeOptions" | ||
| 118 | + v-model="addForm.vacationtype" | ||
| 119 | + @change="cascaderhandleChange"></el-cascader-panel> | ||
| 118 | </el-form-item> | 120 | </el-form-item> |
| 119 | <el-form-item label="工单内容" prop="reason"> | 121 | <el-form-item label="工单内容" prop="reason"> |
| 120 | <el-input type="textarea" v-model="addForm.reason"></el-input> | 122 | <el-input type="textarea" v-model="addForm.reason"></el-input> |
| 121 | </el-form-item> | 123 | </el-form-item> |
| 122 | - <el-form-item> | ||
| 123 | - <el-cascader-panel | ||
| 124 | - :options="options" | 124 | + <el-form-item label="指定部门"> |
| 125 | + <el-tree | ||
| 126 | + :data="options" | ||
| 125 | v-model="addForm.jobuserid" | 127 | v-model="addForm.jobuserid" |
| 126 | - @change="cascaderhandleChange" | ||
| 127 | - ></el-cascader-panel> | 128 | + show-checkbox |
| 129 | + ref="tree" | ||
| 130 | + node-key="value" | ||
| 131 | + @check-change="handleCheckChange" | ||
| 132 | + :props="defaultProps"> | ||
| 133 | + </el-tree> | ||
| 128 | </el-form-item> | 134 | </el-form-item> |
| 129 | </el-form> | 135 | </el-form> |
| 130 | <div slot="footer" class="dialog-footer"> | 136 | <div slot="footer" class="dialog-footer"> |
| @@ -138,9 +144,9 @@ | @@ -138,9 +144,9 @@ | ||
| 138 | <script> | 144 | <script> |
| 139 | import util from '../../common/js/util' | 145 | import util from '../../common/js/util' |
| 140 | import NProgress from 'nprogress' | 146 | import NProgress from 'nprogress' |
| 141 | - import { getList,add} from '@/api/process_api'; | 147 | + import { getList,add,vacationTypeOptions} from '@/api/process_api'; |
| 142 | import moment from 'moment' | 148 | import moment from 'moment' |
| 143 | - import parseTime from '@/utils' | 149 | + import {parseTime, pickerOptions} from '@/utils' |
| 144 | import loginUserInfo from '@/api/base' | 150 | import loginUserInfo from '@/api/base' |
| 145 | import ElFormItem from "../../../node_modules/element-ui/packages/form/src/form-item.vue"; | 151 | import ElFormItem from "../../../node_modules/element-ui/packages/form/src/form-item.vue"; |
| 146 | export default { | 152 | export default { |
| @@ -214,57 +220,26 @@ | @@ -214,57 +220,26 @@ | ||
| 214 | label: '测试部门一', | 220 | label: '测试部门一', |
| 215 | children: [{ | 221 | children: [{ |
| 216 | value: '1', | 222 | value: '1', |
| 217 | - label: '测试岗位1', | ||
| 218 | - children: [{ | ||
| 219 | - value: '1', | ||
| 220 | - label: '测试人员1' | ||
| 221 | - }] | 223 | + label: '测试岗位1' |
| 222 | }] | 224 | }] |
| 223 | }, { | 225 | }, { |
| 224 | value: '3', | 226 | value: '3', |
| 225 | label: '测试部门二', | 227 | label: '测试部门二', |
| 226 | children: [{ | 228 | children: [{ |
| 227 | value: '2', | 229 | value: '2', |
| 228 | - label: '测试岗位2', | ||
| 229 | - children: [{ | ||
| 230 | - value: '1', | ||
| 231 | - label: '测试人员2' | ||
| 232 | - }] | 230 | + label: '测试岗位2' |
| 233 | }, { | 231 | }, { |
| 234 | value: '3', | 232 | value: '3', |
| 235 | - label: '测试岗位3', | ||
| 236 | - children: [{ | ||
| 237 | - value: '1', | ||
| 238 | - label: '测试人员3' | ||
| 239 | - }] | 233 | + label: '测试岗位3' |
| 240 | }] | 234 | }] |
| 241 | }] | 235 | }] |
| 242 | }], | 236 | }], |
| 243 | - pickerOptions: { | ||
| 244 | - disabledDate(time) { | ||
| 245 | - return time.getTime() < Date.now(); | ||
| 246 | - }, | ||
| 247 | - shortcuts: [{ | ||
| 248 | - text: '今天', | ||
| 249 | - onClick(picker) { | ||
| 250 | - picker.$emit('pick', new Date()); | ||
| 251 | - } | ||
| 252 | - }, { | ||
| 253 | - text: '昨天', | ||
| 254 | - onClick(picker) { | ||
| 255 | - const date = new Date(); | ||
| 256 | - date.setTime(date.getTime() - 3600 * 1000 * 24); | ||
| 257 | - picker.$emit('pick', date); | ||
| 258 | - } | ||
| 259 | - }, { | ||
| 260 | - text: '一周前', | ||
| 261 | - onClick(picker) { | ||
| 262 | - const date = new Date(); | ||
| 263 | - date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); | ||
| 264 | - picker.$emit('pick', date); | ||
| 265 | - } | ||
| 266 | - }] | ||
| 267 | - } | 237 | + defaultProps: { |
| 238 | + children: 'children', | ||
| 239 | + label: 'label' | ||
| 240 | + }, | ||
| 241 | + pickerOptions: pickerOptions, | ||
| 242 | + vacationTypeOptions: vacationTypeOptions | ||
| 268 | } | 243 | } |
| 269 | }, | 244 | }, |
| 270 | methods: { | 245 | methods: { |
| @@ -453,11 +428,29 @@ | @@ -453,11 +428,29 @@ | ||
| 453 | this.dialogData = Object.assign({}, row); | 428 | this.dialogData = Object.assign({}, row); |
| 454 | this.centerDialogVisible = true; | 429 | this.centerDialogVisible = true; |
| 455 | }, | 430 | }, |
| 431 | + checkJobs(index,row) { | ||
| 432 | + let p = Object.assign({}, row); | ||
| 433 | + this.$router.push( | ||
| 434 | + { | ||
| 435 | + name: '任务管理', | ||
| 436 | + params: { | ||
| 437 | + formid: p.formid | ||
| 438 | + } | ||
| 439 | + } | ||
| 440 | + ) | ||
| 441 | + }, | ||
| 442 | + //级联面板事件 | ||
| 456 | cascaderhandleChange:function (value) { | 443 | cascaderhandleChange:function (value) { |
| 457 | let defaultvalue = ["0","0","0","0"]; | 444 | let defaultvalue = ["0","0","0","0"]; |
| 458 | defaultvalue = value; | 445 | defaultvalue = value; |
| 459 | console.log(defaultvalue); | 446 | console.log(defaultvalue); |
| 460 | - this.addForm.jobuserid = defaultvalue[3]; | 447 | + }, |
| 448 | + //el-tree绑定事件 | ||
| 449 | + handleCheckChange(data, checked, indeterminate) { | ||
| 450 | +// console.log(data, checked, indeterminate); | ||
| 451 | + console.log(this.$refs.tree.getCheckedNodes()); | ||
| 452 | + console.log(this.$refs.tree.getCheckedKeys()); | ||
| 453 | +// this.addForm.jobuserid = defaultvalue; | ||
| 461 | } | 454 | } |
| 462 | }, | 455 | }, |
| 463 | mounted() { | 456 | mounted() { |
-
请 注册 或 登录 后发表评论