流程清单代码

This commit is contained in:
446052889@qq.com 2022-08-11 22:20:29 +08:00
parent 2ed7faaf25
commit f509d4b049
25 changed files with 11585 additions and 0 deletions

View File

@ -0,0 +1,25 @@
.DS_Store
node_modules
# awsDevParams.js
/dist
/lib
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.history/*

View File

@ -0,0 +1,25 @@
module.exports = {
AWSPortalUrl: "http://localhost:8088/portal/",//aws平台启动地址用于开发时获取平台静态资源请求数据等注意最后的/,不要删)
AWSReleasePath: "/Users/sunlh/idea_workspace_aws6/release/", /*C:/work/workspace/release/*/ //aws的平台路径暂时写绝对路径用于build生成的主文件位置注意最后的/,不要删)
moduleTemplateInAWS: "apps/install/com.actionsoft.apps.coe.pal.processlist/template/page/main.htm", /*apps/install/_bpm.platform/template/page/console.m.dw.design.vue.htm*/ //build后生成到平台的模板位置及名称
outputDir: "apps/install/com.actionsoft.apps.coe.pal.processlist/web/com.actionsoft.apps.coe.pal.processlist/main", /*webserver/webapps/portal/apps/_bpm.platform/dw/designer/main*/ //build后js或css生成到平台的位置
publicPath: "../apps/com.actionsoft.apps.coe.pal.processlist/main", /*../apps/_bpm.platform/dw/designer/main*/ //build到平台后生成到模板中引入js文件的相对平台的位置
AWSJSAndCSSImport: [ //引入平台的js或css在portal目录开始,开发或build通用
/*
// 示例
{
type: "js",
path: "commons/js/util/Base64.js"
},
{
type: "css",
path: "commons/css/font/iconfont.css"
},
*/
],
devUserInfo: {//开发时通过用户名及密码获取sessionId前提必须需要安装并启动appcom.actionsoft.apps.getsession.app
userid: "admin", //具有后台管理的用户名
pwd: "admin", //密码
deviceType: "pc",
}
}

View File

@ -0,0 +1,24 @@
# dataviewsetting
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@ -0,0 +1,10 @@
module.exports = {
presets: [
[
'@vue/app',
{
useBuiltIns: 'entry'
}
]
]
}

View File

