diff --git a/api/file.js b/api/file.js new file mode 100644 index 0000000..ae56ea5 --- /dev/null +++ b/api/file.js @@ -0,0 +1,44 @@ +import { + HTTP_REQUEST_URL_THREE, + HEADER, + TOKENNAME, +} from '@/config/app'; +import { Toast } from '../libs/uniApi'; +// import { checkLogin } from '../libs/login'; +import store from '../store'; + +function toLogin() { + store.commit("LOGOUT"); + uni.showToast({ + title: '请登录', + icon: 'none', + duration: 1000 + }); +} + +function upLoad(url, data) { + let Url = HTTP_REQUEST_URL_THREE, + header = {} + // if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token; + if (store.state.app.token) header[TOKENNAME] = store.state.app.token; + // header[TOKENNAME] = 'Bearer sdjflidshjgfkbdasgjmasbgvhauuiavhkesvndkaesbvkjsdbv'; + return new Promise((reslove, reject) => { + uni.uploadFile({ + url: Url + '/api' + url, + filePath: data.filePath, + name: data.name, + success: (uploadFileRes) => { + uploadFileRes.data = JSON.parse(uploadFileRes.data) + if(uploadFileRes.data.code==1) reslove(uploadFileRes.data) + else Toast('网络错误') + }, + fail: (err) => { + Toast('网络错误') + } + }) + }); +} + +export const upLoadImage = (data)=>{ + return upLoad('/upload/image', data) +} \ No newline at end of file diff --git a/api/oaPbulic.js b/api/oaPbulic.js new file mode 100644 index 0000000..31f1e46 --- /dev/null +++ b/api/oaPbulic.js @@ -0,0 +1,31 @@ +import oahttp from "@/utils/oahttp.js"; + +/** + * 获取市 + */ +export const commonCity = (data) => oahttp.get('/common/city', data) + +/** + * 获取省 + */ +export const commonProvince = (data) => oahttp.get('/common/province', data) + +/** + * 获取区县 + */ +export const commonArea = (data) => oahttp.get('/common/area', data) + +/** + * 获取城镇 + */ +export const commonStreet = (data) => oahttp.get('/common/street', data) + +/** + * 获取村 + */ +export const commonVillage = (data) => oahttp.get('/common/village', data) + +/** + * 获取小队 + */ +export const commonBrigade = (data) => oahttp.get('/common/brigade', data) \ No newline at end of file diff --git a/api/oaUser.js b/api/oaUser.js index 976a82f..1f721ed 100644 --- a/api/oaUser.js +++ b/api/oaUser.js @@ -20,3 +20,8 @@ export const userCenter = (data) => oahttp.get('/user/center', data) */ export const userInfo = (data) => oahttp.get('/user/info', data) +/** + * 新增人员 + */ +export const loginAdd = (data) => oahttp.post('/login/add', data) + diff --git a/pages.json b/pages.json index 9b9ec1b..dbff3f8 100644 --- a/pages.json +++ b/pages.json @@ -283,6 +283,24 @@ "navigationBarTextStyle": "white" } + }, { + "path": "companyAdmin/companyAdmin", + "style": { + "navigationBarTitleText": "公司管理", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#3175f9", + "navigationBarTextStyle": "white" + } + + }, { + "path": "newPersonnel/newPersonnel", + "style": { + "navigationBarTitleText": "新增人员", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#3175f9", + "navigationBarTextStyle": "white" + } + }] }], "globalStyle": { diff --git a/static/server/server.js b/static/server/server.js index 0ff59dc..105faba 100644 --- a/static/server/server.js +++ b/static/server/server.js @@ -17,7 +17,8 @@ export const wenluData = [ 'gxsy/laojiao@2x.png', 'gxsy/zbgy@2x.png' ] -export const marketData = [{ +export const marketData = [ + { title: '江阳区', text: '醉美泸州 • 中国酒城', src: 'gxsy/jiangyang@2x.png', @@ -66,7 +67,8 @@ export const marketData = [{ code: '510522' } ] -export const shichangData = [{ +export const shichangData = [ + { url: 'img4@2x.png', title: 'rexiao@2x.png', text: '农业生产产品' @@ -77,7 +79,8 @@ export const shichangData = [{ text: '村名生活用品' } ] -export const openList = [{ +export const openList = [ + { title: '党建在线', text: '党建资讯文章', src: 'djzx@2x.png', @@ -126,7 +129,8 @@ export const openList = [{ } } ] -export const quickLink = [{ +export const quickLink = [ + { icon: 'scfw', src: 'scfw.png', name: '商超服务', @@ -209,7 +213,8 @@ export const oaHomeData = [ }, { text: '公司管理', - icon: prefix + 'oa/bxsq@2x.png' + icon: prefix + 'oa/bxsq@2x.png', + url: '/subpkg/companyAdmin/companyAdmin' }, { text: '片区经理', diff --git a/subpkg/companyAdmin/companyAdmin.vue b/subpkg/companyAdmin/companyAdmin.vue new file mode 100644 index 0000000..b807d87 --- /dev/null +++ b/subpkg/companyAdmin/companyAdmin.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/subpkg/newPersonnel/newPersonnel.vue b/subpkg/newPersonnel/newPersonnel.vue new file mode 100644 index 0000000..0d079fa --- /dev/null +++ b/subpkg/newPersonnel/newPersonnel.vue @@ -0,0 +1,464 @@ + + + + + \ No newline at end of file diff --git a/subpkg/personnel/personnel.vue b/subpkg/personnel/personnel.vue index 2eed411..2ce0730 100644 --- a/subpkg/personnel/personnel.vue +++ b/subpkg/personnel/personnel.vue @@ -1,6 +1,6 @@