Compare commits

..

2 Commits

5 changed files with 44 additions and 29 deletions

View File

@ -8,7 +8,6 @@
<script> <script>
//import layout from './components/layout' //import layout from './components/layout'
import {getToken} from "./main";
export default { export default {
components: {}, components: {},
@ -16,7 +15,6 @@
return {} return {}
}, },
created() { created() {
getToken()
}, },
mounted() { mounted() {
let beforeUrl = sessionStorage.getItem('router-path') let beforeUrl = sessionStorage.getItem('router-path')

View File

@ -48,27 +48,6 @@ Vue.prototype.$deepCopy = function (obj) {
return JSON.parse(JSON.stringify(obj)) return JSON.parse(JSON.stringify(obj))
} }
export function getToken() {
// let item = localStorage.getItem("token");
// if (item != null) {
// return
// }
axios.post(
// "http://security-react.mytwins.top/auth/login",
// getBaseUrl()+"/auth/login",
"http://gateway.mytwins.top/auth/login",
// "http://localhost:8000/auth/login",
{
code: "string",
password: "926425",
username: "admin",
uuid: "string"
}
).then(res => {
console.log(res)
localStorage.setItem("token", res.data.data)
})
}
new Vue({ new Vue({
router, router,

View File

@ -2,6 +2,7 @@
<div style="text-align: center"> <div style="text-align: center">
<!-- <h4>先选择本次登录人员的身份再进入相应的系统 😅</h4>--> <!-- <h4>先选择本次登录人员的身份再进入相应的系统 😅</h4>-->
<h4>欢迎进入Spring Security 配套 Workflow工作流模块</h4> <h4>欢迎进入Spring Security 配套 Workflow工作流模块</h4>
<div><el-input v-model="username" /> <el-button @click="getToken">登录</el-button></div>
<div class="work-panel"> <div class="work-panel">
<!-- <div class="user">--> <!-- <div class="user">-->
<!-- <el-button type="primary" round size="small" @click="showRolePicker()" icon="el-icon-user">选择本次登录者</el-button>--> <!-- <el-button type="primary" round size="small" @click="showRolePicker()" icon="el-icon-user">选择本次登录者</el-button>-->
@ -41,12 +42,14 @@
<script> <script>
import Test from "@/components/common/Test"; import Test from "@/components/common/Test";
import axios from "axios";
export default { export default {
name: "Index", name: "Index",
components: {Test}, components: {Test},
data() { data() {
return { return {
username:null,
select: [], select: [],
roleData: [ roleData: [
{ {
@ -78,9 +81,29 @@ export default {
} }
}, },
methods: { methods: {
dengjie() {
console.log("==================================")
console.log(this.select) getToken() {
// let item = localStorage.getItem("token");
// if (item != null) {
// return
// }
axios.post(
// "http://security-react.mytwins.top/auth/login",
// getBaseUrl()+"/auth/login",
"http://gateway.mytwins.top/auth/login",
// "http://localhost:8000/auth/login",
{
code: "string",
password: "926425",
// username: "admin",
username: this.username,
uuid: "string"
}
).then(res => {
console.log(res)
localStorage.setItem("token", res.data.data)
})
}, },

View File

@ -13,8 +13,8 @@
<el-avatar size="large" :src="operation.userInfo.avatar"></el-avatar> <el-avatar size="large" :src="operation.userInfo.avatar"></el-avatar>
</div> </div>
<div style="margin-left: 10px;"> <div style="margin-left: 10px;">
<div style="color: #c0bebe">{{ operation.userInfo.name }}</div> <div style="color: #c0bebe">{{ operation.operationName }}</div>
<div style="font-size: 16px; font-weight: bold;">{{ operation.operationName }}</div> <div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
</div> </div>
</div> </div>
<template v-if="operation.operation === 'comment' || operation.operation === 'refuse'"> <template v-if="operation.operation === 'comment' || operation.operation === 'refuse'">
@ -110,21 +110,35 @@ export default {
let state = operation.state let state = operation.state
let type = operation.operation let type = operation.operation
if (state === 'create') {
this.$set(operation, "icon", "el-icon-check")
this.$set(operation, "color", "#0bbd87")
this.$set(operation,"remark",operation.userInfo.name)
}
if (state === 'agree') { if (state === 'agree') {
this.$set(operation, "icon", "el-icon-check") this.$set(operation, "icon", "el-icon-check")
this.$set(operation, "color", "#0bbd87") this.$set(operation, "color", "#0bbd87")
this.$set(operation,"remark",operation.userInfo.name + ' (已同意)')
} }
if (state === 'process') { if (state === 'process') {
this.$set(operation, "icon", "el-icon-loading") this.$set(operation, "icon", "el-icon-loading")
this.$set(operation, "color", "#f78f5f") this.$set(operation, "color", "#f78f5f")
this.$set(operation,"remark",operation.userInfo.name + ' (处理中)')
}
if (type === 'cc') {
this.$set(operation, "icon", "el-icon-s-promotion")
this.$set(operation, "color", "#3395f8")
this.$set(operation,"remark",operation.userInfo.name + ' (抄送成功)')
} }
if (state === 'comment') { if (state === 'comment') {
this.$set(operation, "icon", "el-icon-chat-dot-round") this.$set(operation, "icon", "el-icon-chat-dot-round")
this.$set(operation, "color", "#0bbd87") this.$set(operation, "color", "#0bbd87")
this.$set(operation,"remark",operation.userInfo.name + ' (添加了评论)')
} }
if (state === 'refuse' && type === 'comment') { if (state === 'refuse' && type === 'comment') {
this.$set(operation, "icon", "el-icon-chat-dot-round") this.$set(operation, "icon", "el-icon-chat-dot-round")
this.$set(operation, "color", "#f56c6c") this.$set(operation, "color", "#f56c6c")
this.$set(operation,"remark",operation.userInfo.name + ' (填写拒绝理由)')
} }
if (state === 'refuse' && type === 'opinion') { if (state === 'refuse' && type === 'opinion') {
this.$set(operation, "icon", "el-icon-close") this.$set(operation, "icon", "el-icon-close")

View File

@ -122,6 +122,7 @@ export default {
this.loadProcessInstance(row.processInstanceId) this.loadProcessInstance(row.processInstanceId)
this.selectProcessInstance = row this.selectProcessInstance = row
}, },
loadProcessInstance(processInstanceId) { loadProcessInstance(processInstanceId) {
let that = this; let that = this;
this.init(); this.init();
@ -137,7 +138,6 @@ export default {
}) })
}, },
init() { init() {
this.processInstanceData = { this.processInstanceData = {
userInfo: {}, userInfo: {},
@ -146,6 +146,7 @@ export default {
processList: [], processList: [],
operationList: [], operationList: [],
}; };
this.loading = true; this.loading = true;
this.$store.state.design = this.taskData; this.$store.state.design = this.taskData;
this.$store.state.runningList = []; this.$store.state.runningList = [];