@ -0,0 +1,51 @@
{
"name": "com.actionsoft.apps.coe.pal.processlist",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"awsui-vue": "^1.0.0",
"axios": "^0.21.0",
"babel-polyfill": "^6.26.0",
"core-js": "^3.8.0",
"element-ui": "^2.14.1",
"vue": "^2.6.12",
"vue-router": "^3.4.9",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-plugin-router": "~4.4.0",
"@vue/cli-plugin-vuex": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.14.0",
"eslint-plugin-vue": "^7.1.0",
"vue-template-compiler": "^2.6.12"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<%= htmlWebpackPlugin.options.AWSJSAndCSSImport %>
<!--
其它的js或css引用方式示例<%= htmlWebpackPlugin.options.awsjsandcsspath%>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.awsjsandcsspath%>apps/_bpm.platform/css/model/console.m.dw.design.css"/>
-->
<script>
const settingParam = <%= htmlWebpackPlugin.options.settingParam %>;
const axiosBaseUrl = "<%= htmlWebpackPlugin.options.axiosBaseUrl %>";
const production = <%= htmlWebpackPlugin.options.isproduction %>;
</script>
<% if(!htmlWebpackPlugin.options.isproduction) {%>
<script>
const devUserInfo = <%= JSON.stringify(htmlWebpackPlugin.options.devUserInfo) %>;
</script>
<% }%>
<script>
<%if (process.env.NODE_ENV === "development") {%>
var wsId = '4645328c-d20e-4a3c-bcb0-4518c9abdd93';
var levelSelect = [{
value: 1,
label: '一级流程'
}, {
value: 2,
label: '二级流程'
}, {
value: 3,
label: '三级流程'
}, {
value: 4,
label: '四级流程'
}, {
value: 5,
label: '五级流程'
}];
var defaultSelectVal = [1,2,3];
var wHref = "http://localhost:8088/portal/r/w";
<%}else {%>
var wsId = "<#wsId>";
var levelSelect = <#levelSelect>;
var defaultSelectVal = <#defaultSelectVal>;
var wHref = "./w";
<%}%>
</script>
</head>
<body style="margin:0;">
<div id="app"></div>
</body>
</html>

View File

@ -0,0 +1,15 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
</style>

View File

@ -0,0 +1,75 @@
// 通用js方法文件
/**
* 打开一个新的窗口,post请求
* @param id id 唯一值body中创建请求表单的id
* @param sid sessionId
* @param cmd 请求cmd
* @param params 参数列表{param1 : value1,param2 : value2}
* @param target 不给定则默认_blank新窗口
*/
const newPageWin = function (id, sid, cmd, params, target) {
if (!params) {
params = {};
}
params.cmd = cmd;
params.sid = sid;
newWin(id, wHref, params, target);
}
/**
* 打开一个新的窗口,post请求
* @param id 唯一值body中创建请求表单的id
* @param url 例如 ./w./jd
* @param params 这个{param1 : value1,param2 : value2}
* @param target 打开窗口方式 _blank_self
*/
const newWin = function (id, url, params, target) {
// 防止反复添加
var dom = document.getElementById(id);
if(dom) {
document.body.removeChild(dom);
}
var temp_form = document.createElement("form");
temp_form.action = url;
temp_form.target = target == undefined ? "_blank" : target;
temp_form.method = "get";
temp_form.style.display = "none";
for (var x in params) {
var opt = document.createElement("textarea");
opt.name = x;
opt.value = params[x];
temp_form.appendChild(opt);
}
temp_form.setAttribute('id', id);
document.body.appendChild(temp_form);
temp_form.submit();
}
// 打开流程模型文件
const openDesigner = function(teamId, id, sid) {
newPageWin('palDesigner', sid, 'com.actionsoft.apps.coe.pal_pl_repository_designer', {uuid: id, teamId: teamId});
}
// 退出pal
const logout = function(sid) {
window.location.replace("./w?sid=" + sid + "&cmd=com.actionsoft.apps.coe.pal_user_logout");
}
// 类jquery方法
const closest = function(node, targetNodeName) {// 类似jquery closest函数获得匹配选择器的第一个祖先元素从当前元素开始沿 DOM 树向上
let curr = node;
while (curr.nodeName != targetNodeName && curr.nodeName != 'BODY') {
curr = curr.parentNode;
}
if (curr.nodeName == targetNodeName) {
return curr;
} else {
return null;
}
}
export {newWin, newPageWin, openDesigner, logout, closest}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -0,0 +1,109 @@
import axios from 'axios'
import store from '../store'
// 创建axios请求实例
// const request = axios.create({
// baseURL: axiosBaseUrl,
// timeout: 1000,
// headers: {
// 'Content-Type': 'application/json; charset=utf-8'
// }
// })
axios.defaults.baseURL = typeof axiosBaseUrl == "undefined" ? "" : axiosBaseUrl; // 设置跨域代理接口统一的前置地址
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8';
// 添加请求拦截器
axios.interceptors.request.use(function (request) {
// 在发送请求之前做些什么
if(request.method == 'post'){
request.params = {};
}
return request
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error)
})
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
// 只返回数据
return response.data
}, function (error) {
if(error.response == null){
throw error;
}
const status = error.response.status
if (status >= 500) {
alert('服务繁忙请稍后再试')
} else if (status >= 400) {
alert(error.response.data.message)
}
// 对响应错误做点什么
console.dir(error)
return Promise.reject(error)
})
function _toChangeData(data){
let dataArray = [];
for(let key in data){
dataArray.push(encodeURIComponent(key)+"="+encodeURIComponent(data[key]));
}
return dataArray.join("&");
}
//可能需要更改,暂时用不到
const get = (params) => {
return axios({
method: "get",
url: params.url,
params: params.params
});
}
const post = (params) => {
let postConfig = {
method: "post",
url: params.url,
data: params.data
}
//从vuex中获取sessionId
postConfig.data.sid = store.state.sessionId;
postConfig.data = _toChangeData(postConfig.data);
return axios(postConfig);
}
const aslp = (params) => {
// {
// portalUrl : "",
// authentication : store.state.sessionId,
// sourceAppId : "appid",
// aslp : "aslp://XXXX",
// params :{
// aa:1,
// bb:2
// }
// }
let datas = {
authentication : store.state.sessionId,
sourceAppId : params.sourceAppId,
aslp : params.aslp,
}
Object.assign(datas,params.params)
let postConfig = {
method: "post",
url: params.portalUrl,
params: datas
}
postConfig.data = _toChangeData(postConfig.data);
return axios(postConfig);
}
// const delete = (url, data) => request.delete(url, data)
// const head = (url, data) => request.head(url, data)
// const options = (url, data) => request.options(url, data)
// const put = (url, data) => request.put(url, data)
// const patch = (url, data) => request.patch(url, data)
export default {
get,
post,
aslp
}

View File

@ -0,0 +1,22 @@
import Babel from 'babel-polyfill';
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// awsui-vue lib已包含element-ui
import Awsui from '../lib/awsui-vue.umd.min'
import '../lib/awsui-vue.css'
import '../static/common/common.css';
import '../static/common/theme1.css';// 主题颜色配置
import './assets/iconfont/iconfont.css';// 图标
Vue.config.productionTip = false
Vue.use(Babel)
Vue.use(Awsui)
new Vue({
router,
store,
render: h => {
return h(App);
},
}).$mount('#app')

