Commit b97c7e82 authored by 冷冷's avatar 冷冷

💄 Updating the UI and style files.

parent 5f92671a
...@@ -25,7 +25,7 @@ export const tableOption = { ...@@ -25,7 +25,7 @@ export const tableOption = {
'editBtn': false, 'editBtn': false,
'delBtn': false, 'delBtn': false,
'addBtn': false, 'addBtn': false,
'dic': [], 'dicUrl': '/admin/dict/type/leave_status',
'column': [ 'column': [
{ {
label: 'ID', label: 'ID',
...@@ -51,11 +51,19 @@ export const tableOption = { ...@@ -51,11 +51,19 @@ export const tableOption = {
}, },
{ {
label: '备注', label: '备注',
prop: 'content' prop: 'content',
type:'textarea',
minRows:2,
row:true,
span:24
}, },
{ {
label: '状态', label: '状态',
prop: 'state' prop: 'state',
type: 'select',
dicData: 'leave_status',
search: true,
addVisdiplay: false
} }
] ]
} }
...@@ -35,7 +35,6 @@ export const tableOption = { ...@@ -35,7 +35,6 @@ export const tableOption = {
fixed: true, fixed: true,
label: '角色名称', label: '角色名称',
prop: 'roleName', prop: 'roleName',
search: true,
span: 24, span: 24,
rules: [{ rules: [{
required: true, required: true,
...@@ -52,7 +51,6 @@ export const tableOption = { ...@@ -52,7 +51,6 @@ export const tableOption = {
}, { }, {
label: '角色标识', label: '角色标识',
prop: 'roleCode', prop: 'roleCode',
search: true,
span: 24, span: 24,
rules: [{ rules: [{
required: true, required: true,
...@@ -70,21 +68,8 @@ export const tableOption = { ...@@ -70,21 +68,8 @@ export const tableOption = {
label: '所属部门', label: '所属部门',
prop: 'roleDeptId', prop: 'roleDeptId',
formsolt: true, formsolt: true,
search: true,
solt: true, solt: true,
span: 24, span: 24,
rules: [{
required: true,
message: '所属部门不能为空',
trigger: 'blur'
},
{
min: 3,
max: 20,
message: '长度在 3 到 20 个字符',
trigger: 'blur'
}
]
}, { }, {
width: 180, width: 180,
label: '角色描述', label: '角色描述',
...@@ -97,7 +82,6 @@ export const tableOption = { ...@@ -97,7 +82,6 @@ export const tableOption = {
width: 180, width: 180,
label: '创建时间', label: '创建时间',
prop: 'createTime', prop: 'createTime',
search: true,
more: true, more: true,
type: 'datetime', type: 'datetime',
format: 'yyyy-MM-dd HH:mm', format: 'yyyy-MM-dd HH:mm',
......
...@@ -40,7 +40,7 @@ export const tableOption = { ...@@ -40,7 +40,7 @@ export const tableOption = {
span: 24, span: 24,
rules: [{ rules: [{
required: true, required: true,
message: "请输入账户", message: "请输入用户名",
trigger: "blur" trigger: "blur"
}, },
{ {
...@@ -54,13 +54,10 @@ export const tableOption = { ...@@ -54,13 +54,10 @@ export const tableOption = {
label: '密码', label: '密码',
prop: 'password', prop: 'password',
type: 'password', type: 'password',
value: '',
hide: true, hide: true,
span: 24, span: 24,
rules: [{ rules: [
required: true,
message: "请输入密码",
trigger: "blur"
},
{ {
min: 6, min: 6,
max: 20, max: 20,
...@@ -71,7 +68,6 @@ export const tableOption = { ...@@ -71,7 +68,6 @@ export const tableOption = {
}, { }, {
label: '所属部门', label: '所属部门',
prop: 'deptId', prop: 'deptId',
search: true,
formsolt: true, formsolt: true,
solt: true, solt: true,
span: 24, span: 24,
...@@ -85,7 +81,6 @@ export const tableOption = { ...@@ -85,7 +81,6 @@ export const tableOption = {
prop: 'role', prop: 'role',
formsolt: true, formsolt: true,
solt: true, solt: true,
search: true,
span: 24, span: 24,
rules: [{ rules: [{
required: true, required: true,
...@@ -97,7 +92,6 @@ export const tableOption = { ...@@ -97,7 +92,6 @@ export const tableOption = {
prop: 'delFlag', prop: 'delFlag',
type: "select", type: "select",
solt: true, solt: true,
search: true,
span: 24, span: 24,
rules: [{ rules: [{
required: true, required: true,
...@@ -121,7 +115,6 @@ export const tableOption = { ...@@ -121,7 +115,6 @@ export const tableOption = {
type: 'datetime', type: 'datetime',
format: 'yyyy-MM-dd HH:mm', format: 'yyyy-MM-dd HH:mm',
valueFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss',
search: true,
more: true, more: true,
editDisabled: true, editDisabled: true,
addVisdiplay: false, addVisdiplay: false,
......
...@@ -2,8 +2,14 @@ ...@@ -2,8 +2,14 @@
<div class="login-container pull-height" <div class="login-container pull-height"
@keyup.enter.native="handleLogin"> @keyup.enter.native="handleLogin">
<div class="login-logo animated fadeIn"> <div class="login-logo animated fadeIn">
<img src="/svg/logo.svg" <el-dropdown @command="handleCommand">
alt=""> <span class="el-dropdown-link">
选择租户<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="2">pigx</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div> </div>
<div class="login-weaper"> <div class="login-weaper">
<div class="login-left animated fadeInLeft"> <div class="login-left animated fadeInLeft">
...@@ -80,13 +86,18 @@ export default { ...@@ -80,13 +86,18 @@ export default {
} }
} }
}, },
created () { }, created () {
},
mounted () { }, mounted () { },
computed: { computed: {
...mapGetters(["website"]) ...mapGetters(["website"])
}, },
props: [], props: [],
methods: {} methods: {
handleCommand(command) {
sessionStorage.setItem('tenantId',command)
}
}
}; };
</script> </script>
...@@ -123,8 +134,7 @@ export default { ...@@ -123,8 +134,7 @@ export default {
.login-logo { .login-logo {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; right: 0;
padding-top: 50px;
font-size: 24px; font-size: 24px;
color: #333; color: #333;
} }
......
...@@ -24,9 +24,12 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration ...@@ -24,9 +24,12 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration
axios.interceptors.request.use(config => { axios.interceptors.request.use(config => {
NProgress.start() // start progress bar NProgress.start() // start progress bar
if (store.getters.access_token) { if (store.getters.access_token) {
config.headers['TENANT_ID'] = '1' // 租户ID
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带token--['X-Token']为自定义key 请根据实际情况自行修改 config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带token--['X-Token']为自定义key 请根据实际情况自行修改
} }
if (sessionStorage.getItem('tenantId')){
config.headers['TENANT_ID'] = sessionStorage.getItem('tenantId') // 租户ID
}
return config return config
}, error => { }, error => {
console.log('err' + error) // for debug console.log('err' + error) // for debug
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</basic-container> </basic-container>
<el-dialog title="流程图" <el-dialog title="流程图"
:visible.sync="showPicDialog"> :visible.sync="showPicDialog">
<img :src="actPicUrl"> <img :src="actPicUrl" width="100%">
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
......
...@@ -44,16 +44,10 @@ ...@@ -44,16 +44,10 @@
:visible.sync="showTask"> :visible.sync="showTask">
<avue-form ref="form" v-model="obj" :option="formOption"> <avue-form ref="form" v-model="obj" :option="formOption">
<template slot-scope="scope" slot="menuForm"> <template slot-scope="scope" slot="menuForm">
<el-button type="primary" <el-button size="small"
icon="el-icon-check" v-for="flag in flagList" :key="flag"
size="small" @click="handleTask(scope.row,flag)"
@click="handleTask(scope.row,'1')" plain>{{flag}}</el-button>
plain>同意</el-button>
<el-button type="danger"
icon="el-icon-check"
size="small"
@click="handleTask(scope.row,'0')"
plain>驳回</el-button>
</template> </template>
</avue-form> </avue-form>
</el-dialog> </el-dialog>
...@@ -78,6 +72,7 @@ ...@@ -78,6 +72,7 @@
return { return {
actPicUrl:'', actPicUrl:'',
obj: {}, obj: {},
flagList:{},
showTask: false, showTask: false,
showComment: false, showComment: false,
showPicDialog: false, showPicDialog: false,
...@@ -126,12 +121,11 @@ ...@@ -126,12 +121,11 @@
audit:function(row, index) { audit:function(row, index) {
fetchDetail(row.taskId).then(response => { fetchDetail(row.taskId).then(response => {
this.obj = response.data.data this.obj = response.data.data
}) // 根据连线判断下次的流程
fetchComment(row.taskId).then(response => { this.flagList = this.obj.flagList
this.taskTableData = response.data.data this.showTask = true
}) })
this.obj = row this.obj = row
this.showTask = true
}, },
comment:function(row, index) { comment:function(row, index) {
fetchComment(row.taskId).then(response => { fetchComment(row.taskId).then(response => {
...@@ -159,7 +153,7 @@ ...@@ -159,7 +153,7 @@
.catch(function(err) { }) .catch(function(err) { })
}, },
handleTask: function(row, result) { handleTask: function(row, result) {
this.obj.result = result this.obj.taskFlag = result
doTask(this.obj).then(response =>{ doTask(this.obj).then(response =>{
this.$message({ this.$message({
showClose: true, showClose: true,
......
...@@ -217,6 +217,7 @@ export default { ...@@ -217,6 +217,7 @@ export default {
}, },
handleUpdate (row, index) { handleUpdate (row, index) {
this.$refs.crud.rowEdit(row, index); this.$refs.crud.rowEdit(row, index);
this.form.password = undefined
}, },
create (row, done, loading) { create (row, done, loading) {
addObj(this.form).then(() => { addObj(this.form).then(() => {
......
const url = 'http://192.168.0.20:9999' const url = 'http://localhost:9999'
module.exports = { module.exports = {
lintOnSave: true, lintOnSave: true,
productionSourceMap: false, productionSourceMap: false,
......
...@@ -1258,7 +1258,7 @@ ...@@ -1258,7 +1258,7 @@
babel-helper-vue-jsx-merge-props "^2.0.0" babel-helper-vue-jsx-merge-props "^2.0.0"
dayjs "^1.7.5" dayjs "^1.7.5"
deepmerge "^1.2.0" deepmerge "^1.2.0"
element-ui "^2.3.6" element-ui "^2.4.6"
normalize-wheel "^1.0.1" normalize-wheel "^1.0.1"
resize-observer-polyfill "^1.5.0" resize-observer-polyfill "^1.5.0"
throttle-debounce "^1.0.1" throttle-debounce "^1.0.1"
...@@ -3603,7 +3603,7 @@ elegant-spinner@^1.0.1: ...@@ -3603,7 +3603,7 @@ elegant-spinner@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
element-ui@^2.3.6, element-ui@^2.4.5, element-ui@^2.4.6: element-ui@^2.4.6:
version "2.4.7" version "2.4.7"
resolved "https://registry.yarnpkg.com/element-ui/-/element-ui-2.4.7.tgz#073b404222815c08ba2e68b39ec8e6ff7b7b13e0" resolved "https://registry.yarnpkg.com/element-ui/-/element-ui-2.4.7.tgz#073b404222815c08ba2e68b39ec8e6ff7b7b13e0"
dependencies: dependencies:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment