diff --git a/public/config.js b/public/config.js index f88012a..6a082a5 100644 --- a/public/config.js +++ b/public/config.js @@ -1,6 +1,13 @@ -config = { - API_URL: 'http://www.fatoaniic.com/api', - UPLOAD_URL: "http://www.fatoaniic.com/api/api-ftp/ftp/upload", - DOWNLOAD_URL: "http://www.fatoaniic.com/api/api-ftp/ftp/download?filename=", +// config = { +// API_URL: 'http://www.fatoaniic.com/api', +// UPLOAD_URL: "http://www.fatoaniic.com/api/api-ftp/ftp/upload", +// DOWNLOAD_URL: "http://www.fatoaniic.com/api/api-ftp/ftp/download?filename=", +// SHOW_URL: "http://www.fatoaniic.com/ftpfile/", +// } + config = { + API_URL: 'http://172.119.51.18:8082', + UPLOAD_URL: "http://172.119.51.18:8082/attachment/uploadOne", + DOWNLOAD_URL: "http://172.119.51.18:8082/api-ftp/ftp/download?filename=", SHOW_URL: "http://www.fatoaniic.com/ftpfile/", - } \ No newline at end of file + } + \ No newline at end of file diff --git a/src/api/company.js b/src/api/company.js index 817b546..ffd2402 100644 --- a/src/api/company.js +++ b/src/api/company.js @@ -1,48 +1,74 @@ import request from '@/utils/request'; -import requestLoading from '@/utils/requestLoading'; //获取企业列表 export function getEnterpriseList(params) { - return requestLoading({ - url: '/api-enterprise/enterprise/enterprises', - method: 'get', - params + return request({ + url: '/company/search', + method: 'post', + data:params + }); +} +//删除企业 +export function deleteEnterprise(params) { + return request({ + url: '/company/delete', + method: 'post', + data:params }); } //获取企业详情 export function getEnterpriseDetails(params) { - return requestLoading({ - url: '/api-enterprise/enterprise/selectById', - method: 'get', - params + return request({ + url: '/company/get/'+params, + method: 'get' + }); +} +//修改企业信息 +export function editEnterprise(params) { + return request({ + url: '/company/edit', + method: 'post', + data:params }); } //添加企业 export function addEnterprise(params) { - return requestLoading({ - url: '/api-enterprise/enterprise/enterprises', + return request({ + url: '/company/add', method: 'post', data:params }); } -//删除企业 -export function deleteEnterprise(params) { - return requestLoading({ - url: '/api-enterprise/enterprise/enterprises', - method: 'delete', - params +//区域查询接口 +export function getArea(params) { + return request({ + url: '/common/getComboList_2/40010/'+params, + method: 'get' }); } -//修改企业信息 -export function editEnterprise(params) { - return requestLoading({ - url: '/api-enterprise/enterprise/enterprises', - method: 'put', - data:params +//行业大类查询接口 +export function getBigIndustryList() { + return request({ + url: '/common/getComboList_1/40008', + method: 'get' }); } +//行业小类查询接口 +export function getSmallIndustryList(params) { + return request({ + url: '/common/getComboList_2/40009/'+params, + method: 'get' + }); +} + + + + + + + //启 export function enableEnterprise(params) { - return requestLoading({ + return request({ url: '/api-enterprise/enterprise/enable', method: 'put', data:params @@ -50,40 +76,17 @@ export function enableEnterprise(params) { } //停 export function disableEnterprise(params) { - return requestLoading({ + return request({ url: '/api-enterprise/enterprise/disable', method: 'put', data:params }); } -//行业大类查询接口 -export function getBigIndustryList(params) { - return requestLoading({ - url: '/api-enterprise/industry/bigIndustry', - method: 'get', - params - }); -} -//行业小类查询接口 -export function getSmallIndustryList(params) { - return requestLoading({ - url: '/api-enterprise/industry/smallIndustry', - method: 'get', - params - }); -} -//区域查询接口 -export function getArea(params) { - return requestLoading({ - url: '/api-enterprise/area/getArea', - method: 'get', - params - }); -} + //审核 export function approveEnterprise(params) { - return requestLoading({ + return request({ url: '/api-enterprise/enApply/approve', method: 'put', data:params @@ -91,7 +94,7 @@ export function approveEnterprise(params) { } //企业审核列表 export function enApplyList(params) { - return requestLoading({ + return request({ url: '/api-enterprise/enApply/page', method: 'get', params @@ -99,7 +102,7 @@ export function enApplyList(params) { } //公司审核页面的详情 export function enApplyDetail(params) { - return requestLoading({ + return request({ url: '/api-enterprise/enApply/detail', method: 'get', params diff --git a/src/api/notice.js b/src/api/notice.js index 8cfd06b..39a308f 100644 --- a/src/api/notice.js +++ b/src/api/notice.js @@ -1,53 +1,54 @@ import request from '@/utils/request'; import requestLoading from '@/utils/requestLoading'; - -//获取公告列表 -export function getNoticeList(params) { - return requestLoading({ - url: '/api-login/ann/announcements', - method: 'get', - params - }); -} -//获取公告详情 -export function getNoticeInfo(params) { - return requestLoading({ - url: '/api-login/ann/announcement', +//获取文章类型下拉列表 +export function getNoticeTypeList(params) { + return request({ + url: '/common/getComboList_1/40005', method: 'get', params }); } - -//更新公告详情 -export function editNoticeInfo(params) { - return requestLoading({ - url: '/api-login/ann/announcement', - method: 'put', +//获取文章列表 +export function getNoticeList(params) { + return request({ + url: '/content/search', + method: 'post', data:params }); } -//添加公告 +//添加文章 export function addNoticeInfo(params) { - return requestLoading({ - url: '/api-login/ann/announcement', + return request({ + url: '/content/add', method: 'post', data:params }); } -//删除公告 -export function deleteNoticeInfo(params) { - return requestLoading({ - url: '/api-login/ann/announcement', - method: 'delete', - params + + + + + +//获取文章详情 +export function getNoticeInfo(params) { + return request({ + url: '/content/get/'+params, + method: 'get' }); } - -//获取接收人列表 -export function identitytypeList(params) { - return requestLoading({ - url: '/api-login/ann/identitytype', - method: 'get', - params +//更新文章详情 +export function editNoticeInfo(params) { + return request({ + url: '/content/edit', + method: 'post', + data:params }); } +//删除文章 +export function deleteNoticeInfo(params) { + return request({ + url: '/content/delete', + method: 'post', + data:params + }); +} \ No newline at end of file diff --git a/src/api/public.js b/src/api/public.js new file mode 100644 index 0000000..a24e34b --- /dev/null +++ b/src/api/public.js @@ -0,0 +1,5 @@ +import request from '@/utils/request'; + + + + diff --git a/src/main.ts b/src/main.ts index 806b84b..8f5d626 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,7 +14,7 @@ import '@/icons' // icon import echarts from 'echarts' //echarts import scroll from 'vue-seamless-scroll' //滚动插件 import md5 from 'js-md5'; //md5 加密 -import '@/permission' // 权限控制 +// import '@/permission' // 权限控制 //判断浏览器,如果是IE11以下则不加载‘vue-quill-editor 富文本编辑器’并提示浏览器版本过低 let userAgent = window.navigator.userAgent; diff --git a/src/utils/request.js b/src/utils/request.js index d20ace2..d8f6aea 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -23,24 +23,24 @@ service.interceptors.request.use((config) => { if (store.getters.token &&  !config.isLogin) { config.headers['token'] = getToken() } - + config.headers['token'] = '800580795f01449f9100c4d2983d13c9' if (config.method == 'post' || config.method == 'put') { // 校验发送的请求是否包含敏感字符 //----------------start----------------------------- - let sData = '' - for (const i in config.data) { - if (config.data.hasOwnProperty(i)) { - const item = config.data[i]; - sData += item + "," - } - } - store.getters.keys.forEach(item => { - if (sData.indexOf(item) != -1) { - isKey = true - } - }); + // let sData = '' + // for (const i in config.data) { + // if (config.data.hasOwnProperty(i)) { + // const item = config.data[i]; + // sData += item + "," + // } + // } + // store.getters.keys.forEach(item => { + // if (sData.indexOf(item) != -1) { + // isKey = true + // } + // }); //----------------End--------------------------------- - config.data = qs.stringify(config.data) + // config.data = qs.stringify(config.data) // qs.stringify(config.params, { indices: false }) } else if (config.method == 'get') { config.paramsSerializer = params => { @@ -73,10 +73,10 @@ service.interceptors.response.use( */ const res = response.data // const res = JSON.parse(response.data) - if (res.code !== 200) { + if (res.status !== 200) { // 511:失效的token;弹出弹框,返回登录页 - if (res.code === 511) { + if (res.status === 511) { if (isToken) { isToken = false //防止下个一个token失效的请求在弹出第二个框 MessageBox.alert('你已被登出,请重新登录', '确定登出', { @@ -94,7 +94,7 @@ service.interceptors.response.use( } else { //接口失败统一报错 Message({ - message: res.msg, + message: res.message, type: 'error', duration: 5 * 1000 }) diff --git a/src/views/layout/components/Sidebar/index.vue b/src/views/layout/components/Sidebar/index.vue index 29de78c..7e87b58 100644 --- a/src/views/layout/components/Sidebar/index.vue +++ b/src/views/layout/components/Sidebar/index.vue @@ -40,26 +40,31 @@ data(){ return { routes:[ + // { + // path: 'menu', + // name: 'menuManage', + // meta: {title: '菜单管理', icon: 'table', noCache: true}, + // }, { - path: 'menu', - name: 'menuManage', - meta: {title: '菜单管理', icon: 'table', noCache: true}, + path: 'company', + name: 'companyManage', + meta: {title: '公司管理', icon: 'dashboard', noCache: true}, }, { path: 'user', name: 'userManage', meta: {title: '用户管理', icon: 'dashboard', noCache: true}, }, - { - path: 'role', - name: 'roleManage', - meta: {title: '角色管理', icon: 'eye', noCache: true}, - }, - { - path: 'permission', - name: 'permissionManage', - meta: {title: '权限管理', icon: 'form', noCache: true}, - }, + // { + // path: 'role', + // name: 'roleManage', + // meta: {title: '角色管理', icon: 'eye', noCache: true}, + // }, + // { + // path: 'permission', + // name: 'permissionManage', + // meta: {title: '权限管理', icon: 'form', noCache: true}, + // }, { path: 'notice', name: 'noticeManage', diff --git a/src/views/systemManage/company/company.vue b/src/views/systemManage/company/company.vue index 97e2752..3e1fcd4 100644 --- a/src/views/systemManage/company/company.vue +++ b/src/views/systemManage/company/company.vue @@ -10,6 +10,7 @@ 刷新 + 新增 @@ -128,12 +129,6 @@ export default { }, mounted() { this.initData() - //如果是系统或政府类型的用户,显示列表页,企业类型用户则直接到该企业的详情页 - /*if (this.identityId == '1' || this.identityId == '4') { - this.initData() - } else { - this.$router.push({name: "companyDetail"}) - }*/ }, methods: { //搜索查询 @@ -144,9 +139,12 @@ export default { //获取企业列表 initData() { const params = { - page: this.currentPage, - size: this.pageSize, - name: this.formSearch.name.trim(), + pageNum: this.currentPage, + pageSize: this.pageSize, + search:{ + name: this.formSearch.name.trim() + }, + sort:'' } getEnterpriseList(params).then(res => { if (res.data) { diff --git a/src/views/systemManage/company/companyDetail.vue b/src/views/systemManage/company/companyDetail.vue index 85f4180..49acd2d 100644 --- a/src/views/systemManage/company/companyDetail.vue +++ b/src/views/systemManage/company/companyDetail.vue @@ -29,13 +29,12 @@ + + + - - - {{ formData.enTwoPrefix }} - @@ -61,15 +60,37 @@ v-for="(item,index) in smallIndustryType" :key="index" :label="item.name" - :value="item.id" + :value="item.value" > - - + +
+ + + + + + + + +
+
@@ -95,7 +116,7 @@ v-for="(item,index) in provinces" :key="index" :label="item.name" - :value="item.id" + :value="item.value" > @@ -116,42 +137,21 @@ v-for="(item,index) in areas" :key="index" :label="item.name" - :value="item.id" + :value="item.value" > - -
- - - - - - - - -
- -
+ + + + @@ -175,12 +175,6 @@ - - - - - - @@ -259,15 +252,6 @@ export default { }; //网址校验 const checkURL = (rule, value, callback) => { - // if (!value) { - // return callback(new Error("请输入官网地址")); - // } else { - // if (!validateURL(value)) { - // return callback(new Error("请输入正确格式的网址")); - // } else { - // callback(); - // } - // } if (value && !validateURL(value)) { return callback(new Error("请输入正确格式的网址")); } else { @@ -300,9 +284,7 @@ export default { }; return { upload_file: config.UPLOAD_URL, //上传图片的接口地址 - identityId: this.$store.getters.identity || "", //用户级别 param: this.$route.query.name ? this.$route.query : "", //上一级页面的传参 - isApply: this.$route.query.apply || false, //是否是申请 formLabelWidth: "180px", //form表单lable宽度 photoUrl: "", //正面法人证件照 reversePhotoUrl: "", //反面法人证件照 @@ -317,8 +299,6 @@ export default { //form表单数据 code: "", //统一社会信用代码 name: "", //企业名称 - enOnePrefix: "", //一级(公司)前缀 - enTwoPrefix: "86.121", //二级前缀 typeId: "", //企业类型id inBigId: "", //行业大类型id inSmallId: "", //行业小类型id @@ -393,26 +373,11 @@ export default { smallIndustryType: [] //行业小类列表 }; }, - created() { - //是否是前缀注册,如果是前缀注册则添加一二级前缀的校验 - if (this.isApply) { - this.rules.enOnePrefix = [ - {required: true, message: "请输入一级(公司)前缀", trigger: "blur"} - ]; - // this.rules.enTwoPrefix = [ - // { required: true, message: "请输入二级前缀", trigger: "blur" } - // ]; - } - }, mounted() { //企业用户获取自己企业信息 - if (this.identityId == "3") { + if (this.isEdit) { this.getEnterpriseInfo(); } - //政府或系统用户点击编辑进入 - if (this.param.name) { - this.formateData(this.param); - } this.initData(); }, methods: { @@ -426,7 +391,7 @@ export default { }, //省市区变化时动态获取 changeArea(pid, type, clean) { - getArea({pid: pid}).then(res => { + getArea(pid).then(res => { if (type == 0) { this.provinces = res.data; } else if (type == 1) { @@ -468,7 +433,7 @@ export default { if (clean) { this.formData.inSmallId = ""; } - getSmallIndustryList({pid: this.formData.inBigId}).then(res => { + getSmallIndustryList(this.formData.inBigId).then(res => { this.smallIndustryType = res.data; }); }, @@ -517,23 +482,11 @@ export default { this.$router.go(-1); }); }, - //企业申请前缀 - applyPrefixInfo() { - applyPrefix(this.formData).then(res => { - this.$message({ - message: res.msg, - type: res.code == 200 ? "success" : "error" - }); - this.$router.go(-1); - }); - }, //form表单校验 submitForm(formName) { this.$refs[formName].validate(valid => { if (valid) { - if (this.isApply) { //前缀申请 - this.applyPrefixInfo(); - } else if (!this.isEdit) { //添加企业信息 + if (!this.isEdit) { //添加企业信息 this.addEnterpriseInfo(); } else { //修改企业信息 this.editEnterpriseInfo(); diff --git a/src/views/systemManage/notice/notice.vue b/src/views/systemManage/notice/notice.vue index 27f886e..b703771 100644 --- a/src/views/systemManage/notice/notice.vue +++ b/src/views/systemManage/notice/notice.vue @@ -1,28 +1,39 @@