Commit a55ccd2e by 胡悦

提交待办和试驾代码

1 parent 961f44d4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "glsx-micro-system-child", "name": "glsx-micro-system-child",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"port": 10200, "port": 10201,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
......
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
padding: 0; padding: 0;
border-top: 1px solid #eaeefb; border-top: 1px solid #eaeefb;
border-bottom: 1px solid #eaeefb; border-bottom: 1px solid #eaeefb;
min-height: 250px; // min-height: 250px;
max-height: 500px; max-height: 500px;
overflow-y: auto; overflow-y: auto;
.container { .container {
......
...@@ -185,15 +185,15 @@ export default { ...@@ -185,15 +185,15 @@ export default {
default: () => { default: () => {
return { return {
// 多选-判断来自哪个页面 // 多选-判断来自哪个页面
// mutiSelectName: { mutiSelectName: {
// type: String, type: String,
// default: '' default: ''
// }, },
// 多选-唯一标识 // 多选-唯一标识
// mutiSelectUniqueKey: { mutiSelectUniqueKey: {
// type: String, type: String,
// default: '' default: ''
// }, },
// 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000) // 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000)
// btnId: { // btnId: {
// type: String, // type: String,
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
v-if="item.clickFunc" v-if="item.clickFunc"
:type="item.inputText || 'text'" :type="item.inputText || 'text'"
:readonly="item.readonly || false" :readonly="item.readonly || false"
:placeholder="item.placeholder || '请输入'"
@click.native="item.clickFunc" @click.native="item.clickFunc"
:class="item.clickFunc ? 'pointer' : ''" :class="item.clickFunc ? 'pointer' : ''"
:ref="item.ref" :ref="item.ref"
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
:type="item.inputText || 'text'" :type="item.inputText || 'text'"
:readonly="item.readonly || false" :readonly="item.readonly || false"
:disabled="item.disabled || false" :disabled="item.disabled || false"
:placeholder="item.placeholder || '请输入'"
v-model="ruleForm[item.prop]" v-model="ruleForm[item.prop]"
:maxlength="item.maxlength" :maxlength="item.maxlength"
:minlength="item.minlength" :minlength="item.minlength"
...@@ -46,6 +48,7 @@ ...@@ -46,6 +48,7 @@
<el-select <el-select
v-if="item.visibleFunc" v-if="item.visibleFunc"
v-model="ruleForm[item.prop]" v-model="ruleForm[item.prop]"
:disabled="item.disabled || false"
:placeholder="item.placeholder || '请选择'" :placeholder="item.placeholder || '请选择'"
:filterable="item.filterable || false" :filterable="item.filterable || false"
@change="selectChange" @change="selectChange"
...@@ -63,6 +66,7 @@ ...@@ -63,6 +66,7 @@
<el-select <el-select
v-else v-else
v-model="ruleForm[item.prop]" v-model="ruleForm[item.prop]"
:disabled="item.disabled || false"
:placeholder="item.placeholder || '请选择'" :placeholder="item.placeholder || '请选择'"
:filterable="item.filterable || false" :filterable="item.filterable || false"
@change="selectChange" @change="selectChange"
......
...@@ -12,23 +12,31 @@ const API = { ...@@ -12,23 +12,31 @@ const API = {
}, },
LOGIN_ACTION: '/login_action' LOGIN_ACTION: '/login_action'
} }
// 公共接口
const COMMON_API = { const COMMON_API = {
PROVINCE_LIST: '/publiccenter/basic/province/list' PROVINCE_LIST: '/publiccenter/basic/province/list'
} }
// 特约店接口
const SPECIALSHOP_API = { const SPECIALSHOP_API = {
SHOP_SEARCH: '/trialdrive/specialshop/search' SHOP_SEARCH: '/trialdrive/specialshop/search'
} }
const MENU_API = { // 试驾报表
MENU_SEARCH: '/usercenter/menu/search', const REPORT_API = {
MENU_CHILDREN: '/usercenter/menu/children', REPORT_SEARCH: '/trialdrive/trialdrivereport/search'
MENU_ADD: '/usercenter/menu/add',
MENU_EDIT: '/usercenter/menu/edit',
MENU_DELETE: '/usercenter/menu/delete',
MENU_INFO: '/usercenter/menu/info',
MENU_PERMTREE: '/usercenter/menu/permtree'
} }
const WORKLOG_API = { // 试驾车辆管理接口
WORKLOG_SEARCH: '/loggincenter/loggin/search', const VEHICLE_API = {
WORKLOG_EXPORT: '/loggincenter/loggin/export' VEHICLE_SEARCH: '/trialdrive/vehicle/drivevehicle/search',
VEHICLE_ADD: '/trialdrive/vehicle/drivevehicle/add',
VEHICLE_EDIT: '/trialdrive/vehicle/drivevehicle/update',
VEHICLE_DELETE: '/trialdrive/vehicle/drivevehicle/delete',
VEHICLE_UNBIND: '/trialdrive/vehicle/drivevehicle/unbindSn',
DOWNLOAD_TEMPLATE: '/trialdrice/vehicle/drivevehicle/downloadtemplate',
VEHICLE_IMPORT: '/trialdrice/vehicle/drivevehicle/import',
VEHICLE_EXPORT: '/trialdrive/vehicle/drivevehicle/export'
} }
export { API, WORKLOG_API, MENU_API, COMMON_API, SPECIALSHOP_API } // 审批管理
const APPROVAL_API = {
TODO_SEARCH: '/trialdrive/approval/searchTodoApproval'
}
export { API, COMMON_API, SPECIALSHOP_API, VEHICLE_API, APPROVAL_API, REPORT_API }
...@@ -11,16 +11,6 @@ const routes = [ ...@@ -11,16 +11,6 @@ const routes = [
component: () => import('../views/specialShop/index.vue') component: () => import('../views/specialShop/index.vue')
}, },
{ {
path: '/menuManage',
name: 'MenuManage',
component: () => import('../views/menuManage/index.vue')
},
{
path: '/workLog',
name: 'workLog',
component: () => import('../views/workLog/index.vue')
},
{
path: '/todo', path: '/todo',
name: 'toDo', name: 'toDo',
component: () => import('../views/toDo/index.vue') component: () => import('../views/toDo/index.vue')
......
import { APPROVAL_API } from '@/config/config'
import request from '@/services/request'
// 获取待办列表
function getTodoList (params) {
const url = APPROVAL_API.TODO_SEARCH
return request(params, url)
}
export { getTodoList }
import { MENU_API } from '@/config/config'
import request from '@/services/request'
// 获取菜单列表
function getMenuList (params) {
const url = MENU_API.MENU_SEARCH
return request(params, url)
}
// 根据菜单根节点获取子节点
function getMenuChildren (params) {
const url = MENU_API.MENU_CHILDREN
return request(params, url)
}
// 添加菜单
function addMenu (params) {
const url = MENU_API.MENU_ADD
return request(params, url, 'post')
}
// 编辑菜单
function editMenu (params) {
const url = MENU_API.MENU_EDIT
return request(params, url, 'post')
}
// 删除菜单
function deleteMenu (params) {
const url = MENU_API.MENU_DELETE
return request(params, url)
}
// 获取菜单列表
function menuInfo (params) {
const url = MENU_API.MENU_INFO
return request(params, url)
}
// 获取上级菜单
function getPermtree (params) {
const url = MENU_API.MENU_PERMTREE
return request(params, url)
}
export { getMenuList, getMenuChildren, addMenu, editMenu, menuInfo, deleteMenu, getPermtree }
import { REPORT_API } from '@/config/config'
import request from '@/services/request'
// 获取报表列表
function getList (params) {
const url = REPORT_API.REPORT_SEARCH
return request(params, url)
}
export { getList }
import { SPECIALSHOP_API } from '@/config/config' import { SPECIALSHOP_API } from '@/config/config'
import request from '@/services/request' import request from '@/services/request'
// 获取用户列表 // 获取特约店列表
function getList (params) { function getList (params) {
const url = SPECIALSHOP_API.SHOP_SEARCH const url = SPECIALSHOP_API.SHOP_SEARCH
return request(params, url) return request(params, url)
......
import { VEHICLE_API } from '@/config/config'
import request from '@/services/request'
// 获取车辆列表
function getList (params) {
const url = VEHICLE_API.VEHICLE_SEARCH
return request(params, url)
}
// 新增车辆
function addVehicle (params) {
const url = VEHICLE_API.VEHICLE_ADD
return request(params, url, 'post')
}
// 编辑车辆
function editVehicle (params) {
const url = VEHICLE_API.VEHICLE_EDIT
return request(params, url, 'post')
}
// 批量删除车辆
function deleteVehicle (params) {
const url = VEHICLE_API.VEHICLE_DELETE
return request(params, url)
}
// 解绑车辆
function unbindVehicle (params) {
const url = VEHICLE_API.VEHICLE_UNBIND
return request(params, url)
}
// 下载模板
function downloadtemplate (params) {
const url = VEHICLE_API.DOWNLOAD_TEMPLATE
return request(params, url)
}
// 导入车辆
function importVehicle (params) {
const url = VEHICLE_API.VEHICLE_IMPORT
return request(params, url)
}
// 导出车辆
function exportVehicle (params) {
const url = VEHICLE_API.VEHICLE_EXPORT
return request(params, url)
}
export { getList, addVehicle, downloadtemplate, editVehicle, deleteVehicle, unbindVehicle, importVehicle, exportVehicle }
import { WORKLOG_API } from '@/config/config'
import request from '@/services/request'
// 获取用户列表
function getWorkLogList (params) {
const url = WORKLOG_API.WORKLOG_SEARCH
return request(params, url)
}
// 导出日志
function exportWorkLog (params) {
const url = WORKLOG_API.WORKLOG_EXPORT
return request(params, url)
}
export { getWorkLogList, exportWorkLog }
.pull-right { .pull-right {
float: right; float: right;
} }
.pull-left { .pull-left {
float: left; float: left;
} }
.table-btn { .table-btn {
margin-bottom: 20px; margin-bottom: 20px;
} }
...@@ -106,3 +108,25 @@ ...@@ -106,3 +108,25 @@
.statusText { .statusText {
vertical-align: middle; vertical-align: middle;
} }
// 导入样式
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 96px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.el-button.is-plain:focus,
.el-button.is-plain:hover {
background: none;
border: 0px;
}
\ No newline at end of file \ No newline at end of file
const Constants = { const Constants = {
// 用户状态 // 处理状态
USER_STATUS: { DEAL_STATUS: {
'1': '正常, green', '0': '未处理',
'2': '停用, red' '1': '已处理'
}, },
// 角色数据权限 // 事项类型
ROLE_AUTH: { ITEM_TYPE: {
'0': '本人', '1': '试驾围栏修改审核',
'1': '本人及下属', '2': '上牌资料审核'
'2': '本人部门',
'3': '本部门及下级部门',
'4': '全部'
},
// 租户可见度
ROLE_VISIBLE: {
0: '共享',
1: '仅系统管理员',
2: '可见租户'
},
// 菜单类型
MENU_TYPE: {
1: '目录'
},
MENU_OTYPE: {
2: '菜单',
3: '按钮'
},
MENU_NAME: {
1: '目录',
2: '菜单',
3: '按钮'
},
// 菜单状态
MENU_STATUS: {
1: '正常, green',
2: '不显示, gray'
},
// 组织状态
ORGINIZA_STATUS: {
'1': '正常',
'2': '停用'
},
// 字典状态
DICT_STATUS: {
'1': '启用, green',
'2': '停用, red'
},
// 日志操作状态
WORKLOG_STATUS: {
'0': '成功, green-text',
'-1': '失败, red-text'
} }
} }
export default Constants export default Constants
...@@ -92,7 +92,8 @@ const MOCK_CONFIG_URL = 'https://oss-config.test.glsx.com.cn/mock/60a371eafb9c10 ...@@ -92,7 +92,8 @@ const MOCK_CONFIG_URL = 'https://oss-config.test.glsx.com.cn/mock/60a371eafb9c10
let baseFlag = true let baseFlag = true
const getBaseUrl = () => { const getBaseUrl = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let BASE_URL = store.state.baseURL // let BASE_URL = store.state.baseURL
let BASE_URL = 'https://oss-config.test.glsx.com.cn/mock/60a75fe7fb9c105681999abe/trialrun'
if (!BASE_URL && baseFlag) { if (!BASE_URL && baseFlag) {
baseFlag = false baseFlag = false
instance({ instance({
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
ref="roleTable" ref="roleTable"
:tableParams="reportTableParams" :tableParams="reportTableParams"
:searchForm="searchForm" :searchForm="searchForm"
:getListApi="getListApi"
:hasNum="false" :hasNum="false"
> >
<span <span
...@@ -59,7 +60,8 @@ ...@@ -59,7 +60,8 @@
</template> </template>
<script> <script>
import { getProvinceList } from 'services/common'; import { getProvinceList } from 'services/common'
import { getList } from 'services/report'
export default { export default {
data() { data() {
return { return {
...@@ -68,54 +70,14 @@ export default { ...@@ -68,54 +70,14 @@ export default {
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'status', prop: 'shopCode',
placeholder: '特约店代码', placeholder: '特约店代码',
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'status', prop: 'shopName',
placeholder: '特约店名称', placeholder: '特约店名称',
},
{
type: 'input',
inputType: 'text',
prop: 'status',
placeholder: '承租人姓名',
},
{
type: 'input',
inputType: 'text',
prop: 'status',
placeholder: '联系电话',
},
{
type: 'input',
inputType: 'text',
prop: 'status',
placeholder: '业务类型',
},
{
type: 'input',
inputType: 'text',
prop: 'status',
placeholder: '项目分组',
},
{
type: 'selectDate',
prop: 'status',
dateModel: '',
placeholder: '请选择',
options: [{
label: '全部类型',
value: 0
}, {
label: '试驾围栏修改审核',
value: 1
}, {
label: '上牌资料审核',
value: 2
}]
} }
], ],
reportTableParams: { reportTableParams: {
...@@ -125,22 +87,23 @@ export default { ...@@ -125,22 +87,23 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '特约店代码', label: '特约店代码',
prop: 'roleName' prop: 'shopCode'
}, { }, {
label: '特约店名称', label: '特约店名称',
prop: 'remark' prop: 'shopName'
}, { }, {
label: '车型', label: '车型',
prop: 'enableStatus' prop: 'vehicleTypeName'
}, { }, {
label: '车架号VIN码', label: '车架号VIN码',
prop: 'createdDate' prop: 'sn'
}, { }, {
label: '时间', label: '时间',
prop: 'createdDate' prop: 'statDate'
} }
] ]
}, },
getListApi: getList,
list: { list: {
"message": "success", "message": "success",
"code": 200, "code": 200,
......
...@@ -42,13 +42,16 @@ ...@@ -42,13 +42,16 @@
slot-scope="scope" slot-scope="scope"
> >
<el-button <el-button
v-for="(j, idx) in todoTableParams.tableOption.btnList" v-if="scope.scope.status == 1"
:key="idx" type="text"
:type="j.type" @click="btnClick('todo', scope.scope)"
size="mini" >
plain 待办处理
@click="btnClick(j.pType, scope.scope)" </el-button>
>{{j.name}}</el-button> <el-button
v-else
type="text"
>无</el-button>
</span> </span>
</basic-table> </basic-table>
</div> </div>
...@@ -56,10 +59,12 @@ ...@@ -56,10 +59,12 @@
</template> </template>
<script> <script>
import { getTodoList } from 'services/approval'
export default { export default {
data() { data() {
return { return {
searchForm: {}, searchForm: {},
ITEMTYPE: this.$Constants.ITEM_TYPE,
todoFormList: [ todoFormList: [
{ {
label: '处理状态:', label: '处理状态:',
...@@ -68,23 +73,23 @@ export default { ...@@ -68,23 +73,23 @@ export default {
placeholder: '请选择', placeholder: '请选择',
options: [{ options: [{
label: '全部待办', label: '全部待办',
value: 0 value: ''
}, { }, {
label: '未处理', label: '未处理',
value: 1 value: 0
}, { }, {
label: '已处理', label: '已处理',
value: 2 value: 1
}] }]
}, },
{ {
label: '事项类型:', label: '事项类型:',
type: 'select', type: 'select',
prop: 'status', prop: 'busType',
placeholder: '请选择', placeholder: '请选择',
options: [{ options: [{
label: '全部类型', label: '全部类型',
value: 0 value: ''
}, { }, {
label: '试驾围栏修改审核', label: '试驾围栏修改审核',
value: 1 value: 1
...@@ -97,42 +102,36 @@ export default { ...@@ -97,42 +102,36 @@ export default {
todoTableParams: { todoTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '事项类型', label: '事项类型',
prop: 'roleName' prop: 'busType'
}, { }, {
label: '创建人', label: '创建人',
prop: 'remark' prop: 'username'
}, { }, {
label: '车辆类型', label: '车辆类型',
prop: 'enableStatus' prop: '',
formatter: (cellValue) => {
return '试乘试驶车'
}
}, { }, {
label: '创建时间', label: '创建时间',
prop: 'createdDate' prop: 'createdDate'
} }
],
tableOption: {
width: 300,
btnList: [
{
type: 'primary',
name: '编辑',
pType: 'edit'
},
{
type: 'danger',
name: '删除',
pType: 'delete'
}
] ]
} },
} getListApi: getTodoList
} }
}, },
methods: { methods: {
btnClick(type, scope) { btnClick(type, scope) {
switch (type) {
case 'todo':
// 跳转
break
}
} }
}, },
} }
......
<template>
<div class="system-container">
<div class="container">
<search-form
class="searchTop border-shadow"
:formModel="searchForm"
:formList="worklogFormList"
>
<slot name="form-slot">
<el-button
type="primary"
:size="btn_size"
icon="el-icon-search"
:id="tableParams.btnId"
>搜索</el-button>
<el-button
type="primary"
:size="btn_size"
icon="el-icon-refresh"
@click="refresh"
>重置</el-button>
</slot>
</search-form>
<div class="table-btn">
<el-button
type="primary"
:size="btn_size"
@click="exportTable"
>导出</el-button>
</div>
<basic-table
ref="worklogTable"
:tableParams="tableParams"
:getListApi="getListApi"
:beforeSearchFn="beforeSearchFn"
:searchForm="searchDataForm"
:hasNum="false"
>
</basic-table>
</div>
</div>
</template>
<script>
import store from '@/store';
import { WORKLOG_API } from '@/config/config'
import { getWorkLogList, exportWorkLog } from 'services/worklog';
export default {
data() {
return {
WORKLOGSTATUS: this.$Constants.WORKLOG_STATUS,
searchForm: {},
searchDataForm: {},
worklogFormList: [
{
type: 'daterange',
prop: 'daterange',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}
],
tableParams: {
// mutiSelectName: 'worklog',
// mutiSelectUniqueKey: 'id',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
{
label: '日志编号',
prop: 'id'
}, {
label: '系统菜单',
prop: 'module'
}, {
label: '操作类型',
prop: 'action'
}, {
label: '操作账号',
prop: 'operatorName'
}, {
label: '所属组织',
prop: 'belongOrg'
}, {
label: '主机IP',
prop: 'ip',
}, {
label: '操作状态',
prop: 'result',
// addHtml: 'status'
}, {
label: '创建时间',
prop: 'createdDate'
}
]
},
getListApi: getWorkLogList
}
},
methods: {
refresh() {
this.searchForm = {}
this.searchDataForm = {}
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
if (this.searchForm.daterange) {
this.searchDataForm.sDate = this.searchForm.daterange[0]
this.searchDataForm.eDate = this.searchForm.daterange[1]
} else {
if (this.searchDataForm.sDate) delete this.searchDataForm.sDate && delete this.searchDataForm.eDate
}
resolve()
})
},
// 导出列表
exportTable() {
const params = this.$refs.worklogTable.page
this.$Common.exportExcel({
url: store.state.baseURL + WORKLOG_API.WORKLOG_EXPORT,
data: params,
method: 'GET',
fileName: '操作日志.xlsx'
})
}
}
}
</script>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!