提交 7bb386d2 编写于 作者: xiaoping.di's avatar xiaoping.di

Merge branch 'feature/jq' into 'develop'

添加返回

See merge request !156
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
:filter-method="getServiceOpen" :filter-method="getServiceOpen"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.serviceOpen ==='1' ? '开通': '未开通' }}</span> <span style="margin-left: 10px">{{
scope.row.serviceOpen === '1' ? '开通' : '未开通'
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -67,7 +69,9 @@ ...@@ -67,7 +69,9 @@
:filter-method="getWorkStatus" :filter-method="getWorkStatus"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.workStatus ==='2' ? '未排班': '已排班' }}</span> <span style="margin-left: 10px">{{
scope.row.workStatus === '2' ? '未排班' : '已排班'
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -84,15 +88,15 @@ ...@@ -84,15 +88,15 @@
align="center" align="center"
/> />
<el-table-column <el-table-column
property="delivery" prop="switchStatus"
align="center" align="center"
label="接单开关" label="接单开关"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.delivery" v-model="scope.row.switchStatus"
active-color="#0D9078" active-color="#0D9078"
@change="changeSwitch(scope.$index,scope.row)" @change="changeSwitch(scope.$index, scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -105,25 +109,25 @@ ...@@ -105,25 +109,25 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
class="scope-work" class="scope-work"
style="display:flex" style="display: flex"
> >
<div <div
v-if=" scope.row.workStatus === '2'" v-if="scope.row.workStatus === '2'"
class="download-btn" class="download-btn"
@click="addSchedule(scope.row,1)" @click="addSchedule(scope.row, 1)"
> >
新增排班 新增排班
</div> </div>
<div <div
v-else v-else
class="download-btn" class="download-btn"
@click="addSchedule(scope.row,2)" @click="addSchedule(scope.row, 2)"
> >
编辑排班 编辑排班
</div> </div>
<div <div
class="download-btn" class="download-btn"
@click="addSchedule(scope.row,2)" @click="addSchedule(scope.row, 2)"
> >
查看 查看
</div> </div>
...@@ -150,7 +154,7 @@ ...@@ -150,7 +154,7 @@
<script> <script>
export default { export default {
components: { components: {
// NewScheduling, // NewScheduling,
}, },
props: { props: {
tableData: { tableData: {
...@@ -184,32 +188,32 @@ ...@@ -184,32 +188,32 @@
}, },
data() { data() {
return { return {
workStatusList:[ workStatusList: [
{ {
text: '已排班', text: '已排班',
value: '已排班' value: '已排班',
}, },
{ {
text: '未排班', text: '未排班',
value: '未排班' value: '未排班',
} },
], ],
serviceOpenList:[ serviceOpenList: [
{ {
value: 1, value: 1,
text: '开通' text: '开通',
}, },
{ {
value: 2, value: 2,
text: '未开通' text: '未开通',
}, },
], ],
}; };
}, },
computed: {},
mounted() {}, mounted() {},
methods:{ methods: {
changeSwitch(value, val) { changeSwitch(value, val) {
console.log(value, val, '123');
this.$emit('changeSwitch', value, val); this.$emit('changeSwitch', value, val);
}, },
// handleFilterChange(value) { // handleFilterChange(value) {
...@@ -222,22 +226,18 @@ ...@@ -222,22 +226,18 @@
return row.level === String(value); return row.level === String(value);
}, },
getWorkStatus(value, row) { getWorkStatus(value, row) {
console.log(value, row);
let newValue = ''; let newValue = '';
if (value === '未排班') { if (value === '未排班') {
newValue = '2'; newValue = '2';
}else{ } else {
newValue = '1'; newValue = '1';
} }
return row.workStatus === String(newValue); return row.workStatus === String(newValue);
}, },
showworkStatus() { showworkStatus() {
console.log(11111);
this.isworkStatus = !this.isworkStatus; this.isworkStatus = !this.isworkStatus;
console.log(this.isworkStatus);
}, },
addSchedule(value, val) { addSchedule(value, val) {
console.log(value, val, '123212321');
this.$emit('addSchedule', value, val); this.$emit('addSchedule', value, val);
}, },
// 分页 // 分页
...@@ -250,27 +250,27 @@ ...@@ -250,27 +250,27 @@
sortfunc(data) { sortfunc(data) {
this.$emit('sortfunc', data); this.$emit('sortfunc', data);
}, },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.table-serviceSchedule{ .table-serviceSchedule {
.el-table { .el-table {
border-radius: 8px; border-radius: 8px;
// 深度选择器 // 深度选择器
/deep/ .highlight{ /deep/ .highlight {
color: #0D9078 !important; color: #0d9078 !important;
} }
.scope-work{ .scope-work {
display: flex; display: flex;
justify-content: center; justify-content: center;
.download-btn{ .download-btn {
color: #0D9078; color: #0d9078;
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
} }
} }
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div>新增排班</div> <div>
<span>{{ schedulingTypeValue }}</span>
<span>{{ schedulingType }}</span>
</div>
</template> </template>
<script> <script>
export default {}; export default {
props: {
schedulingTypeValue: {
type: Object,
default: () => {
return {};
},
},
schedulingType: {
type: String,
default: '',
},
},
data() {
return {};
},
watch: {},
created() {
console.log(this.schedulingTypeValue, this.schedulingType);
},
methods: {},
};
</script> </script>
<style></style> <style></style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="header"> <div class="header">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item>首页</el-breadcrumb-item> <el-breadcrumb-item>首页</el-breadcrumb-item>
<el-breadcrumb-item>服务排班表</el-breadcrumb-item> <el-breadcrumb-item> 服务排班表 </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="serviceSchedule-container"> <div class="serviceSchedule-container">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
clearable clearable
> >
<el-option <el-option
v-for="(item,index) of createList" v-for="(item, index) of createList"
:key="index" :key="index"
:label="item" :label="item"
:value="item" :value="item"
...@@ -95,11 +95,18 @@ ...@@ -95,11 +95,18 @@
> >
同步信息 同步信息
</el-button> </el-button>
<img <el-tooltip
class="el-icon-s-question" class="serviceSchedule-tooltip"
src="../../../assets/image/question.png" effect="light"
alt content="点击按钮可同步最新的专家入驻信息"
placement="top-start"
> >
<img
class="el-icon-s-question"
src="../../../assets/image/question.png"
alt
>
</el-tooltip>
</div> </div>
</div> </div>
<div class="serviceSchedule-table"> <div class="serviceSchedule-table">
...@@ -128,13 +135,21 @@ ...@@ -128,13 +135,21 @@
<div class="header"> <div class="header">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item>首页</el-breadcrumb-item> <el-breadcrumb-item>首页</el-breadcrumb-item>
<el-breadcrumb-item>服务排班表</el-breadcrumb-item> <el-breadcrumb-item class="breadcrumb-serviceSchedule">
<span
class="breadcrumb-back"
@click="goBack"
>服务排班表</span>
</el-breadcrumb-item>
<el-breadcrumb-item>新增排班</el-breadcrumb-item> <el-breadcrumb-item>新增排班</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="serviceSchedule-container"> <div class="serviceSchedule-container">
<div class="serviceSchedule-containerInfo"> <div class="serviceSchedule-containerInfo">
<NewScheduling /> <NewScheduling
:scheduling-type-value="schedulingTypeValue"
:scheduling-type="schedulingType"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -142,7 +157,14 @@ ...@@ -142,7 +157,14 @@
</template> </template>
<script> <script>
import { getFirstLevelLable, childLabelList, workQuery, switchOpen, workInStep, getLevel} from '@/api/serviceSchedule'; import {
getFirstLevelLable,
childLabelList,
workQuery,
switchOpen,
workInStep,
getLevel,
} from '@/api/serviceSchedule';
import { SERVICESCHEDUle_TABLE } from '@/utils/GeneralData/serviceSchedule-table'; import { SERVICESCHEDUle_TABLE } from '@/utils/GeneralData/serviceSchedule-table';
import TableServiceSchedule from '@/components/list/table-serviceSchedule'; import TableServiceSchedule from '@/components/list/table-serviceSchedule';
import NewScheduling from '../diagnosis-admin/modal/newScheduling.vue'; import NewScheduling from '../diagnosis-admin/modal/newScheduling.vue';
...@@ -164,36 +186,36 @@ ...@@ -164,36 +186,36 @@
departmentId: '', departmentId: '',
createType: '', createType: '',
idNamePhone: '', idNamePhone: '',
ScheduleStatus:'', ScheduleStatus: '',
startRangeTime:'', startRangeTime: '',
endRangeTime:'', endRangeTime: '',
serviceOpen:'', serviceOpen: '',
pageSize: 15, pageSize: 15,
pageNo: 1, pageNo: 0,
sort:'', sort: '',
createRangeTime:[] createRangeTime: [],
}, },
ScheduleStatusList:[ ScheduleStatusList: [
{ {
value:'已排班', value: '已排班',
id:1 id: 1,
}, },
{ {
value:'未排班', value: '未排班',
id:2 id: 2,
}, },
], ],
serviceOpenList:[ serviceOpenList: [
{ {
value:'开通', value: '开通',
id:1 id: 1,
}, },
{ {
value:'未开通', value: '未开通',
id:2 id: 2,
}, },
], ],
createList:[], createList: [],
interfaceOptions: [], interfaceOptions: [],
createRangeTime: [], createRangeTime: [],
pickerOptions: { pickerOptions: {
...@@ -202,25 +224,25 @@ ...@@ -202,25 +224,25 @@
}, },
}, },
ScheduleListShow: true, ScheduleListShow: true,
showTableData:SERVICESCHEDUle_TABLE, showTableData: SERVICESCHEDUle_TABLE,
tableData:[], tableData: [],
loading: false, loading: false,
newCreateList:[], newCreateList: [],
// newCreateObj:{} schedulingTypeValue: {},
schedulingType: '',
}; };
}, },
watch: {}, watch: {},
created() { created() {
this.getFirstLevelLable(); this.getFirstLevelLable();
this.getLevel(); this.getLevel();
this.search(); this.search();
}, },
methods: { methods: {
// 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据 // 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据
handleItemChange(val) { handleItemChange(val) {
const value = val[0]; const value = val[0];
childLabelList({ parentId: value, publish: 1 }).then((res) => { childLabelList({ parentId: value, publish: 1 }).then((res) => {
console.log(res);
if (res.code === '000000') { if (res.code === '000000') {
const interfaceArr = res.data || []; const interfaceArr = res.data || [];
this.interfaceOptions.filter((item) => { this.interfaceOptions.filter((item) => {
...@@ -235,12 +257,10 @@ ...@@ -235,12 +257,10 @@
getFirstLevelLable() { getFirstLevelLable() {
getFirstLevelLable().then((res) => { getFirstLevelLable().then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
console.log(res);
this.interfaceOptions = res.data || []; this.interfaceOptions = res.data || [];
this.interfaceOptions.forEach((item, index) => { this.interfaceOptions.forEach((item, index) => {
// 添加属性 // 添加属性
this.$set(this.interfaceOptions[index], 'interface', []); this.$set(this.interfaceOptions[index], 'interface', []);
console.log(this.interface);
}); });
} else { } else {
this.$message({ this.$message({
...@@ -252,57 +272,66 @@ ...@@ -252,57 +272,66 @@
}, },
// 获取选择的值 // 获取选择的值
selectApi(e, value) { selectApi(e, value) {
console.log(value, 'value');
this.searchParam.departmentId = value[1]; this.searchParam.departmentId = value[1];
console.log(this.searchParam);
}, },
search() { search() {
this.loading = true; this.loading = true;
const params = { const params = {
departmentId: this.searchParam.departmentId || null, departmentId: this.searchParam.departmentId || null,
workStatus: String(this.searchParam.ScheduleStatus) || null, workStatus: String(this.searchParam.ScheduleStatus) || null,
startTime: this.searchParam.createRangeTime.length > 0 ? this.searchParam.createRangeTime[0] : null, startTime:
endTime: this.searchParam.createRangeTime.length > 0 ? this.searchParam.createRangeTime[1] : null, this.searchParam.createRangeTime.length > 0
? this.searchParam.createRangeTime[0]
: null,
endTime:
this.searchParam.createRangeTime.length > 0
? this.searchParam.createRangeTime[1]
: null,
condition: this.searchParam.idNamePhone || null, condition: this.searchParam.idNamePhone || null,
level: this.searchParam.createType || null, level: this.searchParam.createType || null,
sort:this.searchParam.sort || null, sort: this.searchParam.sort || null,
serviceOpen: String(this.searchParam.serviceOpen) || null, serviceOpen: String(this.searchParam.serviceOpen) || null,
pageNo: this.searchParam.pageNo, pageNo: this.searchParam.pageNo,
pageSize: this.searchParam.pageSize, pageSize: this.searchParam.pageSize,
}; };
workQuery(params).then(res => { workQuery(params).then((res) => {
this.loading = false; this.loading = false;
if (res.code === '000000') { if (res.code === '000000') {
this.tableData = res.data.list || []; this.tableData = (res.data.list || []).map((item) => {
if (item.switchStatus === '1') {
return {
...item,
switchStatus: true,
};
} else {
return {
...item,
switchStatus: false,
};
}
});
this.searchParam.totalRows = res.data.count; this.searchParam.totalRows = res.data.count;
} }
}); });
}, },
getServiceOpen(value) { getServiceOpen(value) {
console.log(value, '22222');
this.searchParam.serviceOpen = value; this.searchParam.serviceOpen = value;
console.log(this.searchParam);
}, },
getWorkStatus(value) { getWorkStatus(value) {
console.log(value, '22223333');
this.searchParam.ScheduleStatus = value; this.searchParam.ScheduleStatus = value;
console.log(this.searchParam);
}, },
changeSwitch(value, val) { changeSwitch(value, val) {
console.log(value, val, '12321');
switchOpen({ switchOpen({
id:val.id, id: val.id,
switchOpen:val.delivery ? '1' : '2' switchOpen: val.switchStatus ? '1' : '2',
}).then(res => { }).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
console.log(res);
this.search(); this.search();
} }
}); });
}, },
searchInStep() { searchInStep() {
workInStep().then(res => { workInStep().then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
this.search(); this.search();
} }
...@@ -317,36 +346,37 @@ ...@@ -317,36 +346,37 @@
this.search(); this.search();
}, },
getLevel() { getLevel() {
getLevel().then(res => { getLevel().then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
console.log(res, 'getLevel');
this.createList = res.data || []; this.createList = res.data || [];
this.createList.forEach(item => { this.createList.forEach((item) => {
const newCreateObj = { const newCreateObj = {
value:'', value: '',
text:'' text: '',
}; };
newCreateObj.value = item; newCreateObj.value = item;
newCreateObj.text = item; newCreateObj.text = item;
this.newCreateList.push(newCreateObj); this.newCreateList.push(newCreateObj);
}); });
console.log(this.newCreateList, 'this.newCreateList');
} }
}); });
}, },
sortfunc(data) { sortfunc(data) {
console.log(data, 'data');
if (data.prop === '"modifiedTime"' && data.order === 'descending') { if (data.prop === '"modifiedTime"' && data.order === 'descending') {
this.searchParam.sort = '1'; this.searchParam.sort = '1';
} else{ } else {
this.searchParam.sort = '2'; this.searchParam.sort = '2';
} }
this.search(); this.search();
}, },
addSchedule(value, val) { addSchedule(value, val) {
console.log(value, val, 'value,val');
this.ScheduleListShow = false; this.ScheduleListShow = false;
} this.schedulingTypeValue = value;
this.schedulingType = val;
},
goBack() {
this.ScheduleListShow = true;
},
}, },
}; };
</script> </script>
...@@ -400,35 +430,34 @@ ...@@ -400,35 +430,34 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.synchro-btn-icon{ .synchro-btn-icon {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: absolute; position: absolute;
right: 20px; right: 20px;
.synchro-btn{ .synchro-btn {
width: 110px; width: 110px;
height: 32px; height: 32px;
border-radius: 18px; border-radius: 18px;
border: 1px solid #0D9078; border: 1px solid #0d9078;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #FFFFFF; background: #ffffff;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #0D9078; color: #0d9078;
} }
.el-icon-s-question{ .el-icon-s-question {
margin-left:10px; margin-left: 10px;
width: 16px; width: 16px;
height: 16px; height: 16px;
} }
} }
} }
.serviceSchedule-table{ .serviceSchedule-table {
min-width: 1200px; min-width: 1200px;
padding-top: 15px; padding-top: 15px;
} }
...@@ -439,6 +468,16 @@ ...@@ -439,6 +468,16 @@
.header { .header {
padding: 30px; padding: 30px;
width: 100%; width: 100%;
.el-breadcrumb {
.breadcrumb-serviceSchedule {
/deep/ .breadcrumb-back {
font-weight: 400 !important;
color: #606266;
cursor: text;
cursor: pointer;
}
}
}
} }
.serviceSchedule-container { .serviceSchedule-container {
height: 100%; height: 100%;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册