View File

@ -0,0 +1,52 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import store from '../store'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'ProcesslistHome',
component: () => import('../views/ProcesslistHome')
},
{
path: '/devGetSession', //开发时获取session作用
name: 'devGetSession',
component: () => import('../views/DevGetSession.vue')
}
]
const router = new VueRouter({
routes
})
/**
*
* to 表示将要跳转到的组件 (目标组件)
* console.log(from); //(源组件)
* next();
* next 是一个函数
* next() 进入下一个组件的钩子函数
* next(false) 阻止跳转 中断导航
* next("/login") 进入指定的组件的钩子函数
*/
// 路由守卫
router.beforeEach((to, from, next) => {
if (production === false && store.state.sessionId == null && to.path != "/devGetSession") {
//进入一个路由获取session获取session后再进入主入口
next("/devGetSession");
} else {
//跳转前设置title
//window.document.title = to.meta.title;
next();
}
//to.matched.some(res=>{res.meta.isLogin}) 能够获取路由配置的参数
});
//跳转后设置scroll为原点
router.afterEach((to, from, next) => {
window.scrollTo(0, 0);
});
export default router

View File

@ -0,0 +1,21 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
sessionId: settingParam.sessionId
},
mutations: {
edit(state, data) {
for (let p in data) {
state[p] = data[p];
}
}
},
actions: {
},
modules: {
}
})

View File

@ -0,0 +1,41 @@
<!-- 获取session方法不可删除 -->
<template>
<div class="devGetSession">
正在获取session
</div>
</template>
<script>
import router from "../router/index";
import awsuiAxios from "../awsuiAxios/index";
import store from "../store/index";
awsuiAxios
.post({
url: "jd",
data: {
userid: devUserInfo.userid,
pwd: devUserInfo.pwd,
lang: "cn",
cmd: "com.actionsoft.apps.getsession.get",
deviceType: "pc",
},
})
.then(function (r) {
// let r = response.data;
if (r.result == "error") {
//$.simpleAlert(r.msg, "error");
alert("获取session错误" + r.msg);
} else {
store.commit("edit", { sessionId: r.data.sid });
router.replace("/");
}
});
export default {
data() {
return {
dwList: [], //dw
};
},
methods: {},
mounted() {},
};
</script>

View File

