Merge pull request 'master' (#660) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/660
This commit is contained in:
@@ -25,9 +25,9 @@ steps:
|
|||||||
- npm -v
|
- npm -v
|
||||||
- mkdir -p ./node_modules
|
- mkdir -p ./node_modules
|
||||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||||
#- npm config set registry https://registry.npmmirror.com
|
- npm config set registry https://registry.npmmirror.com
|
||||||
#- set NODE_OPTIONS=--openssl-legacy-provider
|
- set NODE_OPTIONS=--openssl-legacy-provider
|
||||||
#- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
- ls /app/build/$DRONE_REPO_NAME/
|
- ls /app/build/$DRONE_REPO_NAME/
|
||||||
- echo $NODE_MODULES_PATH
|
- echo $NODE_MODULES_PATH
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
"vue-json-viewer": "^3.0.4",
|
"vue-json-viewer": "^3.0.4",
|
||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
"vue3-pdf-app": "^1.0.3",
|
"vue3-pdf-app": "^1.0.3",
|
||||||
|
"vue3-print-nb": "^0.1.4",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"xlsx": "^0.18.5",
|
"xlsx": "^0.18.5",
|
||||||
"xlsx-style-vite": "^0.0.2"
|
"xlsx-style-vite": "^0.0.2"
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
<slot name="pre"></slot>
|
<slot name="pre"></slot>
|
||||||
<div class="user-audit">
|
<div class="user-audit">
|
||||||
<div class="circle-user">
|
<div class="circle-user">
|
||||||
<Tooltip :content="user.name" placement="bottom-start" width="45"/>
|
<Tooltip :content="user.name" placement="bottom-start" width="45px"/>
|
||||||
<div v-if="user.icon"
|
<div v-if="user.icon"
|
||||||
class="el-timeline-item__node" :style="{
|
class="el-timeline-item__node" :style="{
|
||||||
backgroundColor: user.color
|
backgroundColor: '#fff'
|
||||||
}">
|
}">
|
||||||
<el-icon v-if="user.icon" size="15" :class="user.class">
|
<el-icon v-if="user.icon" size="15" :color="user.color" :class="user.class">
|
||||||
<component :is="user.icon"/>
|
<component :is="user.icon"/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {Loading, Close, CircleCheckFilled, MoreFilled,RefreshLeft} from '@element-plus/icons-vue'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
row: {
|
row: {
|
||||||
@@ -36,7 +35,11 @@ const props = defineProps({
|
|||||||
mode: {
|
mode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'design'
|
default: 'design'
|
||||||
}
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
@@ -49,31 +52,35 @@ const initUser = (user) => {
|
|||||||
let state = user.state
|
let state = user.state
|
||||||
//创建节点
|
//创建节点
|
||||||
if (state === 'CREATE') {
|
if (state === 'CREATE') {
|
||||||
user["icon"] = CircleCheckFilled
|
user["icon"] = 'CircleCheckFilled'
|
||||||
user["color"] = "#0bbd87"
|
user["color"] = "#0bbd87"
|
||||||
}
|
}
|
||||||
//审批通过
|
//审批通过
|
||||||
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
if (state === 'AGREE' || state === 'AUTO_PASS') {
|
||||||
user["icon"] = CircleCheckFilled
|
user["icon"] = 'CircleCheckFilled'
|
||||||
user["color"] = "#0bbd87"
|
user["color"] = "#0bbd87"
|
||||||
}
|
}
|
||||||
|
if (props.type === "CC") {
|
||||||
|
user["icon"] = "Promotion"
|
||||||
|
user["color"] = "#3395f8"
|
||||||
|
}
|
||||||
//审批处理中
|
//审批处理中
|
||||||
if (state === 'RUNNING') {
|
if (state === 'RUNNING') {
|
||||||
user["icon"] = Loading
|
user["icon"] = 'Loading'
|
||||||
user["color"] = "#f78f5f"
|
user["color"] = "#f78f5f"
|
||||||
user["class"] = 'is-loading'
|
user["class"] = 'is-loading'
|
||||||
}
|
}
|
||||||
//拒绝后评论
|
//拒绝后评论
|
||||||
if (state === 'REFUSE') {
|
if (state === 'REFUSE') {
|
||||||
user["icon"] = Close
|
user["icon"] = 'Close'
|
||||||
user["color"] = "#f56c6c"
|
user["color"] = "#f56c6c"
|
||||||
}
|
}
|
||||||
if (state === 'PASS') {
|
if (state === 'PASS') {
|
||||||
user["icon"] = MoreFilled
|
user["icon"] = 'MoreFilled'
|
||||||
user["color"] = "#c0c4cc"
|
user["color"] = "#c0c4cc"
|
||||||
}
|
}
|
||||||
if (state === 'ROLLBACK') {
|
if (state === 'ROLLBACK') {
|
||||||
user["icon"] = RefreshLeft
|
user["icon"] = 'RefreshLeft'
|
||||||
user["color"] = "#f78f5f"
|
user["color"] = "#f78f5f"
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
@@ -99,13 +106,12 @@ init()
|
|||||||
position: relative;
|
position: relative;
|
||||||
background-color: #8a7243;
|
background-color: #8a7243;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
.el-timeline-item__node {
|
.el-timeline-item__node {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 1px;
|
right: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ import 'vite-plugin-svg-icons/register'
|
|||||||
import '@/assets/styles/index.scss'
|
import '@/assets/styles/index.scss'
|
||||||
import '@/assets/styles/sidebar.scss'
|
import '@/assets/styles/sidebar.scss'
|
||||||
import '@/assets/styles/echartsEditor.scss'
|
import '@/assets/styles/echartsEditor.scss'
|
||||||
|
//引入
|
||||||
|
import print from 'vue3-print-nb'
|
||||||
|
//挂载
|
||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||||
@@ -29,5 +32,5 @@ app.use(createPinia())
|
|||||||
app.use(router)
|
app.use(router)
|
||||||
app.directive('perm',hasPerm)
|
app.directive('perm',hasPerm)
|
||||||
app.directive('tabh',fixedHeight)
|
app.directive('tabh',fixedHeight)
|
||||||
|
app.use(print)
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="margin: 10px">
|
<div>
|
||||||
|
<el-button v-print="print" color="#ded0b2" icon="Printer"> 打印</el-button>
|
||||||
|
</div>
|
||||||
|
<div style="margin: 10px" id="printBox">
|
||||||
<el-timeline>
|
<el-timeline>
|
||||||
<el-timeline-item v-for="(operation,index) in operationList"
|
<el-timeline-item v-for="(operation,index) in operationList"
|
||||||
:key="index" :timestamp="operation.startTime"
|
:key="index" :timestamp="operation.startTime"
|
||||||
@@ -7,6 +10,14 @@
|
|||||||
:color="operation.color"
|
:color="operation.color"
|
||||||
size="large"
|
size="large"
|
||||||
placement="top">
|
placement="top">
|
||||||
|
<template #dot>
|
||||||
|
<!-- :style="{backgroundColor:operation.color}"-->
|
||||||
|
<div style="background-color:#fff;width: 16px; height: 16px">
|
||||||
|
<el-icon :color="operation.color" size="16px">
|
||||||
|
<component :is="operation.icon"></component>
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
当前节点: {{ operation.operationName }}
|
当前节点: {{ operation.operationName }}
|
||||||
@@ -15,7 +26,7 @@
|
|||||||
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name"
|
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name"
|
||||||
:style="{'flex-direction': isColumn?'column':'row'}">
|
:style="{'flex-direction': isColumn?'column':'row'}">
|
||||||
<div class="avatar-block" :style="{'margin-bottom': isColumn?'10px':'0'}">
|
<div class="avatar-block" :style="{'margin-bottom': isColumn?'10px':'0'}">
|
||||||
<name-circle :user="user"/>
|
<name-circle :user="user" :type="operation.operation"/>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div style="display: flex;align-items: center">
|
<div style="display: flex;align-items: center">
|
||||||
<el-icon :color="user.accountType==='0'?'#95d475':user.accountType==null?'#95d475':'#409eff'"
|
<el-icon :color="user.accountType==='0'?'#95d475':user.accountType==null?'#95d475':'#409eff'"
|
||||||
@@ -47,6 +58,13 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
<el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large">
|
<el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large">
|
||||||
|
<template #dot>
|
||||||
|
<div style="background-color:#fff;width: 16px; height: 16px">
|
||||||
|
<el-icon :color="timeline.color" size="16px">
|
||||||
|
<component :is="timeline.icon"></component>
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<el-card style="font-size: 16px;font-weight: bold;">
|
<el-card style="font-size: 16px;font-weight: bold;">
|
||||||
{{ timeline.context }}
|
{{ timeline.context }}
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -86,6 +104,34 @@ const timeline = ref({
|
|||||||
icon: '',
|
icon: '',
|
||||||
context: ''
|
context: ''
|
||||||
})
|
})
|
||||||
|
const print = ref({
|
||||||
|
id: 'printBox',//这里的id就是上面我们的打印区域id,实现指哪打哪
|
||||||
|
popTitle: '配置页眉标题', // 打印配置页上方的标题
|
||||||
|
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
|
||||||
|
preview: false, // 是否启动预览模式,默认是false
|
||||||
|
previewTitle: '预览的标题', // 打印预览的标题
|
||||||
|
previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
|
||||||
|
zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
|
||||||
|
previewBeforeOpenCallback() {
|
||||||
|
console.log('正在加载预览窗口!');
|
||||||
|
}, // 预览窗口打开之前的callback
|
||||||
|
previewOpenCallback() {
|
||||||
|
console.log('已经加载完预览窗口,预览打开了!')
|
||||||
|
}, // 预览窗口打开时的callback
|
||||||
|
beforeOpenCallback() {
|
||||||
|
console.log('开始打印之前!')
|
||||||
|
}, // 开始打印之前的callback
|
||||||
|
openCallback() {
|
||||||
|
console.log('执行打印了!')
|
||||||
|
}, // 调用打印时的callback
|
||||||
|
closeCallback() {
|
||||||
|
console.log('关闭了打印工具!')
|
||||||
|
}, // 关闭打印的callback(无法区分确认or取消)
|
||||||
|
clickMounted() {
|
||||||
|
console.log('点击v-print绑定的按钮了!')
|
||||||
|
},
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
switch (props.state) {
|
switch (props.state) {
|
||||||
@@ -97,17 +143,17 @@ const init = () => {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case '4':
|
case '4':
|
||||||
if (props.step != 'report'){
|
if (props.step != 'report') {
|
||||||
timeline.value = {
|
timeline.value = {
|
||||||
color: '#0bbd87',
|
color: '#0bbd87',
|
||||||
icon: 'CircleCheckFilled',
|
icon: 'CircleCheckFilled',
|
||||||
context: '审批通过'
|
context: '审批通过'
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
timeline.value = {
|
timeline.value = {
|
||||||
color: '#f78f5f',
|
color: '#f78f5f',
|
||||||
icon: 'MoreFilled',
|
icon: 'MoreFilled',
|
||||||
context:'年度计划审批中'
|
context: '年度计划审批中'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -288,6 +334,9 @@ init()
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-timeline-item__dot) {
|
||||||
|
margin-left: -3px;
|
||||||
|
}
|
||||||
:deep .el-card__body, .el-main {
|
:deep .el-card__body, .el-main {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
@@ -362,20 +411,14 @@ init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
.username {
|
||||||
//width: 90px;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
//overflow: hidden;
|
}
|
||||||
|
|
||||||
//.el-tooltip__trigger {
|
@media print {
|
||||||
// width: 90px;
|
//:deep .el-timeline-item__node--large > .el-icon {
|
||||||
// text-align: center;
|
// color: $iconColor !important;
|
||||||
// //padding-top: 2px;
|
|
||||||
// //text-align: center;
|
|
||||||
// text-overflow: ellipsis;
|
|
||||||
// white-space: nowrap;
|
|
||||||
// overflow: hidden
|
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -102,6 +102,7 @@
|
|||||||
<!-- <i class="el-icon-question" style="margin-left: 10px; font-size: medium; color: #b0b0b1"></i>-->
|
<!-- <i class="el-icon-question" style="margin-left: 10px; font-size: medium; color: #b0b0b1"></i>-->
|
||||||
<!-- </el-tooltip>-->
|
<!-- </el-tooltip>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
|
<span v-if="nodeProps.assignedType!=='PROJECT_LEADER'">
|
||||||
<span v-if="nodeProps.assignedType !== 'SUB_LEADER'">
|
<span v-if="nodeProps.assignedType !== 'SUB_LEADER'">
|
||||||
<el-form-item label="是否使用矩阵审批" prop="matrixApproval">
|
<el-form-item label="是否使用矩阵审批" prop="matrixApproval">
|
||||||
<el-switch inactive-text="不用" active-text="使用" v-model="nodeProps.matrixApproval"></el-switch>
|
<el-switch inactive-text="不用" active-text="使用" v-model="nodeProps.matrixApproval"></el-switch>
|
||||||
@@ -129,6 +130,8 @@
|
|||||||
<el-switch inactive-text="不审批" active-text="审批" v-model="nodeProps.president"></el-switch>
|
<el-switch inactive-text="不审批" active-text="审批" v-model="nodeProps.president"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</span>
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
<!-- <el-form-item label="重复跳过" prop="duplicateApproval">-->
|
<!-- <el-form-item label="重复跳过" prop="duplicateApproval">-->
|
||||||
<!-- <el-switch inactive-text="否" active-text="是"-->
|
<!-- <el-switch inactive-text="否" active-text="是"-->
|
||||||
<!-- v-model="nodeProps.duplicateApproval"></el-switch>-->
|
<!-- v-model="nodeProps.duplicateApproval"></el-switch>-->
|
||||||
@@ -273,6 +276,7 @@ const approvalTypes = reactive([
|
|||||||
{name: "发起人自己", type: "SELF"},
|
{name: "发起人自己", type: "SELF"},
|
||||||
{name: "下属企业领导", type: "SUB_LEADER"},
|
{name: "下属企业领导", type: "SUB_LEADER"},
|
||||||
{name: "下属企业科创部对接人", type: "DSTI_CONTACT_PERSON"},
|
{name: "下属企业科创部对接人", type: "DSTI_CONTACT_PERSON"},
|
||||||
|
{name: "项目负责人", type: "PROJECT_LEADER"},
|
||||||
// {name: "表单内联系人", type: "FORM_USER"},
|
// {name: "表单内联系人", type: "FORM_USER"},
|
||||||
// {name: "矩阵审批", type: "MATRIX_APPROVAL"},
|
// {name: "矩阵审批", type: "MATRIX_APPROVAL"},
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -71,10 +71,10 @@ const content = computed(() => {
|
|||||||
return '科创部用户跳过'
|
return '科创部用户跳过'
|
||||||
case "NO_USER_SKIP":
|
case "NO_USER_SKIP":
|
||||||
return '无用户审批,跳过'
|
return '无用户审批,跳过'
|
||||||
case "DSTI_CONTACT_PERSON":
|
|
||||||
return '下属企业科创部对接人'
|
|
||||||
case "SUB_LEADER":
|
case "SUB_LEADER":
|
||||||
return '下属企业领导'
|
return '下属企业领导'
|
||||||
|
case "PROJECT_LEADER":
|
||||||
|
return '项目负责人'
|
||||||
case "SELF_SELECT":
|
case "SELF_SELECT":
|
||||||
return config.selfSelect.multiple ? '发起人自选多人' : '发起人自选一人'
|
return config.selfSelect.multiple ? '发起人自选多人' : '发起人自选一人'
|
||||||
case "LEADER_TOP":
|
case "LEADER_TOP":
|
||||||
@@ -124,6 +124,7 @@ const validate = (err) => {
|
|||||||
case "DSTI_CONTACT_PERSON":
|
case "DSTI_CONTACT_PERSON":
|
||||||
case "SUB_LEADER":
|
case "SUB_LEADER":
|
||||||
case "LEADER_TOP":
|
case "LEADER_TOP":
|
||||||
|
case "PROJECT_LEADER":
|
||||||
showError.value = !validate_LEADER_TOP(err);
|
showError.value = !validate_LEADER_TOP(err);
|
||||||
break;
|
break;
|
||||||
case "LEADER":
|
case "LEADER":
|
||||||
|
|||||||
Reference in New Issue
Block a user