Commit cbc955d4 authored by smallwei's avatar smallwei

Merge branch 'master' into leng_dev

parents abd8b7d5 efae39a5
<template>
<div class="login-container pull-height"
@keyup.enter.native="handleLogin">
<div class="login-logo animated fadeIn">
<el-select v-model="active"
@change="handleCommand"
placeholder="请选择租户,不选为默认"
size="mini">
<el-option label="租户1"
value="1">
</el-option>
<el-option label="租户2"
value="2">
</el-option>
</el-select>
</div>
<div class="login-container pull-height" @keyup.enter.native="handleLogin">
<div class="login-weaper">
<div class="login-left animated fadeInLeft">
<div class="login-info">
<h2 class="login-info-title">{{website.info.title}}</h2>
<ul class="login-info-list">
<li class="login-info-item"
v-for="(item,index) in website.info.list"
:key="index">
<i class="el-icon-check"></i>&nbsp;{{item}}
<li class="login-info-item" v-for="(item,index) in website.info.list" :key="index">
<i class="el-icon-check"></i>
&nbsp;{{item}}
</li>
</ul>
<el-button type="primary"
size="small"
class="login-index">首页</el-button>
<el-button type="primary" size="small" class="login-index">首页</el-button>
</div>
</div>
<div class="login-border animated fadeInRight">
<div class="login-border animated fadeInRight">
<div class="login-main">
<h4 class="login-title">登录 {{website.title}}
<h4 class="login-title">
登录 {{website.title}}
<el-select
class="login-select animated fadeIn"
v-model="active"
@change="handleCommand"
placeholder="请选择租户,不选为默认"
size="mini"
>
<el-option label="租户1" value="1"></el-option>
<el-option label="租户2" value="2"></el-option>
</el-select>
</h4>
<userLogin v-if="activeName==='user'"></userLogin>
<codeLogin v-else-if="activeName==='code'"></codeLogin>
<thirdLogin v-else-if="activeName==='third'"></thirdLogin>
</div>
<div class="login-menu">
<a href="#"
@click.stop="activeName='user'">账号密码</a>
<a href="#"
@click.stop="activeName='code'">手机号登录</a>
<a href="#"
@click.stop="activeName='third'">第三方登录</a>
<a href="#" @click.stop="activeName='user'">账号密码</a>
<a href="#" @click.stop="activeName='code'">手机号登录</a>
<a href="#" @click.stop="activeName='third'">第三方登录</a>
</div>
</div>
</div>
......@@ -56,9 +47,9 @@ import codeLogin from "./codelogin";
import thirdLogin from "./thirdlogin";
import topColor from "../index/top/top-color";
import color from "@/mixins/color";
import { setStore,getStore } from '@/util/store'
import { setStore, getStore } from "@/util/store";
import { mapGetters } from "vuex";
import { validatenull } from '@/util/validate'
import { validatenull } from "@/util/validate";
export default {
name: "login",
mixins: [color()],
......@@ -68,41 +59,41 @@ export default {
codeLogin,
thirdLogin
},
data () {
data() {
return {
active: '',
active: "",
activeName: "user"
};
},
watch: {
$route () {
const params = this.$route.query
this.socialForm.state = params.state
this.socialForm.code = params.code
$route() {
const params = this.$route.query;
this.socialForm.state = params.state;
this.socialForm.code = params.code;
if (!validatenull(this.socialForm.state)) {
const loading = this.$loading({
lock: true,
text: `登录中,请稍后。。。`,
spinner: 'el-icon-loading'
})
spinner: "el-icon-loading"
});
setTimeout(() => {
loading.close()
}, 2000)
this.handleSocialLogin()
loading.close();
}, 2000);
this.handleSocialLogin();
}
}
},
created () {
this.active = getStore({ name: 'tenantId' });
created() {
this.active = getStore({ name: "tenantId" });
},
mounted () { },
mounted() {},
computed: {
...mapGetters(["website"])
},
props: [],
methods: {
handleCommand (command) {
setStore({ name: 'tenantId', content: command})
handleCommand(command) {
setStore({ name: "tenantId", content: command });
}
}
};
......@@ -120,7 +111,7 @@ export default {
left: 0;
width: 100%;
height: 500px;
margin-top: -200px;
margin-top: -240px;
}
.login-container::before {
z-index: -1024;
......@@ -138,14 +129,6 @@ export default {
width: 50%;
position: relative;
}
.login-logo {
position: absolute;
top: 0;
left: 0;
padding-top: 50px;
font-size: 24px;
color: #333;
}
.login-info {
padding-left: 140px;
}
......@@ -175,12 +158,21 @@ export default {
color: #76838f;
}
.login-title {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 40px;
font-weight: 500;
font-size: 22px;
text-align: center;
letter-spacing: 4px;
}
.login-select {
margin-top: 8px;
width: 180px !important;
}
.login-menu {
width: 100%;
text-align: center;
......
......@@ -18,52 +18,59 @@
<template>
<div class="app-container pull-auto">
<basic-container>
<avue-crud ref="crud"
:page="page"
:data="tableData"
:table-loading="tableLoading"
:option="tableOption"
@on-load="getList"
@search-change="searchChange"
@refresh-change="refreshChange"
@row-del="rowDel">
<template slot-scope="scope"
slot="menuBtn">
<avue-crud
ref="crud"
:page="page"
:data="tableData"
:table-loading="tableLoading"
:option="tableOption"
@on-load="getList"
@search-change="searchChange"
@refresh-change="refreshChange"
@row-del="rowDel"
>
<template slot-scope="scope" slot="menuBtn">
<el-dropdown-item
divided
v-if="permissions.act_process_manage"
@click.native="handlePic(scope.row,scope.index)"
>流程图</el-dropdown-item>
<el-dropdown-item
divided
v-if="permissions.act_process_manage && scope.row.suspend"
@click.native="handleStatus(scope.row,'active')"
>激活</el-dropdown-item>
<el-dropdown-item divided
v-if="permissions.act_process_manage"
@click.native="handlePic(scope.row,scope.index)">流程图</el-dropdown-item>
<el-dropdown-item divided
v-if="permissions.act_process_manage && scope.row.suspend"
@click.native="handleStatus(scope.row,'active')">激活</el-dropdown-item>
<el-dropdown-item
divided
v-if="permissions.act_process_manage && !scope.row.suspend"
@click.native="handleStatus(scope.row,'suspend')"
>失效</el-dropdown-item>
<el-dropdown-item divided
v-if="permissions.act_process_manage && !scope.row.suspend"
@click.native="handleStatus(scope.row,'suspend')">失效</el-dropdown-item>
<el-dropdown-item divided
v-if="permissions.act_process_manage"
@click.native="handleDel(scope.row,'suspend')">删除</el-dropdown-item>
<el-dropdown-item
divided
v-if="permissions.act_process_manage"
@click.native="handleDel(scope.row,'suspend')"
>删除</el-dropdown-item>
</template>
</avue-crud>
</basic-container>
<el-dialog title="流程图"
:visible.sync="showPicDialog">
<img :src="actPicUrl" width="100%">
<el-dialog title="流程图" :visible.sync="showPicDialog">
<img :src="actPicUrl" width="100%" style="margin-left:-60px;">
</el-dialog>
</div>
</template>
<script>
import { fetchList, delObj, addObj, status } from '@/api/activiti/process'
import { tableOption } from '@/const/crud/activiti/process'
import { mapGetters } from 'vuex'
import { fetchList, delObj, addObj, status } from "@/api/activiti/process";
import { tableOption } from "@/const/crud/activiti/process";
import { mapGetters } from "vuex";
export default {
name: 'process',
data () {
name: "process",
data() {
return {
showPicDialog: false,
actPicUrl: '',
actPicUrl: "",
tableData: [],
page: {
total: 0, // 总页数
......@@ -72,85 +79,105 @@ export default {
},
tableLoading: false,
tableOption: tableOption
}
};
},
created () {
},
mounted: function () { },
created() {},
mounted: function() {},
computed: {
...mapGetters(['permissions'])
...mapGetters(["permissions"])
},
methods: {
getList (page,params) {
this.tableLoading = true
fetchList(Object.assign({
descs: 'create_time',
current: page.currentPage,
size: page.pageSize
}, params)).then(response => {
this.tableData = response.data.data.records
this.page.total = response.data.data.total
this.tableLoading = false
})
getList(page, params) {
this.tableLoading = true;
fetchList(
Object.assign(
{
descs: "create_time",
current: page.currentPage,
size: page.pageSize
},
params
)
).then(response => {
this.tableData = response.data.data.records;
this.page.total = response.data.data.total;
this.tableLoading = false;
});
},
handlePic (row, index) {
this.actPicUrl = `/act/process/resource/` + row.deploymentId + '/' + row.processonDefinitionId + "/image"
this.showPicDialog = true
handlePic(row, index) {
this.actPicUrl =
`/act/process/resource/` +
row.deploymentId +
"/" +
row.processonDefinitionId +
"/image";
this.showPicDialog = true;
},
handleStatus (row, type) {
var _this = this
this.$confirm('是否确认操作ID为"' + row.processonDefinitionId + '"的流程?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
return status(row.processonDefinitionId, type)
}).then(data => {
this.getList(this.page)
_this.$message({
showClose: true,
message: '操作成功',
type: 'success'
handleStatus(row, type) {
var _this = this;
this.$confirm(
'是否确认操作ID为"' + row.processonDefinitionId + '"的流程?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}
)
.then(function() {
return status(row.processonDefinitionId, type);
})
.then(data => {
this.getList(this.page);
_this.$message({
showClose: true,
message: "操作成功",
type: "success"
});
})
}).catch(function (err) { })
.catch(function(err) {});
},
handleDel (row, index) {
this.$refs.crud.rowDel(row, index)
handleDel(row, index) {
this.$refs.crud.rowDel(row, index);
},
rowDel: function (row, index) {
var _this = this
this.$confirm('是否确认删除ID为"' + row.deploymentId + '"的模型?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(function () {
return delObj(row.deploymentId)
rowDel: function(row, index) {
var _this = this;
this.$confirm(
'是否确认删除ID为"' + row.deploymentId + '"的模型?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}
)
.then(function() {
return delObj(row.deploymentId);
})
.then(data => {
this.getList(this.page)
this.getList(this.page);
_this.$message({
showClose: true,
message: '删除成功',
type: 'success'
})
message: "删除成功",
type: "success"
});
})
.catch(function (err) { })
.catch(function(err) {});
},
/**
* 搜索回调
*/
searchChange (form) {
this.getList(this.page,form)
searchChange(form) {
this.getList(this.page, form);
},
/**
* 刷新回调
*/
refreshChange () {
this.getList(this.page)
refreshChange() {
this.getList(this.page);
}
}
}
};
</script>
<style lang="scss" scoped>
......
const url = 'http://localhost:9999'
const url = 'http://zn.huaxiadaowei.com'
module.exports = {
lintOnSave: true,
productionSourceMap: false,
chainWebpack: (config) => {
// 忽略的打包文件
config.externals({
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'element-ui': 'ELEMENT',
})
},
transpileDependencies: ['avue-plugin-transfer', 'avue-plugin-ueditor'],
// 配置转发代理
devServer: {
proxy: {
'/auth': {
target: url,
ws: true,
pathRewrite: {
'^/auth': '/auth'
}
},
'/admin': {
target: url,
ws: true,
pathRewrite: {
'^/admin': '/admin'
}
},
'/code': {
target: url,
ws: true,
pathRewrite: {
'^/code': '/code'
}
},
'/gen': {
target: url,
ws: true,
pathRewrite: {
'^/gen': '/gen'
}
},
'/daemon': {
target: url,
ws: true,
pathRewrite: {
'^/daemon': '/daemon'
}
},
'/tx': {
target: url,
ws: true,
pathRewrite: {
'^/tx': '/tx'
}
},
'/act': {
target: url,
ws: true,
pathRewrite: {
'^/act': '/act'
}
},
lintOnSave: true,
productionSourceMap: false,
chainWebpack: config => {
// 忽略的打包文件
config.externals({
vue: 'Vue',
'vue-router': 'VueRouter',
vuex: 'Vuex',
axios: 'axios',
'element-ui': 'ELEMENT'
})
},
transpileDependencies: ['avue-plugin-transfer', 'avue-plugin-ueditor'],
// 配置转发代理
devServer: {
proxy: {
'/auth': {
target: url,
ws: true,
pathRewrite: {
'^/auth': '/auth'
}
},
'/admin': {
target: url,
ws: true,
pathRewrite: {
'^/admin': '/admin'
}
},
'/code': {
target: url,
ws: true,
pathRewrite: {
'^/code': '/code'
}
},
'/gen': {
target: url,
ws: true,
pathRewrite: {
'^/gen': '/gen'
}
},
'/daemon': {
target: url,
ws: true,
pathRewrite: {
'^/daemon': '/daemon'
}
},
'/tx': {
target: url,
ws: true,
pathRewrite: {
'^/tx': '/tx'
}
},
'/act': {
target: url,
ws: true,
pathRewrite: {
'^/act': '/act'
}
}
}
}
}
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