@ -0,0 +1,534 @@
<template>
<awsui-layout>
<awsui-header :height=headerHeight id="header" style="margin-top: 10px;">
<el-row :style="{'line-height': headerHeight}">
<el-col :span="24">
<div class="head-title" style="float:left;width: 150px;">
<div style="padding-left:20px;text-align: left;vertical-align: middle;display: table-cell;width: 100%;height: 36px;">
共有
<span style="color:red;">{{totalCount}}</span>
支流程
</div>
</div>
<div class="head-title" style="float:left;width:200px;">
<awsui-select id="levelSelect" v-model="levelValue" collapse-tags placeholder="请选择流程层级" :options="levelOptions" multiple @change="searchProcessList(false)"></awsui-select>
</div>
<div class="head-title" style="float:right;width: 240px;">
<awsui-button class="button-general-color button_fixed_width" type="primary" @click="exportProcessList">导出</awsui-button>
<el-tooltip class="item" effect="dark" content="重置筛选条件" placement="bottom-end" :hide-after="1000">
<awsui-button class="button_fixed_width" @click="resetCondition">重置</awsui-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="自定义表项" placement="bottom-end" :hide-after="1000">
<i class="el-icon-circle-plus custom_table_dlg_icon" @click="customTableDlg = true"></i>
</el-tooltip>
</div>
<div class="head-title" style="float:right;width:220px;padding-right: 20px;">
<awsui-input v-model="searchInput" size="large" prefixIcon="&#xe6e9;" placeholder="请输入流程名称进行搜索" clearable @input="searchProcessList(false)"></awsui-input>
</div>
</el-col>
</el-row>
</awsui-header>
<awsui-main style="padding-right: 0;padding-bottom: 0;" id="processlistMain">
<el-table
:data="tableData"
style="width: 100%"
:height="tableHeight"
size="medium"
@filter-change="filterTableData"
ref="table">
<!--无数据时表格显示内容设置为空后期可改为具体图标文字-->
<template slot="empty">
<div v-if="dataLoaded" style="text-align: center;">
<span><i class="iconfont icon-wushuju" style="color: #C2C2C2;font-size: 60px;"></i></span>
<div class="text-general-color" style="height: 20px; line-height: 20px;">没有查询到结果</div>
</div>
<div v-else>
<span>正在查询</span>
</div>
</template>
<template v-for="col in tableHeaderData">
<el-table-column v-if="isShowColumn('selectType', col.dataType)"
:prop="col.prop"
:label="col.label"
:width="col.width"
:min-width="col.minWidth"
:filters="col.filters"
filter-placement="right-start"
column-key="type"
:key="col.key"
:show-overflow-tooltip="col.showOverflow" class="el-table-column-row">
</el-table-column>
<el-table-column v-if="isShowColumn('selectStatus', col.dataType)"
:prop="col.prop"
:label="col.label"
:width="col.width"
:min-width="col.minWidth"
:filters="col.filters"
filter-placement="right-start"
column-key="status"
:key="col.key"
:show-overflow-tooltip="col.showOverflow" class="el-table-column-row">
</el-table-column>
<el-table-column v-if="isShowColumn('default', col.dataType)"
:prop="col.prop"
:label="col.label"
:width="col.width"
:min-width="col.minWidth"
:key="col.key"
:show-overflow-tooltip="col.showOverflow" class="el-table-column-row">
</el-table-column>
<!-- 流程名称单独处理 -->
<el-table-column v-if="isShowColumn('name', col.dataType)"
:prop="col.prop"
:label="col.label"
:width="col.width"
:min-width="col.minWidth"
:key="col.key"
:show-overflow-tooltip="col.showOverflow" class="el-table-column-row">
<template slot-scope="scope">
<p class="processlist-title" style="cursor: pointer;" @click="openProcessDesignerPage(scope.row)">{{scope.row.name}}<span class="processlist-title-version"> (v{{scope.row.version}})</span></p>
</template>
</el-table-column>
</template>
</el-table>
<div v-if="currentPage > 0" style="height:25px;line-height:25px;vertical-align: middle">
<span v-if="currentPage < Math.ceil(totalCount / pageStep)" class="btn-more-data" @click="loadData">点击加载更多</span>
<span v-else >已经到底啦</span>
</div>
</awsui-main>
<awsui-sidebar
id="customTableDlg"
ref="customTableDlg"
title="自定义表项"
:visible.sync="customTableDlg"
size="30%"
:before-close="handleClose"
@opened="initMoreAttr">
<div slot="title">
<div style="display: inline-block;width: 50%;text-align: left;height: 30px;line-height: 30px;vertical-align: middle;">
<span>自定义表项</span>
</div>
<div style="display: inline-block;width: 50%;text-align: right;height: 30px;line-height: 30px;">
<span style="cursor: pointer;color: #4E7FF9;margin-right: 10px;" @click="initTableColumnm">重置</span>
</div>
</div>
<div style="border-top: 1px solid #e9e9e9;padding: 0px;">
<div id="customTableDlgHeight" style="overflow-y: auto;">
<div id="customTabledlgList">
<p class="draggable-title">已选</p>
<draggable class="list-group" :list="customTableCheckedData" group="people" @drop="draggableDrop">
<div class="list-group-item custom-table-dlg-li" v-for="(element) in customTableCheckedData" :key="element.id">
<span class="custom-table-dlg-li-item"><span class="custom-table-dlg-li-item">{{ element.name }}<span class="text-second-color" style="font-size: 12px;"> {{element.id}}</span></span></span>
<i class="iconfont icon-yidongshu custom-table-dlg-li-item-icon icon-display"></i>
</div>
</draggable>
</div>
<div>
<p class="draggable-title" style="margin-top: 20px;">可选</p>
<draggable class="list-group" :list="customTableUncheckedData" group="people" @drop="draggableDrop">
<div class="list-group-item custom-table-dlg-li" v-for="(element) in customTableUncheckedData" :key="element.id">
<span class="custom-table-dlg-li-item"><span class="custom-table-dlg-li-item">{{ element.name }}<span class="text-second-color" style="font-size: 12px;"> {{element.id}}</span></span></span>
<i class="iconfont icon-yidongshu custom-table-dlg-li-item-icon icon-display"></i>
</div>
</draggable>
</div>
</div>
<div class="custom-table-dlg-footer">
<div id="drawerFooter">
<awsui-button class="button-general-color button_fixed_width" type="primary" @click="saveTableColumnConfig()">保存</awsui-button>
<awsui-button class="button_fixed_width" @click="closeDlg">取消</awsui-button>
</div>
</div>
</div>
</awsui-sidebar>
<iframe style="display: none" id='downloadIframe' ></iframe>
</awsui-layout>
</template>
<script>
import draggable from "vuedraggable";
import awsuiAxios from "../awsuiAxios";
import {openDesigner} from "../api/commonFun";
let levelOptions = levelSelect;
let levelValue = defaultSelectVal;
//
let tempMoreAttrCheckedConfig = [];
let tempMoreAttrUnCheckedConfig = [];
let tempTableFilterObj = {};
export default {
name: "ProcesslistHome",
components: {
draggable
},
data() {
return {
customTableDlg : false,
headerHeight : '30px',
tableHeight : (document.documentElement.clientHeight - 66 - 20) + 'px',
tableHeaderData : [],
searchInput : '',
levelOptions: levelOptions,
levelValue: levelValue,
tableData: [],
mouseDraggable: false,
//
totalCount : '?',
currentPage: 0,
pageStep: 0,
customTableCheckedData: [],
customTableUncheckedData: [],
dataLoaded: false,
serialNumber: 0 //
}
},
methods : {
draggableDrop(ev) {
ev.stopPropagation();
ev.preventDefault();
ev.dataTransfer = ev.originalEvent.dataTransfer;
},
resize() {// window.resize
const that = this
let resizeTimer = null;
window.onresize = () => {
return (() => {
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(function(){
that.tableHeight = (document.documentElement.clientHeight - 66 - 20) + 'px';
that.searchProcessList(false);
that.initDlgBodyHeight();
} , 400);
})()
}
},
handleClose(done) {
const that = this;
that.customTableCheckedData = JSON.parse(JSON.stringify(tempMoreAttrCheckedConfig));
that.customTableUncheckedData = JSON.parse(JSON.stringify(tempMoreAttrUnCheckedConfig));
done();
},
closeDlg() {
this.handleClose(function(){});
this.customTableDlg = false;
},
scorllBottomEvent() {
const that = this;
let dom = document.querySelector(".el-table__body-wrapper");
dom.addEventListener("scroll", function() {
const scrollDistance =dom.scrollHeight - dom.scrollTop - dom.clientHeight;
if(scrollDistance <=0){//0
}
})
},
getSearchCondition(params) {//
params.data.searchInput = this.searchInput;
params.data.levelValue = this.levelValue.join(',');
params.data.tableFilter = JSON.stringify(tempTableFilterObj);
return params;
},
initPageCount(updateTableColumn) {//
const that = this;
that.dataLoaded = false;
let params = {
url:'jd',
data:{
cmd: 'com.actionsoft.apps.coe.pal.processlist_header_query',
wsId: wsId
}
};
params = this.getSearchCondition(params);
awsuiAxios.post(params).then(function (ro) {//
if (ro.result == 'ok') {
let roData = ro.data;
that.totalCount = roData.totalCount;
that.customTableCheckedData = roData.customTableCheckedData;
that.customTableUncheckedData = roData.customTableUncheckedData;
//
tempMoreAttrCheckedConfig = JSON.parse(JSON.stringify(roData.customTableCheckedData));
tempMoreAttrUnCheckedConfig = JSON.parse(JSON.stringify(roData.customTableUncheckedData));
//
let tempHeadData = JSON.parse(JSON.stringify(roData.customTableCheckedData));
//
let dom = document.querySelector(".el-table__body-wrapper");
let tableScreenWidth = dom.offsetWidth;
//
let dataHeaderWidth = 0;//
let dataHeaderSize = tempHeadData.length;//
for (let i = 0; i < tempHeadData.length; i++) {
dataHeaderWidth += parseInt(tempHeadData[i].width);
}
if (dataHeaderWidth < tableScreenWidth) {
//
let blankWidth = tableScreenWidth - dataHeaderWidth;//
let addWidth = blankWidth / dataHeaderSize;//
if (blankWidth > 0 && addWidth > 0) {
for (let i = 0; i < tempHeadData.length; i++) {
tempHeadData[i].width = parseInt(tempHeadData[i].width) + addWidth + "";//
}
}
}
for (let i = 0; i < tempHeadData.length; i++) {
if (updateTableColumn) {
tempHeadData[i].key = Math.random();
} else {
tempHeadData[i].key = that.tableHeaderData[i].key;
}
}
that.tableHeaderData = tempHeadData;
// that.tableHeaderData = JSON.parse(JSON.stringify(roData.customTableCheckedData));
//
that.currentPage = 0;
that.serialNumber = 0;
that.pageStep = Math.ceil(parseInt(that.tableHeight)/45) + 5;
that.loadData();
} else {
// alert('');
// debugger;
}
}).catch(error=>{
console.log(error);
})
},
loadData() {//
const that = this;
if(that.currentPage < Math.ceil(that.totalCount / that.pageStep)){//
let params = {
url:'jd',
data:{
}
};
params.data.wsId = wsId;
params.data.currentPage = that.currentPage;
params.data.pageStep = that.pageStep;
params.data.tableHead = JSON.stringify(that.tableHeaderData);
params.data.cmd = 'com.actionsoft.apps.coe.pal.processlist_data_query';
params = this.getSearchCondition(params);
awsuiAxios.post(params).then(function (ro) {//
if (ro.result == 'ok') {
let roData = ro.data.data;
for (let i = 0; i < roData.length; i++) {
roData[i].no_serialNumber = ++that.serialNumber;
}
that.tableData = that.tableData.concat(roData);
that.currentPage++;//
that.dataLoaded = true;
}
}).catch(error=>{
console.log(error);
})
} else {
that.dataLoaded = true;
}
},
initMoreAttr() {
//
this.initDlgBodyHeight();
},
initDlgBodyHeight() {
if (document.getElementById("customTableDlgHeight") != null) {
document.getElementById("customTableDlgHeight").style.height =
(document.documentElement.clientHeight - 80 - document.getElementById('drawerFooter').offsetHeight) + 'px';// 82dialog36
}
},
saveTableColumnConfig() {//
const that = this;
let params = {
url:'jd',
data:{
}
};
params.data.wsId = wsId;
params.data.customTableCheckedData = JSON.stringify(that.customTableCheckedData);
params.data.cmd = 'com.actionsoft.apps.coe.pal.processlist_config_save';
params = this.getSearchCondition(params);
awsuiAxios.post(params).then(function (ro) {//
if (ro.result == 'ok') {
that.closeDlg();
tempTableFilterObj = {};//
//
that.searchProcessList(true);
} else {
// alert('');
// debugger;
}
}).catch(error=>{
console.log(error);
})
},
searchProcessList(updateTablecolumn) {//
this.$refs.table.bodyWrapper.scrollTop = 0;
this.tableData = [];
this.initPageCount(updateTablecolumn);
},
openProcessDesignerPage(row) {
const palId = row.id;
const folder = row.folder;//
if (folder) {
this.$message({
message: '不支持打开文件夹类型',
type: 'warning'
});
return;
}
openDesigner('', palId, this.$store.state.sessionId);
},
deepCloneJson(obj) {
return JSON.parse(JSON.stringify(obj));
},
resetCondition() {//
this.levelValue = defaultSelectVal;
this.searchInput = '';
this.$refs.table.clearFilter();
tempTableFilterObj = {};
this.searchProcessList(false);
},
exportProcessList() {//
const that = this;
let params = {
url:'jd',
data:{
}
};
params.data.wsId = wsId;
params.data.cmd = 'com.actionsoft.apps.coe.pal.processlist_data_export';
params = this.getSearchCondition(params);
awsuiAxios.post(params).then(function (ro) {//
if (ro.result == 'ok') {
document.getElementById("downloadIframe").src=ro.msg;
} else {
// alert('');
// debugger;
}
}).catch(error=>{
console.log(error);
})
},
tableRowClassName({ row, rowIndex }) {
return 'table_bg_color'
},
isShowColumn(a, b) {
return a == b;
},
filterTableData(filter) {
if (filter.type) {
tempTableFilterObj.type = filter.type;
} else if (filter.status) {
tempTableFilterObj.status = filter.status;
}
//
this.searchProcessList(false);
},
initTableColumnm() {//
const that = this;
that.customTableCheckedData = [];
that.customTableUncheckedData = [];
that.saveTableColumnConfig();
}
},
created() {
},
mounted(){
if (this.currentPage == 0) {
this.searchProcessList(true);
}
this.resize();
// this.scorllBottomEvent();
//
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
}
}
}
</script>
<style>
.el-select--medium {
float:left;
}
i,a,button,input,div,span{
outline: none;
}
</style>
<style scoped>
.grid-content {
border-radius: 4px;
min-height: 36px;
}
.custom_table_dlg_icon {
color: #4E7FF9;
font-size: 20px;
cursor: pointer;
position: relative;
top: 5px;
}
.custom-table-dlg-li {
text-align: left;
padding-left: 20px;
height: 30px;
line-height: 30px;
vertical-align: middle;
cursor: move;
}
.custom-table-dlg-li:hover {
background-color: #F5F7FA;
}
.custom-table-dlg-li-item {
display: inline-block;
width: 88%;
}
.custom-table-dlg-li-item-icon {
width: 10%;
text-align: center;
}
.icon-display{
display: none;
}
.custom-table-dlg-li:hover .icon-display{
display: inline-block;
}
.custom-table-dlg-footer {
height: 40px;
text-align: right;
padding: 10px;
}
.draggable-title {
text-align: left;
padding-left: 20px;
height: 30px;
line-height: 30px;
font-size: 12px;
color: #95A2B2;
}
.head-title {
display: inline-block;
}
.button_fixed_width {
width: 80px;
}
#customTableDlg >>> .awsui-sidebar__header {
padding: 10px 10px 10px 20px;
}
#processlistMain >>> .el-table__row:hover .processlist-title {
color: #4E7FF9 !important;
}
#processlistMain >>> .el-table__row:hover .processlist-title-version {
color: #4E7FF9 !important;
}
.processlist-title-version {
display:inline-block;
-webkit-transform:scale(0.9);
font-size:12px;color:#AAA;
}
.btn-more-data:hover {
color: #4E7FF9;
}
.btn-more-data {
cursor: pointer;
}
</style>

