Commit db64f8fc authored by 扫地僧's avatar 扫地僧

所有功能菜单基本属性

parent e1269c17
import request from './request'
import qs from 'qs'
export function storeList(data) {
return request({
url: '/store/storeList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditStore(data) {
return request({
url: '/store/addOrEditStore',
method: 'post',
data: qs.stringify(data)
})
}
export function delStore(data) {
return request({
url: '/store/delStore',
method: 'post',
data: qs.stringify(data)
})
}
import request from './request'
import qs from 'qs'
export function workerList(data) {
return request({
url: '/worker/workerList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditWorker(data) {
return request({
url: '/worker/addOrEditWorker',
method: 'post',
data: qs.stringify(data)
})
}
export function delWorker(data) {
return request({
url: '/worker/delWorker',
method: 'post',
data: qs.stringify(data)
})
}
......@@ -131,8 +131,8 @@ export const asyncRouterMap = [
{ path: 'roles', component: _import('system/roles'), name: 'system_roles', meta: { title: '系统角色' }},
{ path: 'user', component: _import('system/user'), name: 'system_user', meta: { title: '系统用户' }},
{ path: 'param', component: _import('system/param'), name: 'system_param', meta: { title: '系统参数' }},
{ path: 'dataDicFl', component: _import('system/dataDicFl'), name: 'system_dataDicFl', meta: { title: '数据字典分类' }},
{ path: 'dataDicX', component: _import('system/dataDicX'), name: 'system_dataDicX', meta: { title: '数据字典项' }}
{ path: 'dataDictCat', component: _import('system/dataDictCat'), name: 'system_dataDictCat', meta: { title: '数据字典分类' }},
{ path: 'dataDictItem', component: _import('system/dataDictItem'), name: 'system_dataDictItem', meta: { title: '数据字典项' }}
]
},
{ path: '*', redirect: '/404', hidden: true }
......
......@@ -342,12 +342,16 @@ export default {
edit(data) {
debugger
this.dialogType = 2;
this.getRoleList(() => {
this.getSectionsByDeptId(data.deptId, () => {
// this.getRoleList(() => {
// this.getSectionsByDeptId(data.deptId, () => {
// this.reBindData(data);
// this.dialogState = true;
// });
// });
this.getRoleAndUserData(() => {
this.reBindData(data);
this.dialogState = true;
});
});
},
check(data) {
this.dialogType = 3;
......
......@@ -10,8 +10,8 @@
</div>
<el-row :gutter="15">
<el-col :span="4">
<el-col class="input-name" :span="7">维修工名称</el-col>
<el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.repairWorkerName" @keyup.enter.native="seachFun"></el-input></el-col>
<el-col class="input-name" :span="7">工名称</el-col>
<el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.workerName" @keyup.enter.native="seachFun"></el-input></el-col>
</el-col>
</el-row>
</el-card>
......@@ -26,14 +26,20 @@
<el-table empty-text="暂无数据" :stripe="true" :data="dataOption" v-loading="!dataOption">
<el-table-column prop="repairWorkerName" label="姓名"></el-table-column>
<el-table-column prop="workerName" label="姓名"></el-table-column>
<el-table-column label="性别">
<template slot-scope="scope">
<span>{{scope.row.sex===1?'男':'女'}}</span>
<span>{{scope.row.workerSex===1?'男':'女'}}</span>
</template>
</el-table-column>
<el-table-column prop="repairWorkerPhone" label="电话"></el-table-column>
<el-table-column prop="repairWorkerIdCard" label="身份证号"></el-table-column>
<el-table-column prop="workerAge" label="年龄"></el-table-column>
<el-table-column prop="workerBirthday" label="生日"></el-table-column>
<el-table-column prop="workerAncestral" label="祖籍"></el-table-column>
<el-table-column prop="workerHeight" label="身高"></el-table-column>
<el-table-column prop="workerWeight" label="体重"></el-table-column>
<el-table-column prop="workerBust" label="胸围"></el-table-column>
<el-table-column prop="workerWaist" label="腰围"></el-table-column>
<el-table-column prop="workerHipline" label="臀围"></el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">
<span>{{fattTime(scope.row.createTime)}}</span>
......@@ -104,8 +110,8 @@
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>姓名</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入姓名" v-model="dialogBindData.repairWorkerName"></el-input>
<span v-else>{{dialogBindData.repairWorkerName}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入姓名" v-model="dialogBindData.workerName"></el-input>
<span v-else>{{dialogBindData.workerName}}</span>
</el-col>
</el-row>
......@@ -113,29 +119,29 @@
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>性别</label></el-col>
<el-col :span="16" class="content-right">
<el-radio-group v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.sex">
<el-radio-group v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.workerSex">
<el-radio size="small" :label="1"></el-radio>
<el-radio size="small" :label="0"></el-radio>
</el-radio-group>
<span v-else>{{dialogBindData.sex===1?"男":"女"}}</span>
<span v-else>{{dialogBindData.workerSex===1?"男":"女"}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>电话</label></el-col>
<el-col :span="8" class="content-left"><label>年龄</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入电话号码" v-model="dialogBindData.repairWorkerPhone"></el-input>
<span v-else>{{dialogBindData.repairWorkerPhone}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入年龄" v-model="dialogBindData.workerAge"></el-input>
<span v-else>{{dialogBindData.workerAge}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>份证号</label></el-col>
<el-col :span="8" class="content-left"><label></label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入身份证号" v-model="dialogBindData.repairWorkerIdCard"></el-input>
<span v-else>{{dialogBindData.repairWorkerIdCard}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入身高" v-model="dialogBindData.workerHeight"></el-input>
<span v-else>{{dialogBindData.workerHeight}}</span>
</el-col>
</el-row>
......@@ -160,14 +166,16 @@
</template>
<script>
import * as repair from "../../api/repair";
import * as worker from "../../api/worker";
import * as common from "../../api/common";
import { fattCreateTime } from "../../utils/fattTime";
export default {
data() {
return {
seacherParam: {
repairWorkerName: ""
workerName: "",
workerNumber:"",
workerAge:""
},
// 表格数据
dataOption: null,
......@@ -195,11 +203,27 @@ export default {
// visitReasonId:"1001"
dialogBindData: {
repairWorkerId: "",
repairWorkerName: "",
sex: 1,
repairWorkerPhone: "",
repairWorkerIdCard: ""
workerId: "",
workerName: "",
workerSex: 1,
workerAge: "",
workerBirthday: "",
workerHeight: "",
workerWeight: "",
workerBust: 1,
workerWaist: "",
workerHipline: "",
workerHomePic: "",
workerPic: "",
workerResume: 1,
storeId: "",
administratorsId: "",
isAuditing: "",
isShopping: "",
clicks: 1,
isRecommend: "",
serialNumber: ""
},
// 是否提交
submmitSuccess: false
......@@ -213,7 +237,7 @@ export default {
methods: {
seachFun() {
this.$seach
.submmit(this, repair.getRepairWorkerList)
.submmit(this, worker.workerList)
.then(res => {
this.dataOption = res.data.data;
// 初始化分页数据
......@@ -284,7 +308,7 @@ export default {
const isSubmitActive = this.dialogBindData.repairWorkerName&&this.dialogBindData.repairWorkerPhone&&this.dialogBindData.repairWorkerIdCard;
if (isSubmitActive) {
this.submmitSuccess = true;
repair.addOrEditRepairWorker(this.dialogBindData).then(res => {
worker.addOrEditWorker(this.dialogBindData).then(res => {
this.getList(() => {
this.$message({
message: this.dialogType === 1 ? "添加成功" : "编辑成功",
......@@ -325,8 +349,8 @@ export default {
},
// 获取表格数据
getList(cb) {
repair
.getRepairWorkerList({ pageNo: this.pageNo, pageSize: this.pageSize })
worker
.workerList({ pageNo: this.pageNo, pageSize: this.pageSize })
.then(res => {
// 初始话表格数据
this.dataOption = res.data.data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment