Merge remote-tracking branch 'origin/main'

main
Dayu 11 months ago
commit 04da24d86c
  1. 2
      src/api/smart/workpermit.js
  2. 9
      src/api/user.js
  3. 41
      src/components/scada-login/main.vue
  4. 5
      src/permission.js
  5. 14
      src/router/page/index.js
  6. 14
      src/router/views/index.js
  7. 21
      src/store/modules/user.js
  8. 3
      src/views/leger/equipmentledger.vue
  9. 57
      src/views/leger/equipmentledgerDetail.vue
  10. 2
      src/views/release/productioninformation.vue
  11. 1
      src/views/smart/operationticket.vue
  12. 28
      src/views/smart/operationticketDetail.vue
  13. 3
      src/views/smart/workorder.vue
  14. 21
      src/views/smart/workorderDetail.vue
  15. 1
      src/views/smart/workpermit.vue
  16. 29
      src/views/smart/workpermitDetail.vue
  17. 1
      src/views/wel/index.vue

@ -42,7 +42,7 @@ export const add = (row) => {
export const update = (row) => {
return request({
url: '/api/smart/workpermit/submit',
url: '/api/smart/workpermit/update',
method: 'post',
data: row
})

@ -18,6 +18,15 @@ export const loginByUsername = (tenantId, account, password, type, key, code) =>
}
});
export const loginByScada = (token) => request({
url: '/api/daf-auth/scada-token',
method: 'post',
params: {
token
}
});
export const loginBySocial = (tenantId, source, code, state) => request({
url: '/api/daf-auth/token',
method: 'post',

@ -0,0 +1,41 @@
<template>
<div></div>
</template>
<script>
import {mapGetters} from "vuex";
export default {
name: "scada-sso",
data() {
return {
loginForm: {
token: null
}
};
},
created() {
},
mounted() {
this.handleLogin();
},
computed: {
...mapGetters(["tagWel"])
},
props: [],
methods: {
handleLogin() {
let token = this.$route.query.SSOToken;
this.loginForm.token = token;
this.$store.dispatch("loginByScada", this.loginForm).then(() => {
this.$router.push({path: this.tagWel.value});
}).catch(() => {
this.$router.push({path: "/403"});
});
},
}
};
</script>
<style>
</style>

@ -7,7 +7,8 @@ import store from './store'
import {validatenull} from '@/util/validate'
import {getToken} from '@/util/auth'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import 'nprogress/nprogress.css'
import Cookies from "js-cookie"; // progress bar style
NProgress.configure({showSpinner: false});
const lockPage = store.getters.website.lockPage; //锁屏页
router.beforeEach((to, from, next) => {
@ -21,7 +22,7 @@ router.beforeEach((to, from, next) => {
next({path: '/'})
} else {
//如果用户信息为空则获取用户信息,获取用户信息失败,跳转到登录页
if (store.getters.token.length === 0) {
if (store.getters.token.length === 0 && !Cookies.get('scada-access-token')) {
store.dispatch('FedLogOut').then(() => {
next({path: '/login'})
})

@ -21,6 +21,18 @@ export default [{
isAuth: false
}
},
{
path: '/scada-login',
requiresAuth: false,
name: 'scada登录',
component: () =>
import( /* webpackChunkName: "page" */ '@/components/scada-login/main'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false,
}
},
{
path: '/404',
component: () =>
@ -77,4 +89,4 @@ export default [{
path: '*',
redirect: '/404'
}
]
]

@ -180,5 +180,19 @@ export default [{
import( /* webpackChunkName: "views" */ '@/views/smart/operationticketDetail')
}]
},
{
path: '/leger',
component: Layout,
redirect: '/leger/index',
children: [{
path: 'dynamicledgerDetail',
name: '动态台账详情',
meta: {
menu: false
},
component: () =>
import( /* webpackChunkName: "views" */ '@/views/leger/dynamicledgerDetail')
}]
},
]

@ -4,9 +4,10 @@ import {isURL, validatenull} from '@/util/validate'
import {deepClone} from '@/util/util'
import webiste from '@/config/website'
import {Message, Notification} from 'element-ui'
import {loginByUsername, loginBySocial, getUserInfo, getMenu, getTopMenu, logout, refreshToken, getButtons, getLicense} from '@/api/user'
import {loginByUsername, loginByScada, loginBySocial, getUserInfo, getMenu, getTopMenu, logout, refreshToken, getButtons, getLicense} from '@/api/user'
import vue from '../../main.js'
import website from "../../config/website";
import Cookies from "js-cookie";
function addPath(ele, first) {
@ -58,6 +59,22 @@ const user = {
})
})
},
loginByScada({commit}, userInfo) {
return new Promise((resolve, reject) => {
loginByScada(userInfo.token).then(res => {
const data = res.data.data;
var inFifteenMinutes = new Date(new Date().getTime() + 120 * 60 * 1000);
Cookies.set('scada-access-token', data.accessToken, { expires: inFifteenMinutes });
commit('SET_TOKEN', data.accessToken);
commit('SET_USER_INFO', data);
commit('DEL_ALL_TAG');
commit('CLEAR_LOCK');
resolve();
}).catch(error => {
reject(error);
})
})
},
//根据第三方信息登录
LoginBySocial({ commit }, userInfo) {
return new Promise((resolve) => {
@ -118,6 +135,7 @@ const user = {
LogOut({commit}) {
return new Promise((resolve, reject) => {
logout().then(() => {
Cookies.remove('scada-access-token');
commit('SET_TOKEN', '');
commit('SET_MENU', [])
commit('SET_MENU_ALL', []);
@ -134,6 +152,7 @@ const user = {
//注销session
FedLogOut({commit}) {
return new Promise(resolve => {
Cookies.remove('scada-access-token');
commit('SET_TOKEN', '');
commit('SET_MENU', []);
commit('SET_MENU_ALL', []);

@ -562,8 +562,7 @@ import {getList, getDetail, add, update, remove, reject, auditing} from "@/api/l
path: "/leger/equipmentledgerDetail",
query: {
frameMode:"search",
id: row.id,
checkstatus: row.checkStatus
id: row.id
},
});
},

@ -6,15 +6,7 @@
<span >
<el-col >
审核状态:
<avue-input v-model="form" placeholder="" class="frame_class1" style = "width: 100px"></avue-input>
<!-- <el-select v-model="checkStatusValue">-->
<!-- <el-option-->
<!-- v-for="item in optionCheckStatus"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<avue-input v-model="form" placeholder="" class="frame_class1" style = "width: 100px"></avue-input>
</el-col>
</span>
</div>
@ -141,20 +133,6 @@
}
};
return {
checkStatusValue: this.$route.query.checkstatus,
optionCheckStatus: [{
value: 1,
label: '审核中'
}, {
value: 2,
label: '已审核'
}, {
value: 3,
label: '未通过'
}, {
value: 4,
label: ' '
}],
frame_class: '',
type: {},
shouldShowButton:{},
@ -392,7 +370,6 @@
format: 'yyyy/MM/dd',
valueFormat: "yyyyMMdd",
span: 6,
maxlength: 20,
},
{
label: "供应商",
@ -699,7 +676,6 @@
this.addUpdateShowButton=false;
this.UpdateShowButton=true;
this.frame_class = 'frame_class1';
this.checkStatusValue = this.$route.query.checkstatus;
this.SearchDetail();
}else{
this.readonlyForm=false;
@ -707,20 +683,6 @@
this.UpdateShowButton=false;
this.addUpdateShowButton=true;
this.frame_class = null;
this.checkStatusValue = 4;
}
switch (this.$route.query.checkstatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
},
methods: {
@ -922,6 +884,19 @@
getDetail(this.$route.query.id).then(res => {
console.log(res);
this.tab1_form = res.data.data;
switch (this.tab1_form.checkStatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
});
},
auditing() {
@ -1085,4 +1060,8 @@
justify-content: flex-end; /* 将子元素推到容器的末端 */
}
.head-style{
background-color: #3366cc !important;
color: #FFFFFF !important;
}
</style>

@ -508,7 +508,7 @@
<style>
.head-style{
background-color: #1e9fff !important;
background-color: #3366cc !important;
color: #FFFFFF !important;
}
</style>

@ -651,7 +651,6 @@ import {getList, getDetail, add, update, remove, closeticket} from "@/api/smart/
frameMode:"search",
id: row.id,
operationTicketNo:row.operationTicketNo,
reviewStatus: row.reviewStatus
},
});
},

@ -634,19 +634,6 @@ export default {
this.frame_class = 'frame_class1';
this.SearchDetail();
}
switch (this.$route.query.reviewStatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
// if(this.$route.query.reviewStatus ===1){
// this.form = "";
// }else if(this.$route.query.reviewStatus ===2){
@ -842,6 +829,19 @@ export default {
getDetail(this.$route.query.id).then(res => {
console.log(res);
this.tab1_form = res.data.data;
switch (this.tab1_form.reviewStatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
});
},
auditing() {
@ -922,7 +922,7 @@ export default {
</script>
<style>
.head-style{
background-color: #1e9fff !important;
background-color: #3366cc !important;
color: #FFFFFF !important;
}
.frame_class1 input.el-input__inner {

@ -493,8 +493,7 @@
path: "/workorder/detail",
query: {
frameMode:"search",
id: row.id,
checkstatus: row.approvalStatus
id: row.id
},
});
},

@ -4,8 +4,9 @@
<el-row :span="24">
<div class="check_status_class">
<span>
<el-col>
{{ getOptionCheckStatusLabel($route.query.checkstatus) }}
<el-col >
审核状态:
<avue-input v-model="form" placeholder="" class="frame_class1" style = "width: 100px"></avue-input>
</el-col>
</span>
</div>
@ -58,7 +59,6 @@
value: 4,
label: ''
}],
checkStatusValue: this.$route.query.checkstatus,
item_form: {},
option: {
column: [{
@ -316,7 +316,6 @@
this.shouldShowButton = false;
this.addupdateShowButton = true;
this.frame_class = null;
this.checkStatusValue = this.$route.query.checkstatus;
this.searchDetail();
} else if (this.$route.query.frameMode == "search") {
this.tab1_option.column[1].disabled = false;
@ -326,7 +325,6 @@
this.addupdateShowButton = false;
this.frame_class = 'frame_class1';
this.searchDetail();
this.checkStatusValue = 4;
}
},
methods: {
@ -363,6 +361,19 @@
searchDetail() {
getDetail(this.$route.query.id).then(res => {
this.tab1_form = res.data.data;
switch (this.tab1_form.approvalStatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
});
},
submitForm() {

@ -435,7 +435,6 @@
query: {
frameMode:"search",
id: row.id,
checkstatus: row.checkStatus,
ticketCode:row.ticketCode
},
});

@ -547,20 +547,6 @@
create_date.display = false;
const ticketCode = this.findObject(this.optionParam.column, "ticketCode");
ticketCode.display = false;
switch (this.$route.query.checkstatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
},
methods: {
handleFormSubmit() {
@ -714,6 +700,19 @@
getDetail(this.$route.query.id).then(res => {
console.log(res);
this.tab1_form = res.data.data;
switch (this.tab1_form.checkStatus){
case 1:
this.form = "审核中";
break;
case 2:
this.form = "已审核";
break;
case 3:
this.form = "未通过";
break;
default:
this.form =" ";
}
});
},
closeTicket() {
@ -801,7 +800,7 @@
</script>
<style>
.head-style{
background-color: #1e9fff !important;
background-color: #3366cc !important;
color: #FFFFFF !important;
}

@ -37,6 +37,7 @@
&& !homePageData.manufacturerInfoAudit
&& !homePageData.warehouseAudit
&& !homePageData.workPermitAudit
&& !homePageData.materialAudit
&& !homePageData.workOperationTicketAudit
&& !homePageData.toolInventoryRecordsAudit
&& !homePageData.equipmentLedgerAudit">

Loading…
Cancel
Save