View File

@ -0,0 +1,42 @@
* {
padding: 0;
margin: 0;
}
body {
color: #4a4a4a;
font-family: PingFangSC-Light;
}
ul {
list-style: none;
}
a {
text-decoration: none;
}
div,span,section,i,button {
-webkit-tap-highlight-color: transparent;
outline: none;
}
.radius3 {
-moz-border-radius: 3px 3px 3px 3px;
-webkit-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
}
.tree-content-icon {
font-size: 13px;
}
.tree-content-icon-padding {
padding-right: 2px;
}
.el-input__inner {
border-radius: 0px;
}
.el-textarea__inner {
border-radius: 0px;
}

View File

@ -0,0 +1,231 @@
/*设计颜色规范*/
/*
通用鼠标悬浮色
所有悬浮状态的底色包括下拉列表项表格卡片等
*/
.general-bgcolor-hover:hover {
background-color: #F5F7FA !important;
}
.general-bgcolor-text-hover:hover {
background-color: #F5F7FA !important;
color : #4E7FF9 !important;
}
/*通用分隔线*/
.general-dividing-line {
color: #F2F2F2;
}
/**********************下拉菜单覆盖*************************/
/*下拉菜单定义悬浮颜色和悬浮字体色*/
.el-dropdown-menu__item:not(.is-disabled):hover{
background-color: #F5F7FA !important;
color: #333333 !important;
}
/**********************导航菜单栏颜色设置*************************/
.el-menu-item:hover{
color: #4E7FF9;
background-color: #F5F7FA !important;
}
.el-submenu__title:hover{
background-color: #F5F7FA !important;
}
.el-menu-item.is-active {
color: #4E7FF9;
background-color: #F5F7FA !important;
}
/**********************文字*************************/
/*主要字体颜色,通用字体颜色,系统普遍使用的字体颜色*/
.text-general-color {
color : #606266;
}
.text-general-bgcolor {
background-color : #606266;
}
/*
次要字体颜色
1 次要标注性信息 管理员 于2020年2月23日 19:30 修改
2 非重要按钮 取消按钮文本
3 列表表头 流程清单编号流程名称
*/
.text-second-color {
color : #909399;
}
.text-second-bgcolor {
background-color : #909399;
}
/*链接、可点击文本、icon颜色*/
.text-linker-color {
color : #4E7FF9;
}
.text-linker-bgcolor {
background-color : #4E7FF9;
}
/*重要文本颜色*/
.text-important-color {
color : #D9001B;
}
.text-important-bgcolor {
background-color : #D9001B;
}
/**********************表格*************************/
/*表头文字颜色*/
.table-head-text-color {
color: #909399;
}
/*表头背景颜色*/
.table-head-bgcolor {
}
/*表头文字颜色*/
.table-body-text-color {
}
/*表格表体背景颜色*/
.table-body-bgcolor {
}
/*表格表体行鼠标悬浮色*/
.table-body-row-bgcolor:hover {
background-color: #F5F7FA !important;
}
/*表格表体行下划线颜色*/
.el-table td {
border-bottom: 1px solid #F2F2F2;
}
/*表格筛选的表头选中颜色*/
.el-table th>.cell.highlight {
color: #4E7FF9;
}
/*表格筛选的表头选项筛选和重置按钮悬浮颜色*/
.el-table-filter__bottom button:hover {
color:#4E7FF9
}
/**********************按钮*************************/
/*通用按钮1例如窗口确定按钮新建按钮等设计颜色*/
.button-general-color {
background-color: #4E7FF9 !important;
border-color: #4E7FF9 !important;
}
.button-general-color-reverse {
border-color: #4E7FF9 !important;
color: #4E7FF9 !important;
}
/*通用按钮2例如重要操作类按钮*/
.button-general-color2 {
background-color: #D9001B !important;
border-color: #D9001B !important;
}
.button-general-color-reverse2 {
border-color: #D9001B !important;
color: #D9001B !important;
}
/*通用按钮3例如取消等灰色按钮*/
.button-general-color3 {
background-color: #909399 !important;
border-color: #909399 !important;
}
.button-general-color-reverse3 {
border-color: #909399 !important;
color: #909399 !important;
}
/********************多选框***********************/
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #4E7FF9;
border-color: #4E7FF9;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #4E7FF9;
}
/********************单选框***********************/
.el-radio__input.is-checked .el-radio__inner {
border-color: #4E7FF9;
background: #4E7FF9;
}
.el-radio__input.is-checked+.el-radio__label {
color: #4E7FF9;
}
/********************列表***********************/
.li-general-hover-bgcolor:hover {
background-color: #F5F7FA;
}
.el-table__body tr.current-row>td {
background-color: #F5F7FA;
}
/*******************加载中颜色********************/
.el-loading-spinner .path {
stroke: #4E7FF9;
}
.el-loading-spinner .el-loading-text {
color: #4E7FF9;
}
/******************下拉框文字选中颜色*************/
.el-select-dropdown__item.selected {
color: #4E7FF9;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
color: #4E7FF9;
}
/*****************步骤条**********************/
.el-step__title.is-process {
color: #909399;
}
.el-step__title.is-finish {
color: #4E7FF9;
}
.el-step__head.is-process {
color: #909399;
border-color: #909399;
}
.el-step__head.is-finish {
color: #4E7FF9;
border-color: #4E7FF9;
}
/*********************Popover 弹出框***********************/
.el-popover__title {
color : #606266;
font-weight: 600;
}
/*********************树***********************/
.el-tree-node__content {
height: 30px;
}
/*树展开关闭图标大小*/
.el-tree-node__expand-icon {
font-size: 12px;
}
/*树展开关闭图标的padding*/
.el-tree-node__content>.el-tree-node__expand-icon {
padding: 1px;
}
.el-table__empty-text {
font-size: 12px;
}

