diff --git a/src/components/menu-copy.vue b/src/components/menu-copy.vue
new file mode 100644
index 0000000000000000000000000000000000000000..e9a2454b1aae6c094bb50cce5f25d95b353e4a1f
--- /dev/null
+++ b/src/components/menu-copy.vue
@@ -0,0 +1,478 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/shop-car-apply/apply_service_state.vue b/src/components/shop-car-apply/apply_service_state.vue
index 56bfe764f70b285acf4f7bbf3c77f9859f0a50d3..baada5f221e9fd48538448325e8c78ec463bcd43 100644
--- a/src/components/shop-car-apply/apply_service_state.vue
+++ b/src/components/shop-car-apply/apply_service_state.vue
@@ -227,6 +227,7 @@ export default {
.system {
padding: 0 30px;
position: relative;
+ margin-bottom: 10px;
}
.system .el-select {
position: absolute;
diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue
index 0dd4c57faf88ed4fcf68080c1442c34fe7996f74..3c3deaeacca8d54e1c1b5f3ccc071e75d699cbe0 100644
--- a/src/pages/service_shop/shop_car_apply.vue
+++ b/src/pages/service_shop/shop_car_apply.vue
@@ -137,19 +137,19 @@ export default {
if(response.data.success&&data){
//应用
this.post_arr = [data]
- this.post_arr[0].app_id = parseInt(pp_data.app_id)
- this.post_arr[0].spec_id = parseInt(pp_data.spec_id)
- this.post_arr[0].duration_method = parseInt(pp_data.duration_unit)
- this.post_arr[0].duration = parseInt(pp_data.duration)
+ this.post_arr[0].app_id = parseInt(app_data.app_id)
+ this.post_arr[0].spec_id = parseInt(app_data.spec_id)
+ this.post_arr[0].duration_method = parseInt(app_data.duration_unit)
+ this.post_arr[0].duration = parseInt(app_data.duration)
this.post_arr[0].id = ''
this.service_arr.push({})
this.service_arr[0]['img'] = data.logo
this.service_arr[0]['title'] = data.app_name
this.service_arr[0]['type'] = data.type_name
this.service_arr[0]['auth'] = data.org_name
- this.service_arr[0]['size'] = pp_data.spec_id==0?'部署':'开发'
- this.service_arr[0]['applytype'] = '申请方式:'+pp_data.duration_unit==1?'月':'年'
- this.service_arr[0]['num'] = pp_data.duration
+ this.service_arr[0]['size'] = '规格:'+(app_data.spec_id==0?'部署':'开发')
+ this.service_arr[0]['applytype'] = '申请方式:'+(app_data.duration_unit==1?'月':'年')
+ this.service_arr[0]['num'] = app_data.duration
this.service_arr[0]['isMg'] = false
this.service_arr[0]['isapp'] = true
}
@@ -212,8 +212,6 @@ export default {
});
},
sub_service(){
- console.log(this.$refs.apply_service.$refs.apply_service_state);
- console.log(this.$refs.apply_service.$refs.apply_service_state[0].$refs.apply_service_state_table.metaData);
let formInline = this.$refs.apply_info.formInline
if(formInline.preson&&formInline.phone){
var phone_ruler=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/
@@ -230,6 +228,7 @@ export default {
}
var temp1 = this.$refs.apply_service.$refs.apply_service_state
this.post_arr.forEach((e,idx) => {
+ debugger
if(e.service_id){
temp.carts.push(
{
@@ -270,13 +269,17 @@ export default {
return
}
- for (let index = 0; index < temp.carts.length; index++) {
- const e = temp.carts[index];
- if(e.apply_fields[0].selected == 0){
- this.$message.error('请选择所需参数')
- return
+
+ for (let index = 0; index < temp.carts.length; index++) {
+ const e = temp.carts[index];
+ if(e.service_id){
+ if(e.apply_fields[0].selected == 0){
+ this.$message.error('请选择所需参数')
+ return
+ }
+ }
}
- }
+
this.$http
.post(`/apaas/serviceapp/v3/shopcart/apply`,temp)
.then(response => {
@@ -285,7 +288,7 @@ export default {
this.$message.success('申请成功')
this.$router.replace('/shop/service_application_successfully')
}else{
- this.$message.error('申请失败')
+ this.$message.error(response.data.errMsg)
}
}).catch(()=>{
this.$message.error('申请失败')
@@ -312,8 +315,8 @@ export default {
this.service_arr[l]['title'] = e.application.app_name
this.service_arr[l]['type'] = e.application.type_name
this.service_arr[l]['auth'] = e.application.org_name
- this.service_arr[l]['size'] = e.spec_id==0?'部署':'开发'
- this.service_arr[l]['applytype'] = '申请方式:'+e.duration_unit==1?'月':'年'
+ this.service_arr[l]['size'] = '规格:'+(e.spec_id==0?'部署':'开发')
+ this.service_arr[l]['applytype'] = '申请方式:'+(e.duration_unit==1?'月':'年')
this.service_arr[l]['num'] = e.duration
this.service_arr[l]['isMg'] = false
this.service_arr[l]['isapp'] = true
diff --git a/src/pages/user/user_info.vue b/src/pages/user/user_info.vue
index 289272c5175b71f99068fdf4231ee9c56f95ee0d..baa4533104807f45771e516fbacb04fccf97eccd 100644
--- a/src/pages/user/user_info.vue
+++ b/src/pages/user/user_info.vue
@@ -58,12 +58,13 @@
升级为开发者
升级为开发者
@@ -184,6 +185,7 @@ export default {
},
data: () => ({
activeName: "0",
+ userId: "",
is_admin: 0,
user_data: {
accountNo: "",
@@ -227,14 +229,15 @@ export default {
this.$api.user.getNowUser().then(response => {
if (response.data.success == 1) {
this.is_admin = response.data.data.is_admin;
- this.getUserInfo(response.data.data.user_id);
+ this.userId = response.data.data.user_id;
+ this.getUserInfo();
} else {
console.log(response.data.errMsg);
}
});
},
getUserInfo(id) {
- this.$api.user.getUserDetail({ id: id }).then(response => {
+ this.$api.user.getUserDetail({ id: this.userId }).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.user_data.accountNo = data.user_id;
@@ -298,6 +301,7 @@ export default {
message: "修改个人信息成功",
type: "success"
});
+ this.getUserInfo();
} else {
this.$message({
message: "修改个人信息失败",
@@ -333,6 +337,7 @@ export default {
type: "success"
});
this.diaPassWord = false;
+ this.getUserInfo();
} else {
this.$message({
message: "修改密码失败",
@@ -342,20 +347,36 @@ export default {
});
},
resetKey() {
- this.$api.authority
- .resetUserKey({ user_id: this.user_data.accountNo })
- .then(response => {
- if (response.data.success == 1) {
- this.$message({
- message: "重置密钥成功",
- type: "success"
+ this.$confirm("此操作将重置您的密钥, 是否继续?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ cancelButtonClass: "msg_btn_gray",
+ confirmButtonClass: "msg_btn",
+ type: "warning"
+ })
+ .then(() => {
+ this.$api.authority
+ .resetUserKey({ user_id: this.user_data.accountNo })
+ .then(response => {
+ if (response.data.success == 1) {
+ this.$message({
+ message: "重置密钥成功",
+ type: "success"
+ });
+ this.getUserInfo();
+ } else {
+ this.$message({
+ message: "重置密钥失败",
+ type: "error"
+ });
+ }
});
- } else {
- this.$message({
- message: "重置密钥失败",
- type: "error"
- });
- }
+ })
+ .catch(() => {
+ this.$message({
+ type: "info",
+ message: "已取消重置"
+ });
});
},
upLevel() {
@@ -366,6 +387,7 @@ export default {
type: "success"
});
this.couldUp = false;
+ this.getUserInfo();
} else {
this.$message({
message: "申请升级开发者失败",
@@ -458,9 +480,7 @@ export default {
}
.option_btn_gray_dis {
width: 124px;
- background-color: #e3e5ef;
border-radius: 8px;
- color: #0f2683;
}
.info_item {
width: 70%;
@@ -586,4 +606,23 @@ export default {
line-height: 24px;
height: 24px;
}
+.msg_btn {
+ width: 70px;
+ background-color: #495feb;
+ border-radius: 8px;
+ color: #f8f9fd;
+}
+.msg_btn:hover {
+ background-color: #596ffb;
+}
+.msg_btn_gray {
+ width: 70px;
+ background-color: #e3e5ef;
+ border-radius: 8px;
+ color: #0f2683;
+}
+.msg_btn_gray:hover {
+ background-color: #e8eaf4;
+ color: #0f2683;
+}
\ No newline at end of file
diff --git a/src/pages/workbench/workPlace.vue b/src/pages/workbench/workPlace.vue
index 8b46d6aa3a6d6c99078bb9a94ffd61c1474f0167..ef56fb1d06c1be4f80ee6d458107bfffef89d0ab 100644
--- a/src/pages/workbench/workPlace.vue
+++ b/src/pages/workbench/workPlace.vue
@@ -316,6 +316,7 @@ import helper from "@/services/helper.js";
import dashBoard from '../../components/e-charts/dashboard'
import { formatDateTime_date } from "@/utils/common";
import { mapGetters,mapState } from 'vuex'
+import {getCookie} from '../../services/cookie'
var echarts = require("echarts");
export default {
data() {
@@ -1162,7 +1163,7 @@ export default {
},
getUserData() {
this.person = this.userInfo.user_name;
- this.login_time = this.userInfo.last_login;
+ this.login_time = decodeURIComponent(getCookie('lastLogin'));
},
getoperatingdata() {
this.$http
diff --git a/src/pages/workbench/yygl/apply_app_detail.vue b/src/pages/workbench/yygl/apply_app_detail.vue
index 40ec38d037ca4757d9fcf638dee1eeaaa4bf4311..b7b509bee6c5fa19e72651b04b09fafe7f6c224a 100644
--- a/src/pages/workbench/yygl/apply_app_detail.vue
+++ b/src/pages/workbench/yygl/apply_app_detail.vue
@@ -24,8 +24,7 @@
@@ -171,12 +170,7 @@ export default {
],
},
],
- approval_arr3:[
- {
- title: "一级审批",
- result: "审批中",
- },
- ],
+ approval_arr3:[],
service_arr: ["基本信息", "申请审批信息"],
service_header_arr: {
id:"",
@@ -280,7 +274,7 @@ export default {
created() {
this.getServiceInfo();
this.getreadme();
- // this.getServiceBaseInfo();
+ this.getServiceBaseInfo();
this.getServiceapplyInfo();
},
mounted() {},
@@ -294,36 +288,57 @@ export default {
})
.catch(function(response) {});
},
- download(val){
- console.log(val);
- },
getServiceapplyInfo() {
this.$http
- .get("./static/applyappdetail.json")
+ .get(`/apaas/hubApi/market/approvalInfo/${this.$route.params.id}`)
+ .then((response) => {
+ let data = response.data.data;
+ if(!(data&&data.length)){
+ this.approval_arr3.push({
+ title: "一级审批",
+ result: "待审批"
+ })
+ return
+ }
+ data.forEach(e => {
+ this.approval_arr3.push({
+ title: e.level==1?"一级审批":'二级审批',
+ result: e.apply_type_name,
+ arr: [
+ {
+ title: "审批时间:",
+ info: e.created,
+ },
+ {
+ title: "审批单位:",
+ info: e.department_name,
+ },
+ {
+ title: "审批人:",
+ info: e.user_name,
+ },
+ {
+ title: "审批意见:",
+ info: e.comments,
+ }
+ ]
+ })
+ });
+ })
+ .catch(function(response) {});
+ },
+ getServiceBaseInfo() {
+ this.$http
+ .get("/apaas/hubApi/market/applyDetailInfo/"+this.$route.params.id)
.then((response) => {
let data = response.data.data;
- this.$set(this.servicead_arr[1], "info", data.appapplyinfo.scene);
- this.$set(this.servicead_arr[2], "info", data.appapplyinfo.filename);
- this.$set(this.servicead_arr[2], "url", data.appapplyinfo.fileurl);
- this.$set(this.servicead_arr[3], "info", data.appapplyinfo.size);
+ this.$set(this.servicead_arr[1], "info", data.scene);
+ this.$set(this.servicead_arr[2], "info", data.apply_file);
+ this.$set(this.servicead_arr[2], "url", data.apply_file);
+ this.$set(this.servicead_arr[3], "info", data.apply_type_name);
})
.catch(function(response) {});
},
- // getServiceBaseInfo() {
- // this.$http
- // .get("/apaas/hubApi/market/applyDetailInfo/"+this.$route.params.id)
- // .then((response) => {
- // let data = response.data.data;
- // this.$set(this.list_arr[0], "info", data.appbaseinfo.intorduce);
- // this.$set(this.list_arr[1], "info", data.appbaseinfo.action);
- // this.$set(this.list_arr[2], "info", data.scene);
- // this.$set(this.list_arr[4], "info", data.contact_person);
- // this.$set(this.list_arr[5], "info", data.contact_number);
-
- // this.appcode = data.appbaseinfo.appcode;
- // })
- // .catch(function(response) {});
- // },
deploy(val){
console.log(val);
},
diff --git a/src/pages/workbench/yygl/approval_app_detail.vue b/src/pages/workbench/yygl/approval_app_detail.vue
index cc2f5a464c2da61295d9b9c44fea871cebffaeb4..9658f4a0daf47bfb3dc5b8ad3bbaf45c269e011d 100644
--- a/src/pages/workbench/yygl/approval_app_detail.vue
+++ b/src/pages/workbench/yygl/approval_app_detail.vue
@@ -17,9 +17,9 @@
>{{item}}
-
-
-
+
+
+
@@ -39,7 +39,7 @@
提交
- 取消
+ 取消
@@ -57,6 +57,7 @@ import infoList from "@/components/infoList";
import tableUm from "@/components/table/table-um";
import processCard from "@/components/process-card";
import {getRole} from "@/utils/common"
+import { mapGetters,mapState } from 'vuex'
export default {
props: {},
components: {
@@ -79,7 +80,7 @@ export default {
option:[
{ required: true, message: '请输入意见', trigger: 'blur' },
{
- min: 10, message: '长度大于10个字符', trigger: 'blur'
+ min: 10, message: '长度应大于10个字符', trigger: 'blur'
}
]
},
@@ -91,37 +92,33 @@ export default {
},
{
label: "不通过",
- value: 0
+ value: -1
}
],
approval_arr:[
- [],
- [],
- [
- {
- title:'一级审批',
- result:'审批通过',
- arr:[
- {
- title:'审批时间:',
- info:'2020-02-28 15:23:45'
- },
- {
- title:'审批单位:',
- info:'某某某城管局'
- },
- {
- title:'审批人:',
- info:'张先生'
- },
- {
- title:'审批意见:',
- info:'同意'
- },
- ]
- },
- ],
- ],
+ // {
+ // title:'一级审批',
+ // result:'审批通过',
+ // arr:[
+ // {
+ // title:'审批时间:',
+ // info:'2020-02-28 15:23:45'
+ // },
+ // {
+ // title:'审批单位:',
+ // info:'某某某城管局'
+ // },
+ // {
+ // title:'审批人:',
+ // info:'张先生'
+ // },
+ // {
+ // title:'审批意见:',
+ // info:'同意'
+ // },
+ // ]
+ // },
+ ],
header_arr: [
{
prop: "zdmc",
@@ -157,15 +154,48 @@ export default {
service_header_arr: {
name: "",
- pic:"",
- first: [],
- second: [],
+ url:"",
+ first: [
+ {
+ "name": "应用类型",
+ "text": ""
+ },
+ {
+ "name": "业务领域",
+ "text": ""
+ },
+ {
+ "name": "审批状态",
+ "text": "",
+ "color":"#ef9433"
+ }
+ ],
+ second: [
+ {
+ "name": "在线区域",
+ "text": ""
+ },
+ {
+ "name": "申请类型",
+ "text": ""
+ },
+ {
+ "name":"所属组织",
+ "text":""
+ }
+ ],
},
service_arr: ["应用申请信息", "应用审批"],
now_service: 0,
servicead_arr: [
[],
[
+ {
+ title: "审批信息:",
+ prop: "title",
+ type: "solt",
+ solt_name: "sp_card"
+ },
{
title: "一级审批:",
prop: "title",
@@ -188,83 +218,143 @@ export default {
},
],
],
- list_arr: [
- {
- title: "申请单位:",
- info: ""
- },
- {
- title: "申请人:",
- info: ""
- },
- {
- title: "申请人联系电话:",
- info: ""
- },
- {
- title: "场景描述:",
- info: ""
- },
- {
- title: "申请文件:",
- info: "",
- url:"",
- type: "down"
- },
- {
- title: "申请时间:",
- info: ""
- }
- ]
+ list_arr: "",
};
},
watch: {},
- computed: {},
+ computed: {
+ ...mapGetters([
+ 'level',
+ ]),
+ ...mapState(['userInfo']),
+ },
created() {
- this.now_user = this.$store.state.role;
- getRole().then((data) => {
- this.now_user = data;
- console.log(data);
- this.$store.commit("rolefun", data);
+ console.log(this.level);
+ if(this.userInfo){
+ this.now_user = this.level
this.getheaderinfo();
this.getapplyinfo();
- });
+ this.get_approval_info();
+ }else{
+ this.getCurrentUser()
+ }
},
mounted() {},
methods: {
- download(val){
- console.log(val);
+ getCurrentUser() {
+ this.$api.user.getNowUser().then(({ data }) => {
+ if (data.success == 1) {
+ console.log("--- user info ---");
+ console.log(data.data);
+ console.log("--- user info ---");
+ this.$store.commit("userInfofun", data.data);
+ this.now_user = this.level
+ this.getheaderinfo();
+ this.getapplyinfo();
+ this.get_approval_info();
+ console.log(this.level);
+ } else {
+ console.log(data.errMsg);
+ }
+ });
+ },
+ get_approval_info(){
+ this.$http
+ .get(`/apaas/hubApi/market/approvalInfo/${this.$route.params.id}`)
+ .then((response) => {
+ let data = response.data.data;
+ if(!(data&&data.length)){
+ if(this.now_user==2){
+
+ }else{
+ this.servicead_arr[1].splice(0,1)
+ }
+ return
+ }
+ if(this.now_user==2){
+ if(data.length>=2){
+ this.servicead_arr[2].splice(1,1)
+ }
+ }else{
+ this.servicead_arr[1].splice(1,1)
+ }
+ data.forEach(e => {
+ this.approval_arr.push({
+ title: e.level==1?"一级审批":'二级审批',
+ result: e.apply_type_name,
+ arr: [
+ {
+ title: "审批时间:",
+ info: e.created.split('.')[0].replace('T',' '),
+ },
+ {
+ title: "审批单位:",
+ info: e.department_name,
+ },
+ {
+ title: "审批人:",
+ info: e.user_name,
+ },
+ {
+ title: "审批意见:",
+ info: e.comments,
+ }
+ ]
+ })
+ });
+ }).catch(function(response) {});
},
getapplyinfo(){
this.$http
- .get("./static/approvalappdetail.json")
+ .get("/apaas/hubApi/market/readme/"+this.$route.params.app_id)
.then((response) => {
let data = response.data.data;
- this.$set(this.list_arr[0], "info", data.appbaseinfo.company);
- this.$set(this.list_arr[1], "info", data.appbaseinfo.person);
- this.$set(this.list_arr[2], "info", data.appbaseinfo.phone);
- this.$set(this.list_arr[3], "info", data.appbaseinfo.desc);
- this.$set(this.list_arr[4], "info", data.appbaseinfo.filename);
- this.$set(this.list_arr[4], "url", data.appbaseinfo.fileurl);
- this.$set(this.list_arr[5], "info", data.appbaseinfo.time);
+ this.list_arr = data
})
.catch(function(response) {});
},
getheaderinfo(){
this.$http
- .get("./static/approvalappdetail.json")
+ .get("/apaas/hubApi/market/applyInfo/"+this.$route.params.id)
.then((response) => {
let data = response.data.data;
- this.$set(this.service_header_arr, "name", data.appInfo.name);
- this.$set(this.service_header_arr, "first", data.appInfo.first);
- this.$set(this.service_header_arr, "second", data.appInfo.second);
+ this.$set(this.service_header_arr, "name", data.app_name+' ');
+ this.$set(this.service_header_arr, "url", data.logo);
+ this.$set(this.service_header_arr.first[0], "text", data.type_name);
+ this.$set(this.service_header_arr.first[1], "text", data.ywly_name);
+ this.$set(this.service_header_arr.first[2], "text", data.apply_status);
+ this.$set(this.service_header_arr.first[2], "color", data.apply_status=="审批中"||data.apply_status=="待审批"?'#ef9433':data.apply_status=="审批通过"||data.apply_status=="已审批"?'#515fe7':'#e15260');
+ this.$set(this.service_header_arr.second[0], "text", data.online_state_name);
+ this.$set(this.service_header_arr.second[1], "text", data.apply_type_name);
+ this.$set(this.service_header_arr.second[2], "text", data.department_name);
})
.catch(function(response) {});
},
+ back_page(){
+ this.$router.back(-1)
+ },
+ post_result(){
+ var temp = {
+ "app_id":parseInt(this.$route.params.app_id), // 申请的应用的id
+ "apply_id":parseInt(this.$route.params.id), // 申请id
+ "status": this.form.result, // 是否通过,-1 不通过 1 通过
+ "comments":this.form.option // 审批意见
+ }
+ this.$http
+ .post("/apaas/hubApi/market/approval/"+this.$route.params.id,temp)
+ .then((response) => {
+ if(response.data.success){
+ this.$message.success('审批成功')
+ this.back_page()
+ }else{
+ this.$message.error(errMsg)
+ }
+ }).catch(function(response) {});
+ },
onSubmit(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
- alert('submit!');
+ this.post_result()
} else {
console.log('error submit!!');
return false;
diff --git a/src/request/api/general.js b/src/request/api/general.js
index a9c942ead990f4a34aec4c0209083657e9b4a228..648e059b37b23ddce329b48c7f8eeaa64c75a8ad 100644
--- a/src/request/api/general.js
+++ b/src/request/api/general.js
@@ -6,6 +6,9 @@ const general = {
logout(params) {
return axios.get(`/iam/api/logout?ReturnUrl=${encodeURIComponent(params.returnUrl)}`);
},
+ getNowMenu(params) {
+ return axios.get(`/apaas/backmgt/menu/user/menu?teamName=${params.teamName}`);
+ },
}
export default general;