diff --git a/src/api/operation/task/index.js b/src/api/operation/task/index.js new file mode 100644 index 0000000..497d73b --- /dev/null +++ b/src/api/operation/task/index.js @@ -0,0 +1,58 @@ +import httpService from "@/request" + +// 任务列表 +export function taskList(params) { + return httpService({ + url: `/user/taskRelease/list`, + method: 'get', + params: params, + }) +} +// 置顶 +export function topTask(params) { + return httpService({ + url: `/user/taskRelease/topTask`, + method: 'get', + params: params, + }) +} +// 取消 +export function cancelTask(params) { + return httpService({ + url: `/user/taskRelease/cancel`, + method: 'get', + params: params, + }) +} +// 撤回 +export function withdrawTask(params) { + return httpService({ + url: `/user/taskRelease/withdraw`, + method: 'get', + params: params, + }) +} +// 确认 +export function confirmTask(params) { + return httpService({ + url: `/user/taskRelease/confirm`, + method: 'get', + params: params, + }) +} +// 获取任务设置 +export function getSetting(params) { + return httpService({ + url: `/user/settingTaskRelease/getSetting`, + method: 'get', + params: params, + }) +} +// 保存任务设置 +export function Setting(params) { + return httpService({ + url: `/user/settingTaskRelease/setting`, + method: 'post', + data: params, + }) +} diff --git a/src/components/allCity/index.vue b/src/components/allCity/index.vue new file mode 100644 index 0000000..92bd377 --- /dev/null +++ b/src/components/allCity/index.vue @@ -0,0 +1,45 @@ + + + + + \ No newline at end of file diff --git a/src/components/upload/imgModal.vue b/src/components/upload/imgModal.vue new file mode 100644 index 0000000..bbd44ab --- /dev/null +++ b/src/components/upload/imgModal.vue @@ -0,0 +1,34 @@ + + + + + \ No newline at end of file diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue new file mode 100644 index 0000000..7fa8a65 --- /dev/null +++ b/src/components/upload/index.vue @@ -0,0 +1,68 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 8f35e61..dd8840a 100644 --- a/src/main.js +++ b/src/main.js @@ -21,8 +21,13 @@ const communityCode = store.getters.getCommunityCode; Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage' Vue.config.productionTip = false import commonTable from './components/table' +import commonUpload from './components/upload/index.vue' +import allCity from './components/allCity/index.vue' + // 注册组件 Vue.component('commonTable', commonTable) +Vue.component('commonUpload', commonUpload) +Vue.component('allCity', allCity) new Vue({ render: h => h(App), diff --git a/src/mixins/index.js b/src/mixins/index.js index 03a8b12..3801619 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -12,10 +12,10 @@ export default { install(Vue) { Vue.mixin({ computed: { - ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys']) + ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys','getCity']) }, methods: { - ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys']) + ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys','setCity']) } }) } diff --git a/src/router/operation.js b/src/router/operation.js index 51413c0..d05f2c6 100644 --- a/src/router/operation.js +++ b/src/router/operation.js @@ -6,4 +6,33 @@ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: /LittleBeeSaas/src/router/operation.js */ -export default [] \ No newline at end of file +export default [ + { + path: '/TaskManage', + name: "TaskManage", + title: "任务管理", + icon: 'home', + hide: false, + component: resolve => require(['@/views/Operation/TaskManage'], resolve), + redirect: '/TaskManage/TaskList', + meta: {title: '任务管理'}, + children: [ + { + path: '/TaskManage/TaskList', + name: "TaskList", + title: "任务列表", + hide: false, + component: resolve => require(['@/views/Operation/TaskManage/_taskList'], resolve), + meta: {title: '任务列表'}, + }, + { + path: '/TaskManage/TaskSet', + name: "TaskSet", + title: "任务设置", + hide: false, + component: resolve => require(['@/views/Operation/TaskManage/_taskSet'], resolve), + meta: {title: '任务设置'}, + }, + ] + }, +] \ No newline at end of file diff --git a/src/store/actions.js b/src/store/actions.js index e4f1be1..03f6ea7 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -19,6 +19,9 @@ const actions = { setOpenKeys: ({commit}, log) => { commit('setOpenKeys', log) }, + setCity: ({commit}, log) => { + commit('setCity', log) + }, } export default actions \ No newline at end of file diff --git a/src/store/getters.js b/src/store/getters.js index 9f79d7f..1c58a81 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -19,6 +19,9 @@ const getters = { getCommunityCode(state) { return state.communityCode }, + getCity(state) { + return state.cityList + }, } export default getters \ No newline at end of file diff --git a/src/store/mutations.js b/src/store/mutations.js index 145f2eb..ebd8215 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -25,6 +25,9 @@ const mutations = { state.communityCode = log; sessionStorage.setItem('communityCode', log); }, + setCity (state, data) { // 设置参数 + state.cityList = data + } } export default mutations \ No newline at end of file diff --git a/src/store/state.js b/src/store/state.js index 8071246..fc35059 100644 --- a/src/store/state.js +++ b/src/store/state.js @@ -11,5 +11,6 @@ const state = { openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [], token: sessionStorage.getItem('token') || "", communityCode: sessionStorage.getItem('communityCode') || "", + cityList:[] } export default state \ No newline at end of file diff --git a/src/views/Basic/Authority/index.vue b/src/views/Basic/Authority/index.vue index b7eb179..86813e2 100644 --- a/src/views/Basic/Authority/index.vue +++ b/src/views/Basic/Authority/index.vue @@ -279,6 +279,7 @@ export default { pager.current = pagination.current; pager.pageSize = pagination.pageSize; this.pagination = pager; + this.getData() }, sendRole(data) { this.form.manageUserId = data.id; diff --git a/src/views/Basic/EstateInfo/_buildingManage/depend/config.js b/src/views/Basic/EstateInfo/_buildingManage/depend/config.js index 2daac93..53dbcc2 100644 --- a/src/views/Basic/EstateInfo/_buildingManage/depend/config.js +++ b/src/views/Basic/EstateInfo/_buildingManage/depend/config.js @@ -23,7 +23,7 @@ export const columns = [ dataIndex: "leaseRate", width: "20%", customRender:function(leaseRate){ - return leaseRate+'%' + return ( leaseRate*100 )+'%' } }, { @@ -31,7 +31,7 @@ export const columns = [ dataIndex: "occupancyRate", width: "20%", customRender:function(occupancyRate){ - return occupancyRate+'%' + return ( occupancyRate*100 )+'%' } }, { diff --git a/src/views/Basic/EstateInfo/_houseManage/index.vue b/src/views/Basic/EstateInfo/_houseManage/index.vue index 9b7e97c..9d32d7c 100644 --- a/src/views/Basic/EstateInfo/_houseManage/index.vue +++ b/src/views/Basic/EstateInfo/_houseManage/index.vue @@ -128,9 +128,9 @@ 房屋类型 - + + @click="editInput(item,index)" > {{item.name}} @@ -299,12 +299,13 @@ export default { }, // 打开编辑框 聚焦input editInput(obj,i) { + // this.$set(obj,'show',false) obj.show = true; // v-if show = true时候渲染input - this.$nextTick(()=>{ //如果不加nextTick。这个refs.input打印为undefined,估计是页面dom还没渲染完成 - console.log(this.$refs.input[0]);//因为是V-IF所以始终都是只展示一个input,所以循环的refs.input虽然是数组但是长度为1,所以下标为0而不是传进来index - console.log(this.$refs.input[0].focus());//打印了半天$refs.input[0].focus()都是undefined,点进去看也是一个空数组。。但是实际是一个function - this.$refs.input[0].focus() //直接调用方法就可以聚焦了 - }) + console.log(this.typeList); + // this.$nextTick(function(){ //如果不加nextTick。这个refs.input打印为undefined,估计是页面dom还没渲染完成 + // console.log(this.$refs.input[0]); + // this.$refs.input[0].focus() //聚焦 + // }) }, // 离开编辑框的回调 async editType(item){ @@ -357,6 +358,7 @@ export default { pager.current = pagination.current; pager.pageSize = pagination.pageSize; this.pagination = pager; + this.getData() }, del(ids) { this.$confirm({ diff --git a/src/views/Basic/WorkOrder/index.vue b/src/views/Basic/WorkOrder/index.vue index 6a5d5a0..96d8c43 100644 --- a/src/views/Basic/WorkOrder/index.vue +++ b/src/views/Basic/WorkOrder/index.vue @@ -257,6 +257,7 @@ export default { pager.current = pagination.current; pager.pageSize = pagination.pageSize; this.pagination = pager; + this.getData() }, Actions(data) { console.log(data); diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue index 59251c6..a102c77 100644 --- a/src/views/Login/index.vue +++ b/src/views/Login/index.vue @@ -241,7 +241,7 @@ export default { }, created() { this.keyupEnter(); - this.getCity() + this.getAllCity() }, watch: { communityCode:{ @@ -251,12 +251,13 @@ export default { } }, methods: { - getCity(){ + getAllCity(){ this.$axios({ method:'get', url:process.env.VUE_APP_URL+'manage/city/allCity',//【api不需要communityCode】 }).then((response) =>{ this.cityList = response.data.data + this.setCity(response.data.data); }).catch((error) =>{ console.log(error) //请求失败返回的数据 }) @@ -278,6 +279,7 @@ export default { // 选择城市后获取该城市小区 onChange(data){ this.getCommunity(data[2]) + this.communityCode=undefined }, // 级联筛选 filter(inputValue, path) { diff --git a/src/views/Operation/TaskManage/_taskList/depend/config.js b/src/views/Operation/TaskManage/_taskList/depend/config.js new file mode 100644 index 0000000..9bcb6da --- /dev/null +++ b/src/views/Operation/TaskManage/_taskList/depend/config.js @@ -0,0 +1,166 @@ +export const pagination = { + current: 1, + total: 0, + pageSize: 10, + showTotal: (total) => `共 ${total} 条`, + showSizeChanger: true, + showQuickJumper: true, +} +export const searchForm = { + status:undefined, + rewardType: undefined, + type: undefined, + keyword:'' +} +export const columns = [ + { + title: "任务单号", + width: "12%", + dataIndex: "code", + }, + { + title: "创建人名称", + width: "5%", + dataIndex: "createName", + }, + { + title: "任务状态", + width: "4%", + dataIndex: "status", + customRender: function (status) { + switch (status) { + case 1: + return '已发布' + case 2: + return '已接取' + case 3: + return '服务中' + case 4: + return '待确认' + case 5: + return '已完成' + case 6: + return '已评价' + case 9: + return '已取消' + } + } + }, + { + title: "类型", + width: "4%", + dataIndex: "type", + customRender: function (type) { + switch (type) { + case 1: + return '跑腿' + case 2: + return '家政' + case 3: + return '维修' + case 4: + return '家教' + case 9: + return '其他' + } + } + }, + { + title: "备注", + width: "8%", + dataIndex: "remarks", + }, + { + title: "接单人名称", + width: "5%", + dataIndex: "receiverName", + }, + { + title: "可接单开始时间", + width: "10%", + dataIndex: "readyStartTime", + }, + { + title: "可接单结束时间", + width: "10%", + dataIndex: "readyEndTime", + }, + { + title: "服务人员", + width: "4%", + dataIndex: "servicePersonnel", + customRender: function (servicePersonnel) { + switch (servicePersonnel) { + case 1: + return '住户' + case 2: + return '物业' + } + } + }, + { + title: "联系人", + width: "4%", + dataIndex: "contact", + }, + { + title: "报酬类型", + width: "4%", + dataIndex: "rewardType", + customRender: function (rewardType) { + switch (rewardType) { + case 1: + return '赏金' + case 2: + return '积分' + } + } + }, + { + title: "报酬数", + width: "4%", + dataIndex: "reward", + }, + { + title: "创建时间", + width: "8%", + dataIndex: "createDate", + }, + { + title: "操作", + dataIndex: "action", + key: "action", + width: "300", + fixed: "right", + scopedSlots: { customRender: "action" }, + }, +] +export const options = { + rewardType: [ + { + id: 1, + name:'赏金' + }, + { + id: 2, + name:'积分' + }, + ], + type: [ + { + id:1, name:'跑腿' + }, + { + id:2, name:'家政' + }, + { + id:3, name:'维修' + }, + { + id:4, name:'家教' + }, + { + id:9, name:'其他' + }, + ] +} \ No newline at end of file diff --git a/src/views/Operation/TaskManage/_taskList/index.vue b/src/views/Operation/TaskManage/_taskList/index.vue new file mode 100644 index 0000000..1cf5597 --- /dev/null +++ b/src/views/Operation/TaskManage/_taskList/index.vue @@ -0,0 +1,213 @@ + + + + + \ No newline at end of file diff --git a/src/views/Operation/TaskManage/_taskSet/depend/config.js b/src/views/Operation/TaskManage/_taskSet/depend/config.js new file mode 100644 index 0000000..f26a7b6 --- /dev/null +++ b/src/views/Operation/TaskManage/_taskSet/depend/config.js @@ -0,0 +1,18 @@ +export const set = { + taskEnable: undefined, + releaseEnable: undefined, + releaseFreeTime: undefined, + releaseDeductType: undefined, + releaseTimeoutInterval: undefined, + releaseTimeoutValue: undefined, + releaseTimeoutMax: undefined, + releaseReturnType: undefined, + ordersEnable: undefined, + ordersFreeTime: undefined, + ordersDeductType: undefined, + ordersTimeoutInterval: undefined, + ordersTimeoutValue: undefined, + ordersTimeoutMax: undefined, + ordersReturnType: undefined, + serviceConfirmTime: undefined, +} \ No newline at end of file diff --git a/src/views/Operation/TaskManage/_taskSet/index.vue b/src/views/Operation/TaskManage/_taskSet/index.vue new file mode 100644 index 0000000..b04eb5c --- /dev/null +++ b/src/views/Operation/TaskManage/_taskSet/index.vue @@ -0,0 +1,168 @@ + + + + + \ No newline at end of file diff --git a/src/views/Operation/TaskManage/index.vue b/src/views/Operation/TaskManage/index.vue new file mode 100644 index 0000000..b0561c2 --- /dev/null +++ b/src/views/Operation/TaskManage/index.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file