Commit cbc955d4 authored by smallwei's avatar smallwei

Merge branch 'master' into leng_dev

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