View File

@ -0,0 +1,125 @@
const HtmlWebpackPlugin = require('html-webpack-plugin')
const AWSDevParams = require('./AWSDevParams');
const AWSReleasePath = AWSDevParams.AWSReleasePath;
const AWSPortalUrl = AWSDevParams.AWSPortalUrl;
//开发时通过用户名及密码获取sessionId
const devUserInfo =AWSDevParams.devUserInfo;
const AWSproxyPath = "/AWSDEVURL/r/"; //防止跨域的地址
const moduleTemplateInAWS = AWSDevParams.moduleTemplateInAWS;//平台的模板路径
const outputDir = AWSDevParams.outputDir;
const publicPath = AWSDevParams.publicPath;//决定生成在平台的js或css的相对路径,与build配置的路径要对应
//判断是否开发
const isproduction = process.env.NODE_ENV === 'production';
//开发时路径和build到平台路径
let AWSJSAndCSSPath = isproduction ? "../" : AWSproxyPath.replace("r/","");
let AWSJSAndCSSImport = AWSDevParams.AWSJSAndCSSImport == null ? [] : AWSDevParams.AWSJSAndCSSImport;
let AWSJSAndCSSImportArray = [];
for(let k of AWSJSAndCSSImport){
if(k.type == "css"){
AWSJSAndCSSImportArray.push("<link type='text/css' rel='stylesheet' href='"+AWSJSAndCSSPath + k.path +"'/>");
}else if(k.type == "js"){
AWSJSAndCSSImportArray.push("<script type='text/javascript' src='"+AWSJSAndCSSPath + k.path + "'></script>");
}
}
const getAWSFileRelativePath = ()=>{
let index = "./";
if(isproduction){
index = publicPath;
}
return index;
}
const getIndexPath = ()=>{
let index = "index.html";
if(isproduction){
index = AWSReleasePath+moduleTemplateInAWS;
}
return index;
}
module.exports = {
// 基本路径 build后文件路径../apps/_bpm.platform/test2 ,开发运行时文件路径./
publicPath: getAWSFileRelativePath(),
//生成入口的html文件位置
indexPath: getIndexPath(),
outputDir : AWSReleasePath+outputDir,
// eslint-loader 是否在保存的时候检查
lintOnSave: true,
productionSourceMap: false, //打包不使用源码false后在平台无法调试
// use the full build with in-browser compiler?
// https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
// compiler: false,
// webpack配置
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
chainWebpack: (config) => {
config.plugin('html')
.tap(args => {
let buildVar = args[0];
buildVar.AWSJSAndCSSImport = AWSJSAndCSSImportArray.join("\n");
debugger
buildVar.AWSJSAndCSSPath = AWSJSAndCSSPath;
buildVar.devUserInfo = devUserInfo;
buildVar.isproduction = isproduction;
buildVar.axiosBaseUrl = isproduction ? "./" : AWSproxyPath;
buildVar.settingParam = isproduction ? "<#settingParam>" : "{}";
return args;
});
},
configureWebpack: config => {
config.entry.app=["babel-polyfill","./src/main.js"];
if (isproduction) {
// 为生产环境修改配置...
config.mode = 'production'
} else {
// 为开发环境修改配置...
config.mode = 'development'
}
},
devServer: {
proxy: {
//配置跨域
"/AWSDEVURL": {
target: AWSPortalUrl,
ws: true,
changOrigin: true, //允许跨域
pathRewrite: {
"^/AWSDEVURL": "" //请求的时候使用这个URL就可以
}
}
}
},
// css相关配置
css: {
loaderOptions: {}
},
// 是否启用dll
// See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#dll-mode
// dll: false,
// PWA 插件相关配置
// see https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
pwa: {},
// webpack-dev-server 相关配置
// devServer: {
// open: process.platform === 'darwin',
// disableHostCheck: true,
// host: 'www.test.com',//如果是真机测试就使用这个IP
// port: 1234,
// https: false,
// hotOnly: false,
// before: app => {}
// },
// 第三方插件配置
pluginOptions: {
},
transpileDependencies: ["*"]
}

File diff suppressed because it is too large Load Diff