Commit 8aeea739 authored by xioln's avatar xioln

删除无用代码/流程任务组件

parent fa5006d1
import { post, del, put, get, downloadFile, uploadFile } from '../utils/http'
export function getDetailWithRecursion({ id, openProps, modelName }) {
const params = {
openProps: [],
pageFrom: 1,
pageSize: 10,
searchItems: {
children: [
],
items: [
{
fieldName: 'id',
operator: 'EQ',
value: id
}
],
operator: 'AND'
}
}
params.openProps = openProps
return post(`/${modelName}/find/recursion`, params)
}
// 查询所有父数据
export function recursion(modelName, params, batchFlag) {
return post(`/${modelName}/recursion${batchFlag ? 's' : ''}`, params, true)
}
// 批量删除
export function getParentData(modelName, id) {
return get(`/${modelName}/flat/parent/${id}`)
}
// 批量删除
export function batchDelete(modelName, ids) {
return del(`/${modelName}/batch/${ids}`)
}
export function searchApi(model, params, versionControl) {
if (params.openProps) {
params.openProps = params.openProps.filter(el => {
return el.name !== 'dynamicAttrs'
})
}
return post(`/${model}/${versionControl ? 'findBySpec' : 'search'}`, params, true)
}
export function ComplexQuery(params) {
return post('/complexQuery/dynamic', params)
}
export function searchPermMenuApi(model, params) {
return post(`/${model}/getAppMenuList`, params, true)
}
export function add(model, data) {
return post(`/${model}`, data, true)
}
export function edit(model, data) {
return put(`/${model}`, data)
}
export function remove(model, id) {
return del(`/${model}/${id}`)
}
export function submitReviewing(model, params) {
return post(`/${model}/lifecycle/changeStatus?id=${params.id}&isValid=true&status=${params.status}`, {}, true)
}
export function checkin(model, id, note) {
return post(`/${model}/version/${id}/checkin?note=${note}`, {}, true)
}
export function checkout(model, id) {
return post(`/${model}/version/${id}/checkout`, true)
}
export function cancelCheckout(model, id) {
return post(`/${model}/version/${id}/undoCheckout`, true)
}
export function getWorkingCopy(model, id) {
return get(`/${model}/version/getWorkingCopy/${id}`)
}
export function ModelAppByModelName(params) {
return get('/ModelPackage/modelName', params)
}
export function deleteByType(model, params) {
return del(`/${model}/deleteByType`, null, params)
}
export function apiDownloadFile(url, type = 'get', params, userAction = true) {
return downloadFile(url, type || 'get', params, userAction || true)
}
// 自定义文件上传
export function apiUploadFile(url, formdDta) {
return uploadFile(url, formdDta)
}
// 获取App信息
export function getAppInfo(appName) {
const params = {
searchItems: {
operator: 'AND',
items: [
{
fieldName: 'innerName',
operator: 'EQ',
value: appName
}
]
}
}
return new Promise((resolve, reject) => {
post('/DxApplication/findByCondition', params).then(res => {
if (res.items && res.items.length) {
resolve(res.items[0])
} else {
resolve(null)
}
}).catch(err => {
resolve(null)
console.log(err)
})
})
}
export default {
getParentData,
getAppInfo,
deleteByType,
ModelAppByModelName,
cancelCheckout,
checkin,
checkout,
getWorkingCopy,
submitReviewing,
getDetailWithRecursion,
batchDelete,
searchApi,
ComplexQuery,
add,
recursion,
edit,
remove,
apiDownloadFile,
apiUploadFile
}
......@@ -37,10 +37,6 @@ export function getExDHSQById (id) {
return post('api/ebomNumberApplicationController/getExDHSQById?id=' + id)
}
export function getParticipant (params) {
return get('api/users/roles?values=' + params)
}
export function getProcss (params) {
return get(`api/workflow/items/${params}/process`)
}
......@@ -801,3 +797,50 @@ export function getPmiInfo (oid) {
export function getDocVersion (id) {
return get('/api/documents/versions/' + id + '/latest')
}
// ###########
// 查询业务处理表单
export function getBizForm(params) {
return get('/workflow/task/getBizForm', params)
}
// 查询可设置的环节参与人信息
export function getParticipant(params) {
return get('/workflow/activity/teamInfoList', params)
}
// 查询流程实例详情
export function instDetail(instId) {
return get(`/workflow/inst/${instId}`)
}
// 获取任务详情
export function getTaskDetail(params, processFlag = false, taskFlag = false) {
return get(`/workflow/task/${params}?processFlag=${processFlag}&taskFlag=${taskFlag}`)
}
// 完成任务
export function completeTask(params) {
return post('/workflow/template/operation', params)
// return post(`/workflow/task/${params.id}/complete`, params.obj)
}
// 查询可设置的环节参与人信签审人员
export function getParticipantRole(params) {
return get('/workflow/participant/', params)
}
// 查询流程任务历史
export function getInstTaskHisTory(instId, page, size) {
if (page && size) {
return get('/workflow/task/hisTaskList', {
instId: instId,
page,
size
})
} else {
return get('/workflow/task/hisTaskList', {
instId: instId
})
}
}
import { post, get } from '../utils/http'
// 查询所有用户列表
export function getAllUsers(params) {
return post('/DxUserInfo/find/recursion', params)
}
// 查找群组下的用户
export function getOrgUsers(params) {
return post('/UserGroupRef/getAllUsersByGroup/', params)
}
// export function getOrgUsers(params) {
// return get(`/User/org/${params}`)
// }
// 查询上下文角色下的用户
export function getContextUsers(params) {
return get('/DxContextTeam/withContextIdAndTeamCode', params)
}
// 查询PBO变量下的用户
export function getPboVariableUser(params) {
return get('/workflow/inst/pboVariable', params)
}
// 通过用户名或账号模糊匹配查询存在账号的用户
export function getUsersByAccount(params) {
return get('/DxUserInfo/byAccount', params)
}
// 查询独立组织和所有子组织
export function getUserOrganizations(params) {
return get('/DxOrgMemberLink/getUserOrganizations', params)
}
// 查询组织下的用户
// export function getUsersInOrgs(isIncludeSubOrg, params) {
// return post(`/DxOrgMemberLink/getOrgMemberListByOrgIds?isIncludeSubOrg=${isIncludeSubOrg}`, params)
// }
export function getUsersInOrgs(isIncludeSubOrg, params) {
return post(`/DxOrganization/getUserListByOrgIds?isIncludeSubOrg=${isIncludeSubOrg}`, params)
}
export function findInUserSameIndependentOrg(cascade, userAccount, accurate) {
const userId = localStorage.getItem('userId')
return post(`/DxUserInfo/findInUserSameIndependentOrg?userId=${userId}&cascade=${cascade}&userAccount=${userAccount}&accurate=${!!accurate}`)
}
......@@ -4,6 +4,7 @@
v-model="form"
ref="form"
v-on="$listeners"
:rules="rules"
@submit="onSubmit"
>
<template v-if="formData.length">
......@@ -45,6 +46,7 @@
:type="formItem.component.type"
:name="formItem.key || ''"
:label="formItem.title || ''"
:rules="rules"
v-on="$listeners"
@handleSubmit="handleSubmit"
/>
......
<template>
<van-field class="radio" v-if="itemObj" v-bind="itemObj" colon :name="name" :label="label">
<van-field class="radio" v-if="itemObj" v-bind="itemObj" colon :name="name" :label="label" :rules="rules[name]">
<template #input>
<van-radio-group v-model="radioValue" v-bind="itemObj" v-on="itemObj.handler" direction="horizontal" :disabled="itemObj.disabled">
<van-radio v-for="(option, index) in itemObjOptions" :key="index"
......@@ -27,6 +27,10 @@ export default {
label: {
type: String,
default: ''
},
rules: {
type: Object,
default: () => null
}
},
components: {
......
......@@ -11,7 +11,7 @@
:placeholder="itemObj.placeholder"
@click="inputClick"
>
<template #input>
<template v-if="multichoice" #input>
<van-tag
v-for="item in tags"
:key="item.value"
......@@ -25,6 +25,19 @@
{{ item.label }}
</van-tag>
</template>
<template v-else #input>
<van-tag
v-if="tags.label"
style="margin: 2px"
closeable
size="mini"
plain
type="primary"
@close="close(tags)"
>
{{tags.label}}
</van-tag>
</template>
</van-field>
</div>
<van-popup v-model="showPicker" position="bottom">
......@@ -55,10 +68,10 @@
</button>
</div>
<div class="checkbox-con" style="height: 264px; overflow-y: auto">
<van-checkbox-group v-model="checkboxValue" @change="change">
<van-checkbox-group v-if="multichoice" v-model="checkboxValue" @change="change">
<van-cell-group>
<van-cell
v-for="(item, index) in options"
v-for="(item, index) in itemObj.options"
clickable
:key="item.value"
:title="item.label"
......@@ -70,19 +83,29 @@
</van-cell>
</van-cell-group>
</van-checkbox-group>
<van-radio-group v-else v-model="radioValue" @change="change">
<van-cell-group>
<van-cell
v-for="(item, index) in itemObj.options"
clickable
:key="item.value"
:title="item.label"
@click="toggle(index)"
>
<template #right-icon>
<van-radio :name="item" ref="checkboxes" />
</template>
</van-cell>
</van-cell-group>
</van-radio-group>
</div>
</van-popup>
</template>
</div>
</template>
<script>
import {
getRoleRange2,
searchRoleRangeUsesr,
setParticipantWithRole
} from '@/api/taskDetail.js'
import { Notify } from 'vant'
import { logout } from '../../api/user'
export default {
props: {
itemObj: {
......@@ -110,10 +133,10 @@ export default {
// 数据源 给组件分发数据用
data () {
return {
selectValue: '',
showPicker: false,
searchVal: '',
checkboxValue: [],
radioValue: {},
options: null,
// tags: [],
teamData: false,
......@@ -132,83 +155,37 @@ export default {
})
this.checkboxValue = this.itemObj.userEcho
}
if (this.teamData) {
this.teamInit()
}
},
watch: {
searchVal: {
deep: true,
handler (val) {
const v = {}
v[this.name] = this.searchVal
this.$emit('inputChange', v)
}
},
'itemObj.options': {
deep: true,
handler (val) {
if (this.teamData) {
return
}
this.getOptions(val)
}
tags: {
handler(newVal, oldVal) {
this.$emit('inputChange', newVal)
},
deep: true
}
},
computed: {
tags: {
get () {
return this.unique(this.checkboxValue)
if (this.multichoice) {
return this.unique(this.checkboxValue)
}
return this.radioValue
}
},
multichoice() {
return this.label.includes('会签')
}
},
methods: {
teamInit () {
this.roleOption = this.itemObj.range.map((item) => {
return {
text: item.displayName,
value: item.value
}
})
this.switchRole = this.roleOption[0].value
this.getRoleRange(this.switchRole)
},
async getRoleRange (val) {
const formData = new FormData()
formData.append('roleRange', val)
await getRoleRange2(formData).then((res) => {
this.teamOption = res.items.map((item) => {
return {
text: item.displayName,
value: item.value
}
})
})
},
teamSearch () {
const formData = new FormData()
formData.append('roleRange2', this.switchTeam)
formData.append('keyword', this.searchVal)
searchRoleRangeUsesr(formData).then((res) => {
this.getOptions(this.packageOptionsData(res.items))
})
},
selectRole (value) {
this.switchRole = value
this.getRoleRange(value)
},
selectTeam (value) {
this.switchTeam = value
this.teamSearch()
},
cancel () {
this.showPicker = false
},
onConfirm (value) {
this.submit()
this.showPicker = false
},
onSearch (val) {
this.itemObj.remoteMethod(val)
this.searchVal = val
if (this.timer) {
return
......@@ -220,21 +197,6 @@ export default {
this.timer = null
}, 1000)
},
getOptions (option) {
// this.options = []
let arr = option
if (arr.length !== 0) {
var obj = {}
arr = arr.reduce(function (data, item) {
// eslint-disable-next-line no-unused-expressions
obj[item.value] ? '' : (obj[item.value] = true && data.push(item))
return data
}, [])
this.options = arr
return arr
}
return []
},
inputClick (Event) {
this.showPicker = true
},
......@@ -244,12 +206,17 @@ export default {
},
// 多选选中切换事件
toggle (index) {
this.$refs.checkboxes[index].toggle()
if (this.multichoice) {
this.$refs.checkboxes[index].toggle()
}
},
// 标签删除时间
// 标签删除
close (val) {
this.checkboxValue = this.checkboxValue.filter((x) => x.value !== val.value)
this.submit()
if (this.multichoice) {
this.checkboxValue = this.checkboxValue.filter((x) => x.value !== val.value)
} else {
this.radioValue = {}
}
},
packageOptionsData (res) {
const arr = []
......@@ -262,24 +229,6 @@ export default {
}
return arr
},
// 提交
submit () {
const arr = this.checkboxValue.map((item) => {
return item.value
})
if (this.itemObj.submit) {
const parmas = {
workitemOid: this.$route.query.id,
userOids: arr,
roleName: this.name
}
setParticipantWithRole(parmas, 'custom').then((res) => {
Notify({ type: 'success', message: res.items })
})
} else {
sessionStorage.setItem(this.name + 'Users', arr)
}
},
unique (arr) {
for (var i = 0; i < arr.length; i++) {
for (var j = i + 1; j < arr.length; j++) {
......
......@@ -10,10 +10,12 @@ import VueTouch from 'vue-touch'
import Loading from './components/loading/loading'
import { Tree } from 'element-ui'
import './styles/index.scss'
import api from '@/api'
Vue.config.productionTip = false
Vue.prototype.$utils = utils
Vue.prototype.$bus = new Vue()
Vue.prototype.$api = api // eslint-disable-line
Vue.use(Vant)
Vue.use(Lazyload, {
lazyComponent: true
......
......@@ -2,60 +2,11 @@
const state = {
tabs: [
{ key: 'taskDetailHandle', title: '处理意见' },
{ key: 'editChangeLink', title: '任务处理' },
// ecr简单签审-任务处理
{ key: 'addECRAffectedAI', title: '任务处理' },
// ecr复杂数据类签-任务处理
{ key: 'editTaskAttrsForm', title: '任务处理' },
// ECN提交审签-复杂数据类签-任务处理
{ key: 'subECNMonitorTable', title: '任务处理' },
// 工艺类任务审签-PBOM顶层
// 工艺类任务审签-PBOM底层
{ key: 'pbomTreeSearchLink', title: '签署包' },
{ key: 'pbomChangeTypeComponent', title: 'ECN' },
{ key: 'pbomUpperChangeOrderComponent', title: 'EO' },
{ key: 'PBOMChangeOrderComponent', title: '任务指派' },
{ key: 'pbomModifyTop', title: '修改顶层' },
{ key: 'pbomLowDataChangeTask', title: '任务指派' },
{ key: 'pbomDeliverySpecTaskAssignment', title: '文档任务指派' },
// 工艺类任务审签-MBOM底层
{ key: 'mbomTreeSearchLink', title: '任务处理' },
{ key: 'mbomChangeTypeComponent', title: '更改类型' },
{ key: 'mbomWorkPackageTaskAssignment', title: '工作包' },
// 工艺类任务审签-MBOM顶层
{ key: 'showTree', title: 'EO文件' },
{ key: 'mbomChangeTypeComponentSplit', title: '工作包更改单' },
{ key: 'TaskPBOAttrSave', title: '任务处理' },
// DS实物部件审签-签署包
{ key: 'dataPackageInfoTable', title: '签署包' },
{ key: 'bottomPartSignedDataEOEditTable', title: '更改影响分析结果' },
// DS实物部件审签-DS签署
{ key: 'DSWorkflowHistory', title: 'DS签署' },
// DS实物部件审签-影响分析
{ key: 'bottomPartSignedDataEOViewTable', title: '影响分析' },
// { key: 'bottomPartSignedDataEOEditTable', title: '影响分析' },
// DS实物部件审签-工艺路线
{ key: 'EBOMBottom_ProcessCounterSign', title: '工艺路线' },
{ key: 'EBOMBottom_EditProcessRoute', title: '工艺路线' },
// DS实物部件审签-消息传阅
{ key: 'setNoticeRecipient', title: '消息传阅' },
{ key: 'uploadSignAttachment', title: '上传会签附件' },
// 技术文件签署流程
{ key: 'signedDocumentTable', title: '签署文档' },
// 图档子ECN审签流程
{ key: 'docSignedDataEOEditTable', title: '签署文档' },
{ key: 'setSupplierWithRole', title: '供应商会签者' },
{ key: 'setDistributeCompany', title: '图档文件分发单位' },
// 放在最后
{ key: 'setParticipantWithRole', title: '签审人员' },
{ key: 'templeteNumberWriteTable', title: '传阅' },
{ key: 'GetParticipant', title: '设置参与者' },
{ key: 'DeeFlowDxDocumentAttrsEdit', title: '是否归档' },
{ key: 'DeeFlowSecretConfirm', title: '密级确认' },
{ key: 'taskHistory', title: '签审历史' }
],
]
}
export default {
......
......@@ -82,8 +82,8 @@ axios.interceptors.response.use(
function get(url, params, responseType = null) {
return new Promise((resolve, reject) => {
axios.get(url, {
params: Object.assign({ monmentDataTime: Date.parse(new Date()) }, params)
// params: params
// params: Object.assign({ monmentDataTime: Date.parse(new Date()) }, params)
params: params
}, responseType).then((res) => {
if (responseType) {
resolve(res)
......
/**
* @Description:
* @author xioln
* @date 2022-06-04
* @FilePath: src\views\busniessComponents\workFlowTask\EBOMBottom_EditProcessRoute\index.vue
*/
<template>
<div class="demo-page">
123
</div>
</template>
<script>
export default {
name: '', // name写在组件的最前方,自定义组件为比谈
components: {},
data () {
return {
}
},
computed: {},
created () {
// 初始化数据
},
methods: {
}
}
</script>
<style lang='scss'>
</style>
/**
* @Description: DS实物部件审签-工艺路线
* @author faker
* @date 2022-05-13
* @FilePath: src/views/busniessComponents/workFlowTask/eBOMBottomEditProcessRoute/index.vue
*/
<template>
<div class="eBOM-bottom-edit-process">
<div class="eBOM-bottom-edit-process-card">
<van-cell
v-for="(item, i) in carData"
:key="i"
:border="false">
<template #title>
<div class="title-value-number">
<van-tag type="primary" size="large">模块</van-tag>
<span class="title-value">{{item.moduleNumber}}</span>
<span class="title-value">{{item.moduleVersion}}</span>
</div>
</template>
<template #label>
<div class="title-value-style">
<span class="custom-title">名称</span>
<span class="title-value">{{item.moduleName}}</span>
</div>
</template>
</van-cell>
</div>
<div class="eBOM-bottom-edit-process-choose">
<dee-form
:split="3"
label-width="200px"
:form="form"
:rules="rules"
:form-data="formData"
/>
</div>
<div class="eBOM-bottom-edit-process-editor">
<span class="eBOM-bottom-to-editor">点击编辑工艺路线</span>
<br/>
<span class="eBOM-bottom-notice">注:该操作的页面及功能交互复杂,请转至PC端页面操作</span>
</div>
</div>
</template>
<script>
import { getProcessUser } from '@/api/taskDetail.js'
import DeeForm from '@/components/form/form'
export default {
components: { DeeForm },
// name写在组件的最前方,自定义组件为比谈
data () {
return {
id: '',
carData: [],
formData: [
{
split: 1,
title: '',
data: []
}
],
rules: {},
userOption: [],
form: {},
isCompleted: false,
options: []
}
},
computed: {},
created () {
// 初始化数据
this.id = this.$route.query.id
this.getProcessUser(this.id)
this.initData()
},
methods: {
async getProcessUser (id) {
const params = { workitemoid: id }
await getProcessUser(params)
.then(res => {
this.carData = res.items
res.items.forEach(item => {
item.dxUsers.forEach(item => {
this.options.push({
label: item.fullName,
value: item.name
})
})
})
console.log(this.options)
})
.catch(e => {
console.log(e)
})
},
initData () {
const data = [
{
key: 'user',
title: '主管工艺员',
component: {
name: 'el-selectUser',
multiple: 'multiple',
submit: true,
placeholder: '请选择',
disabled: this.isCompleted,
filterable: true,
remote: true,
remoteMethod: (query) => {
// if (query.length >= 2) {
// getFullName(query).then(res => {
// this.taskParticipationData[0].data[index].component.options = this.packageOptionsData(res.items, 0)
// res.items.forEach(item => {
// this.userNameList.push(item)
// })
// })
// }
},
options: this.options
},
handler: {
change: (val) => {
this.roleName = 'user'
}
}
}
]
this.formData[0].data = data
},
initRules () {
this.taskParticipationData[0].data.map((x) => {
this.rules[x.key] = {
required: true,
message: '请选择',
trigger: 'blur'
}
})
},
validate () {
return this.$refs.form.validate()
}
}
}
</script>
<style lang='scss'>
.eBOM-bottom-edit-process-card{
.van-cell{
/*background: rgba(61, 27, 27, 0.13);*/
border-radius:8.333333vw;
}
.custom-title {
margin-right: 4px;
vertical-align: middle;
}
.title-value{
padding-left: 5px;
}
.title-value-style span:nth-child(even){
color: rgb(78, 84, 87);
font-weight: 600;
}
.title-value-number .title-value{
font-weight: 900;
}
.title-value-style-handle{
padding-top: 5px;
}
}
.eBOM-bottom-edit-process-choose{
.van-field__label{
width: 10.2em;
}
}
.eBOM-bottom-edit-process-editor{
padding: 20px;
.eBOM-bottom-to-editor{
font-size: 14px;
// text-decoration: underline;
color: #2A75CE;
cursor: pointer;
}
.eBOM-bottom-notice{
font-size: 12px;
width: 20px;
color: rgb(225, 0, 0);
}
}
</style>
/**
* @Description: 工艺类任务审签-PBOM底层-任务指派
* @author xioln
* @date 2022-05-14
* @FilePath: src/views/busniessComponents/workFlowTask/PBOMChangeOrderComponent/index.vue
*/
<template>
<div class="pbom-changeOrderComponent">
<van-row>
<van-col span="24" class="van-col-class">
<van-cell
is-link
v-for="item in cellDataList"
:key="item.key"
:title="item.title"
>
<template #title>
<van-col span="24">
<van-tag class="van-col-span" color="#1989fa">模块</van-tag>
<span> : </span>
<b>{{ item.user }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">名称</span>
<span> : </span>
<b>{{ item.name }}</b>
</van-col>
</template>
<template #right-icon> </template>
</van-cell>
</van-col>
<van-col span="24">
<dee-form
ref="form"
:split="1"
:form="form"
:rules="rules"
:form-data="formData"
/>
</van-col>
<van-col span="24">
<van-cell-group :border="true">
<div class="theme-edit-note">
<div class="theme-edit-title">
<van-cell :title="subTitle" />
</div>
<span>
<van-cell class="fontSize" :title="note" />
</span>
</div>
</van-cell-group>
</van-col>
</van-row>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
export default {
components: { DeeForm },
data () {
return {
title: '主管工艺员:',
subTitle: '点此编辑工艺路线',
note: '注:该操作的页面及功能交互复杂,请转至PC端页面操作',
cellDataList: [
{
name: 'xxx',
user: 'xxxxx-xxx'
}
],
formData: [
{
split: 1,
title: '',
data: [
{
key: 'user1',
title: '主管工艺员:',
component: {
name: 'el-selectUser',
multiple: 'multiple',
placeholder: '请选择',
disabled: this.isCompleted,
filterable: true,
remote: true,
submit: true,
remoteMethod: (query) => {},
options: [
{
label: '111',
value: '222'
}
]
},
handler: {
change: (val) => {
// this.roleName = 'user1'
}
}
}
]
}
],
rules: {
required: true,
message: '请选择',
trigger: 'blur'
},
userOption: [],
form: {}
}
},
computed: {},
created () {
// 初始化数据
},
methods: {}
}
</script>
<style lang='scss'>
.pbom-changeOrderComponent {
width: 100%;
padding: 0;
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
.van-row .van-col a {
font-size: 14px;
line-height: 14px;
height: 14px;
padding: 20px;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.right {
text-align: right;
}
.center {
font-size: 20px;
margin-top: calc(12% - 10px);
}
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px 20px 0 20px;
}
.van-col-span {
width: 40px;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
}
.theme-edit-note {
padding: 5px 10px;
span .van-cell {
color: rgb(225, 0, 0);
}
}
.theme-edit-title .van-cell {
color: #2a75ce;
cursor: pointer;
}
.van-cell-group__title {
font-weight: bolder;
color: rgb(60, 65, 67);
padding: 10px 25px;
}
.fontSize {
font-size: 10px;
}
.van-field__control:read-only {
outline-style: none;
border: 1px solid #ccc;
border-radius: 3px;
}
.van-cell__title {
margin-right: 0px;
}
}
</style>
/**
* @Description: ECR复杂处理类审签-任务处理
* @author xioln
* @date 2022-05-12
* @FilePath: src/views/busniessComponents/workFlowTask/editTaskAttrsForm/index.vue
*/
<template>
<div class="edit-taskAttrsForm">
<van-cell is-link @click="show = true">
<!-- 使用 title 插槽来自定义标题 -->
<template #title>
<van-icon name="warning" color="#ff1244"/>&nbsp;
<span class="custom-title">{{ title }}</span>
</template>
</van-cell>
<van-action-sheet
v-model="show"
cancel-text="取消"
:actions="actions"
@select="onSelect"
@cancel="onCancel"
/>
<dee-form
ref="form"
:split="3"
label-width="140px"
:form="form"
:rules="rules"
:form-data="formData"
/>
</div>
</template>
<script>
import { Toast } from 'vant'
import DeeForm from '@/components/form/form'
export default {
components: { DeeForm },
data () {
return {
title: '确认更改级别',
show: false,
actions: [
{ name: '1-紧急', color: 'rgb(223,0,24)' },
{ name: '2-急迫', color: '#ff8345' },
{ name: '3-常规', color: '#0066CC' }
],
formData: [{
split: 1,
title: '',
data: [{
title: '非经营成本估算(单位:万元)',
key: 'noOperatingCost',
component: {
placeHolder: '请输入',
name: 'el-input'
}
}, {
title: '非经营成本估算参考文件',
key: 'noOperatingCostFile',
component: {
placeHolder: '请输入',
name: 'el-input'
}
}, {
title: '经营成本估算增加(单位:万元)',
key: 'noOperatingCostAdd',
component: {
placeHolder: '请输入',
name: 'el-input'
}
}, {
title: '经营成本估算减少(单位:万元)',
key: 'operatingCostLow',
component: {
placeHolder: '请输入',
name: 'el-input'
}
}, {
title: '经营成本估算参考文件',
key: 'operatingCostFile',
component: {
placeHolder: '请输入',
name: 'el-input'
}
}]
}],
rules: { },
form: { }
}
},
computed: {},
created () {
// 初始化数据
},
methods: {
onSelect (item) {
// 默认情况下点击选项时不会自动收起
// 可以通过 close-on-click-action 属性开启自动收起
this.show = false
this.title = item.name
Toast({ message: item.name, position: 'bottom' })
},
onCancel () {
Toast({ message: '取消', position: 'bottom' })
}
}
}
</script>
<style lang='scss' scoped>
.edit-taskAttrsForm {
.van-cell__title {
margin-left: 10px;
}
.edit-taskAttrsForm-title {
font-size: 14px;
font-weight: 600;
padding: 20px 0 10px 20px;
}
.dee-form{
margin-top: 10px;
}
}
</style>
/**
* @Description: DS实物部件审签-影响分析
* @author faker
* @date 2022-05-13
* @FilePath: src/views/busniessComponents/workFlowTask/bottomPartSignedDataEOEditTable/index.vue
*/
<template>
<div class="affect-analyse">
<div class="affect-analyse-card">
<van-cell
v-for="(item, i) in affectData"
:key="i"
:border="false">
<template #title>
<div class="title-value-number">
<van-tag type="primary" size="large">{{item.changeMode}}</van-tag>
<span class="title-value">{{item.objNumber}}</span>
<span class="title-value">{{item.objVersion}}</span>
</div>
</template>
<template #label>
<div class="title-value-style">
<span class="custom-title">名称</span>
<span class="title-value">{{item.objName}}</span>
<div class="title-value-style-handle">
<span class="custom-title">在制品处理方式</span>
<span class="title-value" v-for="(val,i) in item.wipTreatments" :key="i">
{{val.wipTreatmentVal}}<span v-show="i+1<val.len">,</span></span>
</div>
</div>
</template>
</van-cell>
</div>
</div>
</template>
<script>
import { getChangePlanningRecords } from '@/api/taskDetail.js'
export default {
data () {
return {
id: '',
affectData: []
}
},
computed: {},
created () {
// 初始化数据
this.id = this.$route.query.id
this.getChangePlanningRecords(this.id)
},
methods: {
async getChangePlanningRecords (id) {
const params = this.$utils.formDataParams({ 'oid ': id })
await getChangePlanningRecords(params)
.then(async res => {
this.affectData = res.items
})
.catch(e => {
console.log(e)
})
}
}
}
</script>
<style lang='scss'>
.affect-analyse-card{
.van-cell{
/*background: rgba(61, 27, 27, 0.13);*/
border-radius:8.333333vw;
}
.custom-title {
margin-right: 4px;
vertical-align: middle;
}
.title-value{
padding-left: 5px;
}
.title-value-style span:nth-child(even){
color: rgb(78, 84, 87);
font-weight: 600;
}
.title-value-number .title-value{
font-weight: 900;
}
.title-value-style-handle{
padding-top: 5px;
}
}
</style>
/**
* @Description: DS实物部件审签-影响分析
* @author faker
* @date 2022-05-13
* @FilePath: src/views/busniessComponents/workFlowTask/bottomPartSignedDataEOViewTable/index.vue
*/
<template>
<div class="affect-analyse">
<div class="affect-analyse-card">
<van-cell
v-for="(item, i) in affectData"
:key="i"
:border="false">
<template #title>
<div class="title-value-number">
<van-tag type="primary" size="large">{{item.changeMode}}</van-tag>
<span class="title-value">{{item.objNumber}}</span>
<span class="title-value">{{item.objVersion}}</span>
</div>
</template>
<template #label>
<div class="title-value-style">
<span class="custom-title">名称</span>
<span class="title-value">{{item.objName}}</span>
<div class="title-value-style-handle">
<span class="custom-title">在制品处理方式</span>
<span class="title-value" v-for="(val,i) in item.wipTreatments" :key="i">
{{val.wipTreatmentVal}}<span v-show="i+1<val.len">,</span></span>
</div>
</div>
</template>
</van-cell>
</div>
</div>
</template>
<script>
import { getChangePlanningRecords } from '@/api/taskDetail.js'
export default {
data () {
return {
id: '',
affectData: []
}
},
computed: {},
created () {
// 初始化数据
this.id = this.$route.query.id
this.getChangePlanningRecords(this.id)
},
methods: {
async getChangePlanningRecords (id) {
const params = this.$utils.formDataParams({ 'oid ': id })
await getChangePlanningRecords(params)
.then(async res => {
this.affectData = res.items
})
.catch(e => {
console.log(e)
})
}
}
}
</script>
<style lang='scss'>
.affect-analyse-card{
.van-cell{
/*background: rgba(61, 27, 27, 0.13);*/
border-radius:8.333333vw;
}
.custom-title {
margin-right: 4px;
vertical-align: middle;
}
.title-value{
padding-left: 5px;
}
.title-value-style span:nth-child(even){
color: rgb(78, 84, 87);
font-weight: 600;
}
.title-value-number .title-value{
font-weight: 900;
}
.title-value-style-handle{
padding-top: 5px;
}
}
</style>
/**
* @Description: DS实物部件审签-DS签署
* @author faker
* @date 2022-05-13
* @FilePath: src/views/busniessComponents/workFlowTask/DSWorkflowHistory/index.vue
*/
<template>
<div class="ds-tree">
<div class="ds-title">{{ title }}</div>
<tree
:key="index"
:data="treeData"
:props="props"
:type='"DS实物部件签署"'
node-key="oid"
:load="loadNode"
:expand-on-click-node="false"
:default-expand-all="isExpandAll"
@node-click="handleNodeClick"
lazy
>
<div slot-scope="{ node, data }">
<div class="ds-tree-node-class">
<span class="title" :class="showClass(data)">
{{ data.nodeName }}
</span>
<span v-if="node.level === 1 && !isExpandAll" class="handle">
<!-- <img :src="icon" style="width: 10px;height: 10px;margin-left: 10px;margin-top: 6px;">-->
<span @click="expanded" class="handle">全部展开</span>
</span>
</div>
</div>
</tree>
</div>
</template>
<script>
import { getSubECNRootParts, getSubECNChildParts } from '@/api/taskDetail.js'
import Tree from '@/components/tree/index'
import moment from 'moment'
export default {
props: {
title: {
type: String,
default: function () {
return 'DS实物部件签署'
}
}
},
components: { Tree },
data () {
return {
props: {
label: 'name',
children: 'children',
isLeaf: 'leaf'
},
id: '',
isExpandAll: false,
index: 0,
// icon: require('../../../../assets/icons/designcenter/createNotice.png'),
treeData: []
}
},
created () {
this.id = this.$route.query.id
},
mounted () {
this.getSubECNRootParts()
},
computed: {},
methods: {
showClass (data) {
const changeMode = data.changeMode ? data.changeMode.split(';')[0] : ''
let classColor = ''
switch (changeMode) {
case '新增':
classColor = 'new'
break
case '添加':
classColor = 'add'
break
case '数量更改':
classColor = 'change-count'
break
case '换号':
classColor = 'change-number'
break
case '移除':
classColor = 'delete'
break
case '升版':
classColor = 'change-version'
break
case '未改动':
classColor = 'not-modified'
break
default:
classColor = 'not-modified'
break
}
return classColor
},
async getSubECNRootParts () {
this.loading = true
const params = this.$utils.formDataParams({ 'oid ': this.id })
await getSubECNRootParts(params)
.then(async (res) => {
this.loading = false
this.treeData = res.items
})
.catch((e) => {
this.loading = false
})
},
expanded () {
this.index++
this.isExpandAll = !this.isExpandAll
this.getSubECNRootParts()
},
async loadNode (node, resolve) {
if (!Object.keys(node.data).length || !node.data.oid) return
const params = this.$utils.formDataParams({
'oid ': this.id,
planningOid: node.data.oid
})
await getSubECNChildParts(params)
.then((res) => {
return resolve(res.items)
})
.catch((e) => {
return resolve([])
})
},
handleNodeClick (data, node) {
const id = data?.number?.oid
this.$router.push({
path: `/bomTreeDetail-${id}`,
query: {
oid: id,
title: 'EBOM', // 子ECN详情
subTypeName: '',
dxClassname: '',
time: moment().valueOf()
}
})
}
}
}
</script>
<style lang="scss">
.ds-tree {
padding: 5px 10px 5px 10px;
.ds-title {
font-weight: bolder;
width: 90%;
padding: 10px;
}
.ds-tree-node-class {
display: flex;
justify-content: flex-start;
width: 100%;
.handle {
margin-left: 30px;
display: flex;
flex-direction: row;
color: #1296db;
}
/*&:hover {*/
/* .handle {*/
/* }*/
/*}*/
.title {
display: flex;
align-items: center;
font-size: 14px;
&.delete {
text-decoration: line-through;
color: #848484;
font-weight: 900;
font-style: italic;
}
&.change-version {
color: #14cfb2;
font-weight: 900;
font-style: italic;
// color: purple;
}
&.change-number {
color: red;
font-weight: 900;
font-style: italic;
}
&.new {
color: #1296db;
font-weight: 900;
font-style: italic;
}
&.add {
color: #ffa206;
font-weight: 900;
font-style: italic;
}
&.change-count {
color: #007100;
font-weight: 900;
font-style: italic;
}
&.not-modified {
color: #000;
}
}
}
}
</style>
/**
* @Description: DS实物部件审签-签署包
* @author faker
* @date 2022-05-13
* @FilePath: src/views/busniessComponents/workFlowTask/dataPackageInfoTable/index.vue
*/
<template>
<div class="data-Package-Info">
<div class="data-Package-Info-title">
<span class="mainTitle">{{title}}: {{packageInfoData.packageName}}</span>
</div>
<div class="data-Package-Info-title">
<span class="mainTitle">{{groupTitle}}</span>
</div>
<div class="data-Package-Info-card">
<van-cell is-link
v-for="(item, i) in packageInfoData.data"
:key="i"
:border="false">
<template #title>
<div class="title-value-number">
<van-tag type="primary" size="large">{{item.state}}</van-tag>
<span class="title-value">{{item.number}}</span>
</div>
</template>
<template #label>
<div class="title-value-style">
<span class="custom-title">名称</span>
<span class="title-value">{{item.name}}</span>
<span class="title-value"> | 版本</span>
<span class="title-value">{{item.version}}</span>
</div>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</div>
</div>
</template>
<script>
import { getDataPackageInfo } from '@/api/taskDetail.js'
export default {
components: {},
// name写在组件的最前方,自定义组件为比谈
props: {
title: {
type: String,
default: function () {
return '签署包名称'
}
},
groupTitle: {
type: String,
default: function () {
return '待检署模块:'
}
}
},
data () {
return {
id: '',
packageInfoData: {
packageName: '',
data: []
}
}
},
computed: {
},
created () {
// 初始化数据
this.id = this.$route.query.id
this.getDataPackageInfo(this.id)
},
methods: {
async getDataPackageInfo (id) {
const params = { oid: id }
console.log(params)
await getDataPackageInfo(params)
.then(async res => {
this.packageInfoData.data = res.items.modules
this.packageInfoData.packageName = res.items.packageName
})
.catch(e => {
console.log(e)
})
}
}
}
</script>
<style lang='scss'>
.mainTitle{
margin: 6.2vw 6.2vw;
color: #454952;
font-weight: 900;
font-size: 3.2vw;
line-height: 3.2vw;
/*color: rgb(78, 84, 87);*/
}
.data-Package-Info-title{
margin: 13px 0px;
}
.data-Package-Info-card{
.custom-title {
margin-right: 4px;
vertical-align: middle;
}
.title-value{
padding-left: 5px;
}
.title-value-style span:nth-child(even){
color: rgb(78, 84, 87);
font-weight: 600;
}
.title-value-number .title-value{
font-weight: 900;
}
}
</style>
/**
* @Description: 设计图档签署文档列表
* @author xioln
* @date 2022-07-20
* @FilePath: src/views/busniessComponents/workFlowTask/docSignedDataEOEditTable/index.vue
*/
<template>
<div class="docSigned-DataEOEditTable">
<van-row>
<van-col span="24" class="van-col-class van-col-class-download">
<!-- <van-button plain type="info" size="small" block @click="download"
>下载</van-button
> -->
</van-col>
<van-col
v-if="showLoading"
span="24"
class="van-col-class van-col-class-download"
>
<van-loading type="spinner" size="24px" vertical />
</van-col>
<van-col
v-else-if="tableData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell
is-link
v-for="item in tableData"
:key="item.oid"
@click="cellClick(item)"
>
<template #title>
<van-col span="24">
<van-col class="van-col-span" span="8">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="8">名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="8">版本</van-col>
<van-col span="14" offset="1">{{ item.version }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="8">更改方式</van-col>
<van-col span="14" offset="1">{{ item.changeMode }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="8">创建时间</van-col>
<van-col span="14" offset="1">{{ item.createTime }}</van-col>
</van-col>
</template>
<template #right-icon>
<van-icon name="arrow" class="search-icon center" />
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</div>
</template>
<script>
import { getSubECNDocs, downloadReviewDatas, getDocVersion } from '@/api/taskDetail'
import moment from 'moment'
export default {
name: 'DocSignedDataEOEditTable', // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
required: true
}
},
components: {},
data () {
return {
showLoading: true,
tableData: [],
downloadParams: []
}
},
computed: {},
created () {
// 初始化数据
this.getSubECNDocs()
},
methods: {
getSubECNDocs () {
const params = this.$utils.formDataParams({
oid: this.basicData.items.id
})
this.tableData = []
getSubECNDocs(params).then((res) => {
this.tableData = res.items.objects.map((item, index) => {
this.$set(item, 'show', true)
this.$set(item, 'link', true)
this.$set(item, 'oid', item.number.oid)
// this.$set(item, 'eoOid', item.eo.number.oid)
this.$set(item, 'number', item.number.label)
// this.$set(item, 'createTime', item.eo.createTime)
// this.$set(item, 'changeDesc', item.eo.changeDesc)
// this.$set(item, 'attachments', item.eo.addAttachmentPaths)
return item
})
const eoArr = res.items.objects.map((item) => {
this.$set(item.eo, 'show', true)
this.$set(item.eo, 'link', true)
this.$set(item.eo, 'eoOid', item.eo.number.oid)
this.$set(item.eo, 'oid', item.eo.number.oid)
this.$set(item.eo, 'number', item.eo.number.label)
this.$set(item.eo, 'createTime', item.eo.createTime)
this.$set(item.eo, 'changeDesc', item.eo.changeDesc)
// this.$set(item.eo, 'attachments', item.eo.addAttachmentPaths)
this.$set(item.eo, 'attachments', item.eo.attachments)
return item.eo
})
this.tableData = this.tableData.concat(eoArr)
this.showLoading = false
// eslint-disable-next-line no-mixed-operators
this.downloadParams = res.items.downloadParams && res.items.downloadParams.oids || []
})
},
cellClick (item) {
const id = item.oid
getDocVersion(id)
.then(res => {
const data = res.items
this.$router.replace({
path: `/bomTreeDetail-${data.id}`,
query: {
oid: data.id,
title: '签署文档', // 子ECN详情
subTypeName: data.subTypeName,
dxClassName: data.dxClassname,
time: moment().valueOf()
}
})
})
.catch((e) => {
console.log(e)
})
},
download () {
downloadReviewDatas(this.basicData.items.id, {
oids: this.downloadParams
}).then((res) => {
const name = res.items.downloadUrl.substring(
res.items.downloadUrl.lastIndexOf('/') + 1,
res.items.downloadUrl.length
)
const url = `/api/documents/attachments/download?fileName=${name}&url=${encodeURIComponent(
res.items.downloadUrl
)}`
this.$utils.downLoad(url, name)
})
}
}
}
</script>
<style lang='scss' scoped>
.docSigned-DataEOEditTable {
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
.van-col-class-download {
padding-bottom: 0px;
}
.van-col-span {
// width:95px;
font-weight: bold;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
}
.center {
margin-top: 0;
display: flex;
align-items: center;
}
}
</style>
/**
* @Description: 跳转数据类型-任务处理
* @author xioln
* @date 2022-05-11
* @FilePath: src/views/busniessComponents/workFlowTask/editChangeLink/index.vue
*/
<template>
<div class="edit-Change-Link">
<van-cell-group :border="true" :title="title">
<div class="theme-edit-note">
<div class="theme-edit-title">
<van-cell
:title="subTitle"
/>
</div>
<span>
<van-cell
:title="note"
/>
</span>
</div>
</van-cell-group>
</div>
</template>
<script>
export default {
data () {
return {
title: '主题编辑',
subTitle: '执行更改规划',
note: '注:该操作的页面及功能交互复杂,请转至PC端页面操作'
}
},
computed: {
},
created () {
// 初始化数据
},
methods: {
}
}
</script>
<style lang='scss'>
.edit-Change-Link{
text-align: left;
.van-cell-group__title {
font-weight: bolder;
color: rgb(60, 65, 67);
padding: 3.266667vw 7.266667vw 3.133333vw;
}
.theme-edit-note{
padding: 2.2vw 8.266667vw;
span .van-cell{
color: rgb(225, 0, 0);
}
}
.theme-edit-title .van-cell{
color: #2A75CE;
cursor: pointer;
}
}
</style>
/**
* @Description: 跳转数据类型-ECR简单处理类审签2-任务处理
* @author faker
* @date 2022-05-12
* @FilePath: src/views/busniessComponents/workFlowTask/editChangeLink/indexThemeEdit.vue
*/
<template>
<div class="edit-change-link">
<van-col><van-cell title="确认更改级别"/></van-col>
<van-cell is-link title="技术评审优先级:" @click="show = true" />
<van-action-sheet v-model="show" :actions="actions" @select="onSelect" />
</div>
</template>
<script>
import { Toast } from 'vant'
export default {
components: {},
data () {
return {
show: false,
actions: [{ name: '选项一' }, { name: '选项二' }, { name: '选项三' }]
}
},
computed: {},
created () {
// 初始化数据
},
methods: {
onSelect (item) {
// 默认情况下点击选项时不会自动收起
// 可以通过 close-on-click-action 属性开启自动收起
this.show = false
Toast(item.name)
}
}
}
</script>
<style lang='scss'>
.edit-change-link{
text-align: left;
}
</style>
/**
* @Description: ecr简单签审-任务处理
* @author xioln
* @date 2022-05-11
* @FilePath: src/views/busniessComponents/workFlowTask/addECRAffectedAI/index.vue
*/
<template>
<div class="edit-taskAttrsForm">
<div class="edit-taskAttrsForm-title">
<van-icon name="completed" />&nbsp;{{ label }}
</div>
<div v-for="item in actions" :key="item.value" :title="item.value">
<van-cell is-link @click="showSheet(item.value)">
<!-- 使用 title 插槽来自定义标题 -->
<template #title>
<span class="custom-title">{{ title[item.value]||item.name }}</span>
</template>
</van-cell>
<van-action-sheet
v-model="show[item.value]"
cancel-text="取消"
:actions="item.options"
close-on-click-action
@open="onOpen(item.value)"
@select="onSelect"
@cancel="onCancel"
/>
</div>
<dee-form
v-if="showForm"
ref="form"
:form="form"
:rules="rules"
:form-data="formData"
@input="onInput"
/>
</div>
</template>
<script>
import { Toast } from 'vant'
import findVars from '@/components/common/findVars'
import { getTaskAttrs } from '@/api/taskDetail'
import DeeForm from '@/components/form/form'
export default {
components: { DeeForm },
props: {
basicData: {
type: Object,
required: true
}
},
data () {
return {
title: {},
label: '',
show: {},
actions: [],
parmasKeyMap: {
MBA: 'mbaAttrs',
IBA: 'ibaAttrs',
ref: 'refAttrs'
},
fileList: [],
showForm: false,
formData: [
{
split: 1,
title: '',
data: []
}
],
rules: {},
form: {},
sendFormParmas: {
mbaAttrs: {},
ibaAttrs: {},
refAttrs: {}
}
}
},
watch: {},
computed: {},
created () {
// 初始化数据
this.label = findVars(this.basicData).editTaskAttrsForm
this.getTaskAttrs()
const arr = findVars(this.basicData)
console.log('editTaskAttrsForm', arr)
if (['确认ECR属性', '确认更改级别'].includes(arr.editTaskAttrsForm)) {
this.showForm = true
}
},
mounted () {},
methods: {
formLayout (res) {
const selectDatas = res.items.filter((x) => x.uiType === 'SelectCombox')
selectDatas.forEach((item, i) => {
const options = []
item.options.forEach((x) => {
options.push({
name: x.label,
disabled: !item.editable
})
})
const data = {
name: item.label,
value: item.name,
options: options
}
this.$set(this.actions, i, data)
})
const inputDatas = res.items.filter((x) => x.uiType === 'TextInput')
inputDatas.forEach((item, i) => {
let data = {}
data = {
key: item.name,
title: item.label,
component: {
placeHolder: '请输入',
name: 'el-input'
}
}
this.$set(this.formData[0].data, i, data)
})
},
getTaskAttrs () {
const arr = findVars(this.basicData)
this.label = arr.editTaskAttrsForm
const params = this.$utils.formDataParams({
workItemOid: this.basicData.items.id,
buttonName: this.label
})
getTaskAttrs(params).then((res) => {
this.formLayout(res)
})
},
saveTaskAttrs () {
this.$set(
this.sendFormParmas.ibaAttrs,
this.currentSelect,
this.title[this.currentSelect]
)
this.fileList = this.$utils.arrayRemoveDuplicate(
this.fileList,
'attrName'
)
this.$set(this.sendFormParmas, 'attAttrs', this.fileList)
this.$set(this.sendFormParmas, 'workItemOid', this.basicData.items.id)
this.$set(this.sendFormParmas, 'buttonName', this.label)
this.$emit('transmit', { data: { TaskPBOAttrSave: this.sendFormParmas } })
},
onOpen (v) {
this.currentSelect = v
},
onSelect (item) {
// 默认情况下点击选项时不会自动收起
// 可以通过 close-on-click-action 属性开启自动收起
this.$set(this.title, this.currentSelect, item.name)
this.saveTaskAttrs()
Toast({ message: item.name, position: 'bottom' })
},
onCancel () {
Toast({ message: '取消', position: 'bottom' })
},
onInput (val, name) {
this.$set(
this.sendFormParmas.ibaAttrs,
name,
val
)
this.saveTaskAttrs()
},
showSheet (v) {
this.$set(this.show, v, true)
}
}
}
</script>
<style lang='scss' scoped>
.edit-taskAttrsForm {
.van-cell__title {
margin-left: 10px;
}
.edit-taskAttrsForm-title {
font-size: 14px;
font-weight: 600;
padding: 20px 0 10px 20px;
}
}
</style>
/**
* @Description: MBOM顶层更改流程-数据
* @author xioln
* @date 2022-05-16
* @FilePath: src/views/busniessComponents/workFlowTask/mbomChangeTypeComponent/index.vue
*/
<template>
<div class="show-tree">
<dee-form :form="form" :form-data="formData" :rules="rules" />
<van-cell-group :border="true" :title="mTopTableData.title">
<div class="theme-edit-note">
<div
class="theme-edit-title"
v-for="item in mTopTableData.subTitles"
:key="item"
:title="item"
>
<van-cell :title="item" />
</div>
</div>
</van-cell-group>
<van-cell-group :border="true" :title="data2.title">
<div class="theme-edit-note">
<div class="theme-edit-title">
<van-cell>
<template #title>
<span
v-for="item in data2.subTitle"
:key="item"
class="title-value"
style="color: #258cf7; margin-left: 20px"
>{{ item }}</span
>
</template>
</van-cell>
</div>
<span>
<van-cell class="fontSize">
<template #title>
<span class="title-value" style="color: red">{{ note }}</span>
</template>
</van-cell>
</span>
</div>
</van-cell-group>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
import {
getChangeTypeComponent,
getMbomChangeTypeComponent
} from '@/api/taskDetail'
export default {
components: { DeeForm },
props: {
basicData: {
type: Object,
required: true
}
},
data () {
return {
note: '注:该操作的页面及功能交互复杂,请转至PC端页面操作',
mTopTableData: {
title: '顶层更改单',
subTitles: []
},
data2: {
title: '规划装配方案',
subTitle: ['规划装配方案', '消耗参装件']
},
form: {},
formData: [
{
data: [
{
title: '更改类型',
key: 'checkbox',
component: {
name: 'el-checkbox',
options: []
},
handler: {
change: function (val) {}
}
}
]
}
],
rules: {
radio: [{ required: true, message: '请选择', trigger: 'blur' }]
},
options: [],
parmas: {}
}
},
computed: {},
created () {
// 初始化数据
const parmas = this.$utils.formDataParams({
workItemOid: this.basicData.items.id
})
this.getChangeTypeComponent(parmas)
this.getMbomChangeTypeComponent(parmas)
},
methods: {
// 获取更改类型
getChangeTypeComponent (parmas) {
getChangeTypeComponent(parmas).then((res) => {
const checkBoxs = res.items.changeType.checkBoxs
checkBoxs.forEach((item) => {
this.options.push({
value: item.value,
label: item.label,
selected: item.selected
})
})
this.$set(
this.formData[0].data[0].component,
'disabled',
!res.items.changeType.editable
)
this.$set(this.formData[0].data[0].component, 'options', this.options)
})
},
// 获取规划装配方案
getMbomChangeTypeComponent (parmas) {
this.mTopTableData.subTitles = []
getMbomChangeTypeComponent(parmas).then((res) => {
console.log(res)
// eslint-disable-next-line no-unused-vars
for (const key in res.items.mtopChangeOrders) {
this.mTopTableData.subTitles.push(
key
// show: true,
// filePath: res.items.mtopChangeOrders[key]
)
}
})
}
}
}
</script>
<style lang='scss' scoped>
.mbom-changeTypeComponent {
text-align: left;
margin-top: 10px;
.van-cell-group__title {
font-weight: bolder;
color: rgb(60, 65, 67);
padding: 10px 25px;
}
.theme-edit-note {
padding: 5px 10px;
span .van-cell {
color: rgb(225, 0, 0);
}
}
.theme-edit-title .van-cell {
color: #2a75ce;
cursor: pointer;
}
.dee-form {
margin-top: 20px;
}
.van-cell__title.van-field__label {
font-weight: bold;
color: rgb(60, 65, 67);
}
.fontSize {
font-size: 10px;
.title-value {
font-weight: 300;
color: red;
}
}
.van-cell-group__title {
font-weight: bolder;
color: rgb(60, 65, 67);
}
}
</style>
/**
* @Description:工作包更改单
* @author xioln
* @date 2022-05-16
* @FilePath: src/views/busniessComponents/workFlowTask/mbomChangeTypeComponentSplit/index.vue
*/
<template>
<div class="mbom-changeTypeComponent-split">
<van-row>
<van-col v-if="cellData.length !== 0" span="24" class="van-col-class">
<van-cell
is-link
v-for="item in cellData"
:key="item.key"
:title="item.title"
>
<template #title>
<van-col span="24">
<van-tag type="primary">{{ item.name }}</van-tag>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">WP名称</van-col>
<van-col span="12" offset="1">{{ item.wpName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">WP更改批准时间</van-col>
<van-col span="12" offset="1">{{ item.wpLasterTime }}</van-col>
</van-col>
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</div>
</template>
<script>
import { getMbomChangeTypeComponent } from '@/api/taskDetail'
export default {
name: 'MbomChangeTypeComponentSplit', // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
required: true
}
},
components: {},
data () {
return {
cellData: [
]
}
},
computed: {},
created () {
// 初始化数据
const parmas = this.$utils.formDataParams({
workItemOid: this.basicData.items.id
})
this.getMbomChangeTypeComponent(parmas)
},
methods: {
// 获取工作包更改单
getMbomChangeTypeComponent (parmas) {
this.mTopTableData.subTitles = []
getMbomChangeTypeComponent(parmas).then((res) => {
console.log(res)
// res.items && res.items.wpChangeOrders.forEach((item) => {})
})
}
}
}
</script>
<style lang='scss'>
.mbom-changeTypeComponent-split {
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
.van-row .van-col a {
font-size: 14px;
line-height: 14px;
height: 14px;
padding: 20px;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
.right {
text-align: right;
}
.center {
margin-top: 0;
display: flex;
align-items: center;
}
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
.van-col-span {
// width:95px;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
}
}
</style>
/**
* @Description: MBOM顶层更改流程-提交MBOM顶层更改
* @author xioln
* @date 2022-05-16
* @FilePath: src/views/busniessComponents/workFlowTask/mbomTreeSearchLink/index.vue
*/
<template>
<div class="pbom-treeSearchLink">
<dee-form :form="form" :form-data="formData" :rules="rules" />
<van-cell-group :border="true" :title="title1">
<div class="theme-edit-note">
<div class="theme-edit-title">
<van-cell :title="subTitle1" />
</div>
</div>
</van-cell-group>
<van-cell-group :border="true" :title="title">
<div class="theme-edit-note">
<div class="theme-edit-title">
<van-cell :title="subTitle" />
</div>
<span>
<van-cell class="fontSize" :title="note" />
</span>
</div>
</van-cell-group>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
export default {
components: { DeeForm },
data () {
return {
title: 'MBOM结构:',
title1: '顶层更改单',
subTitle: '顶层结构',
subTitle1: '顶层更改单 MBOW-xxx',
note: '注:该操作的页面及功能交互复杂,请转至PC端页面操作',
form: {},
formData: [
{
data: [
{
title: '更改类型',
key: 'checkbox',
component: {
name: 'el-checkbox',
options: [{ label: '设计更改规划', value: 'submit' }]
},
handler: {
change: function (val) {}
}
}
]
}
],
rules: {
radio: [{ required: true, message: '请选择', trigger: 'blur' }]
}
}
},
computed: {},
created () {
// 初始化数据
},
methods: {}
}
</script>
<style lang='scss'>
.pbom-treeSearchLink {
text-align: left;
margin-top: 10px;
.van-cell-group__title {
font-weight: bolder;
color: rgb(60, 65, 67);
padding: 10px 25px;
}
.theme-edit-note {
padding: 5px 10px;
span .van-cell {
color: rgb(225, 0, 0);
}
}
.theme-edit-title .van-cell {
color: #2a75ce;
cursor: pointer;
}
.dee-form {
margin-top: 20px;
}
.van-cell__title.van-field__label {
font-weight: bold;
color: rgb(60, 65, 67);
}
.fontSize{
font-size: 10px;
}
}
</style>
/**
* @Description: MBOM顶层更改流程-工作包
* @author xioln
* @date 2022-05-16
* @FilePath: src/views/busniessComponents/workFlowTask/mbomWorkPackageTaskAssignment/index.vue
*/
<template>
<div class="mbom-workPackageTaskAssignment">
<van-row>
<van-col span="24" class="van-col-class">
<van-cell
is-link
v-for="item in cellData"
:key="item.key"
:title="item.title"
>
<template #title>
<van-col span="24">
<b>
{{ item.title }}
</b>
</van-col>
<van-col span="24">
<span class="van-col-span">WP名称</span>
<span>&emsp;&emsp;</span>
<b>{{ item.name }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">批准时间</span>
<span>&emsp;&emsp;</span>
<b>{{ item.no }}</b>
</van-col>
</template>
<template #right-icon>
<van-icon name="arrow" class="search-icon center" />
</template>
</van-cell>
</van-col>
</van-row>
</div>
</template>
<script>
export default {
name: 'MbomWorkPackageTaskAssignment', // name写在组件的最前方,自定义组件为必填
components: {},
data () {
return {
cellData: [
{
name: 'xxxxxx-xxxxx',
title: '标题',
no: '1111111'
},
{
name: 'xxxxxx-xxxxx',
title: '标题',
no: '1111111'
},
{
name: 'xxxxxx-xxxxx',
title: '标题',
no: '1111111'
},
{
name: 'xxxxxx-xxxxx',
title: '标题',
no: '1111111'
}
]
}
},
computed: {},
created () {
// 初始化数据
},
methods: {
}
}
</script>
<style lang='scss' scoped>
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
.van-row .van-col a {
font-size: 14px;
line-height: 14px;
height: 14px;
padding: 20px;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
.right {
text-align: right;
}
.center {
font-size: 20px;
margin-top: calc(12% - 10px);
}
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
.van-col-span {
width: 60px;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
}
</style>
/**
* @Description: 工艺类任务审签-PBOM底层-ECN
* @author xioln
* @date 2022-05-14
* @FilePath: src/views/busniessComponents/workFlowTask/pbomChangeTypeComponent/index.vue
*/
<template>
<div class="pbom-changeTypeComponent">
<van-row>
<van-col span="24" class="van-col-class">
<van-cell
is-link
工艺类任务审签-PBOM底层-ECN v-for="item in cellData.ecns"
:key="item.key"
:title="item.title"
>
<template #title>
<van-col span="24">
<van-tag color="#1989fa" class="van-col-span-left">{{item.state}}</van-tag>
<b class="van-col-span">{{ item.number.label }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span-left">名称</span>
<b class="van-col-span">{{ item.name }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span-left">P顶创建时间</span>
<b class="van-col-span">{{ item.pbomTopCreateTime }}</b>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow" class="search-icon center" /> -->
</template>
</van-cell>
</van-col>
</van-row>
</div>
</template>
<script>
import { getChangeTypeComponent } from '@/api/taskDetail'
export default {
components: {},
// props: {
// basicData: {
// type: Object,
// required: true
// }
// },
data () {
return {
cellData: []
}
},
computed: {},
created () {
// 初始化数据
this.getChangeTypeComponent()
},
methods: {
async getChangeTypeComponent () {
// console.log(this.basicData.items.id)
const params = this.$utils.formDataParams({
// workItemOid: this.basicData.items.id
workItemOid: this.$route.query.id
})
await getChangeTypeComponent(params).then((res) => {
if (res.code === 0) {
this.cellData = res.items
}
})
}
}
}
</script>
<style lang='scss'>
.pbom-changeTypeComponent {
width: 100%;
padding: 0;
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
//右边跳转链接按钮
.center {
font-size: 20px;
margin-top: calc(8% - 10px);
}
//卡片背景及样式
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
//数据span标签
.van-col-span {
/*width: 70px;*/
/*box-sizing: border-box;*/
/*display: inline-block;*/
/*text-align: justify;*/
/*text-align-last: justify;*/
vertical-align: middle; /*保证文字和input框上下是对齐的*/
padding-left: 8px;
}
}
</style>
/**
* @Description:交付规范文档更改任务指派
* @author xioln
* @date 2022-06-21
* @FilePath: src/views/busniessComponents/workFlowTask/pbomDeliverySpecTaskAssignment/index.vue
*/
<template>
<div class="pbom-deliverySpecTaskAssignment">
<van-row>
<van-col v-if="cellData.length !== 0" span="24" class="van-col-class">
<van-cell
is-link
v-for="item in cellData"
:key="item.key"
:title="item.title"
>
<template #title>
<van-col span="24">
<van-tag type="primary">{{item.name}}({{ item.no }})</van-tag>
</van-col>
<van-col span="12">
<van-col class="van-col-span" span="10">版本</van-col>
<van-col span="12" offset="1">{{item.version}}</van-col>
</van-col>
<van-col span="12">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="12" offset="1">{{item.state}}</van-col>
</van-col>
<van-col span="12">
<van-col class="van-col-span" span="10">责任人</van-col>
<van-col span="12" offset="1">{{item.owner}}</van-col>
</van-col>
<van-col span="12">
<van-col class="van-col-span" span="10">供应商</van-col>
<van-col span="12" offset="1">{{item.supplier}}</van-col>
</van-col>
<van-col span="12">
<van-col class="van-col-span" span="10">有效性</van-col>
<van-col span="12" offset="1">{{item.effectiveness}}</van-col>
</van-col>
</template>
<template #right-icon>
<van-icon name="arrow" class="search-icon center"></van-icon>
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</div>
</template>
<script>
export default {
name: 'PbomDeliverySpecTaskAssignment', // name写在组件的最前方,自定义组件为必填
components: {},
data () {
return {
cellData: [
{
no: '10010',
name: '名称',
version: '版本',
state: '状态',
owner: '责任人',
supplier: '供应商',
effectiveness: '有效性',
master: '指派'
}
]
}
},
computed: {},
created () {
// 初始化数据
},
methods: {}
}
</script>
<style lang='scss'>
.pbom-deliverySpecTaskAssignment {
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
.van-row .van-col a {
font-size: 14px;
line-height: 14px;
height: 14px;
padding: 20px;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
.right {
text-align: right;
}
.center {
margin-top: 0;
display: flex;
align-items: center;
}
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
.van-col-span {
// width:95px;
font-weight: bold;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
}
}
</style>
/**
* @Description: pbom任务指派
* @author xioln
* @date 2022-06-12
* @FilePath: src\views\busniessComponents\workFlowTask\pbomLowDataChangeTask\index.vue
*/
<template>
<div class="pbomLow-DataChangeTask">
<van-row>
<van-col span="24">
<van-search
v-model="keywords"
show-action
label="搜索"
placeholder="请输入搜索关键词"
@search="searchWorkItemWorkPackage"
>
<template #action>
<div @click="searchWorkItemWorkPackage">
<van-button plain type="info" size="small">查询</van-button>
</div>
</template>
</van-search>
</van-col>
<van-col span="24">
<div style="display: flex">
<van-field readonly clickable autosize>
<template #input>
<van-tag
v-for="(item, index) in tags"
:key="index"
style="margin: 2px"
closeable
size="mini"
plain
type="primary"
@close="close(item)"
>
{{ item.label }}
</van-tag>
</template>
</van-field>
</div>
</van-col>
<van-col
span="24"
class="van-col-class"
v-if="searchTableData.length !== 0"
>
<van-cell
is-link
v-for="item in uniqueSearchTableData"
:key="item.key"
:title="item.title"
>
<template #title>
<van-col span="24">
<span class="van-col-span-left">编号:</span>
<b class="van-col-span">{{ item.label }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span-left">名称:</span>
<b class="van-col-span">{{ item.name }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span-left">版本:</span>
<b class="van-col-span">{{ item.version }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span-left">状态:</span>
<b class="van-col-span">{{ item.state }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span-left">责任人:</span>
<b class="van-col-span">{{ item.owner }}</b>
</van-col>
</template>
<template #right-icon>
<van-icon
name="plus"
class="search-icon center"
color="#3aa0e9"
@click="cellClick(item)"
/>
</template>
</van-cell>
</van-col>
</van-row>
</div>
</template>
<script>
import { searchWorkItemWorkPackage } from '@/api/taskDetail'
import { Toast } from 'vant'
export default {
name: 'LowDataChangeTask', // name写在组件的最前方,自定义组件为比谈
components: {},
data () {
return {
keywords: '',
searchTableData: [],
tags: []
}
},
computed: {
// 去重
uniqueSearchTableData (arr) {
return this.unique(this.searchTableData)
}
},
created () {
// 初始化数据
},
methods: {
searchWorkItemWorkPackage () {
const parmas = this.$utils.formDataParams({
keywords: this.keywords
})
searchWorkItemWorkPackage(parmas)
.then((res) => {
res.items.map(item => {
this.searchTableData.push(this.setTableData(item))
})
})
.catch((e) => {
console.log(e)
})
},
cellClick (item) {
if (this.tags.some(v => v.label === item.label)) {
Toast({ message: '已经添加', position: 'bottom' })
return
}
this.tags.push(this.setTableData(item))
this.getWorkPackageOid(this.tags)
},
onSearch (v) {
console.log(v)
},
close (item) {
this.tags.map((v, i) => {
if (v.label === item.label) {
this.tags.splice(i, 1) // 删除数组元素
}
})
},
setTableData (item) {
Object.assign(item, item.number)
this.$set(item, 'number', item.label)
this.$set(item, 'show', true)
this.$set(item, 'link', true)
return item
},
// 去重
unique (arr) {
const res = new Map()
return arr.filter((arr) => !res.has(arr.label) && res.set(arr.label, 1))
},
getWorkPackageOid (data) {
const oidList = data.map(item => {
return item.oid
})
this.$emit('transmit', { data: { workPackageTaskAssignmentOids: oidList } })
}
}
}
</script>
<style lang='scss'>
.pbomLow-DataChangeTask {
box-sizing: border-box;
padding: 10px 25px 0 10px;
.van-button {
vertical-align: top;
}
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
//右边跳转链接按钮
.center {
font-size: 20px;
margin-top: calc(8% - 10px);
}
//卡片背景及样式
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #e9f1fd;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 0px 10px;
}
//数据span标签
.van-col-span {
vertical-align: top; /*保证文字和input框上下是对齐的*/
padding-left: 8px;
}
.center {
margin-top: 0;
display: flex;
align-items: center;
border: 1px solid #3aa0e9;
border-radius: 10px;
}
.van-field__control--custom {
flex-wrap: wrap;
}
}
</style>
/**
* @Description: 工艺类任务审签-PBOM底层-签署包
* @author xioln
* @date 2022-05-14
* @FilePath: src/views/busniessComponents/workFlowTask/pbomTreeSearchLink/index.vue
*/
<template>
<div class="pbom-treeSearchLink">
<dee-form v-if="options.length!==0" :form="form" :form-data="formData" :rules="rules" />
<van-cell-group :border="true" :title="title">
<div class="theme-edit-note">
<div class="theme-edit-title">
<van-cell :title="subTitle" />
</div>
<span>
<van-cell class="fontSize" :title="note" />
</span>
</div>
</van-cell-group>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
import { getChangeTypeComponent } from '@/api/taskDetail'
import findVars from '@/components/common/findVars'
export default {
components: { DeeForm },
props: {
basicData: {
type: Object,
required: true
}
},
data () {
return {
title: '签署数据:',
subTitle: '规划工作包',
note: '注:该操作的页面及功能交互复杂,请转至PC端页面操作',
form: {},
formData: [
{
data: [
{
title: '更改类型',
component: {
name: 'el-radio',
disabled: false,
options: []
},
handler: {
change: function (val) {}
}
}
]
}
],
rules: {
radio: [{ required: true, message: '请选择', trigger: 'blur' }]
},
options: [],
parmas: {}
}
},
computed: {},
created () {
if (findVars(this.basicData).pbomTreeSearchLink.includes('审阅工作包')) {
this.subTitle = '审阅工作包'
} else {
// 初始化数据
const parmas = this.$utils.formDataParams({
workItemOid: this.basicData.items.id
})
this.getChangeTypeComponent(parmas)
}
},
methods: {
getChangeTypeComponent (parmas) {
getChangeTypeComponent(parmas).then(res => {
const checkBoxs = res.items.changeType.checkBoxs
checkBoxs.forEach(item => {
this.options.push({ value: item.value, label: item.label, selected: item.selected })
})
this.$set(this.formData[0].data[0].component, 'disabled', !res.items.changeType.editable)
this.$set(this.formData[0].data[0].component, 'options', this.options)
})
}
}
}
</script>
<style lang='scss'>
.pbom-treeSearchLink {
text-align: left;
margin-top: 10px;
.van-cell-group__title {
font-weight: bolder;
color: rgb(60, 65, 67);
padding: 10px 25px;
}
.theme-edit-note {
padding: 5px 10px;
span .van-cell {
color: rgb(225, 0, 0);
}
}
.theme-edit-title .van-cell {
color: #2a75ce;
cursor: pointer;
}
.dee-form {
margin-top: 20px;
}
.van-cell__title.van-field__label {
font-weight: bold;
color: rgb(60, 65, 67);
}
.fontSize{
font-size: 10px;
}
}
</style>
/**
* @Description: 工艺类任务审签-PBOM底层-EO
* @author xioln
* @date 2022-05-14
* @FilePath: src/views/busniessComponents/workFlowTask/pbomUpperChangeOrderComponent/index.vue
*/
<template>
<div class="pbom-upperChangeOrderComponent">
<van-row>
<van-col span="24" class="van-col-class"
v-for="(item,i) in cellData.eos"
:key="i">
<van-tag class="pbom-upperChangeOrderComponent-title" color="#1989fa">
{{item.ecn.number.label }}
</van-tag>
<van-cell
is-link
v-for="(doc,i) in item.docs" :key="i"
>
<template #title>
<van-col span="24">
<b>
{{ doc.eoNumber.label }}
</b>
</van-col>
<van-col span="24">
<span class="van-col-span">名称</span>
<b>{{ doc.name }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">ECN编号</span>
<b>{{ item.ecn.number.label }}</b>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow" class="search-icon center" /> -->
</template>
</van-cell>
</van-col>
</van-row>
</div>
</template>
<script>
import { getChangeTypeComponent } from '@/api/taskDetail'
export default {
components: {},
data () {
return {
cellData: []
}
},
computed: {},
created () {
// 初始化数据
this.getChangeTypeComponent()
},
methods: {
async getChangeTypeComponent () {
// console.log(this.basicData.items.id)
const params = this.$utils.formDataParams({
// workItemOid: this.basicData.items.id
workItemOid: this.$route.query.id
})
await getChangeTypeComponent(params).then((res) => {
if (res.code === 0) {
this.cellData = res.items
}
})
}
}
}
</script>
<style lang='scss'>
.pbom-upperChangeOrderComponent {
width: 100%;
padding: 0;
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
.van-row .van-col a {
font-size: 14px;
line-height: 14px;
height: 14px;
padding: 20px;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
.right {
text-align: right;
}
.center {
font-size: 20px;
margin-top: calc(12% - 10px);
}
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class{
padding: 0px 20px;
}
.van-col-span {
width: 60px;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
padding-right: 8px;
}
.pbom-upperChangeOrderComponent-title{
margin-left: 13px;
}
}
</style>
/**
* @Description:
* @author xioln
* @date 2022-06-11
* @FilePath: src\views\busniessComponents\workFlowTask\pbomWorkPackageTaskAssignment\index.vue
*/
<template>
<div class="demo-page">
xxxxx
</div>
</template>
<script>
export default {
name: '', // name写在组件的最前方,自定义组件为比谈
components: {},
data () {
return {
}
},
computed: {},
created () {
// 初始化数据
},
methods: {
}
}
</script>
<style lang='scss'>
</style>
/**
* @Description: 图档文件分发单位
* @author xioln
* @date 2022-07-20
* @FilePath: src/views/busniessComponents/workFlowTask/setDistributeCompany/index.vue
*/
<template>
<div class="setDistribute-company">
<div class="sub-title">图档文件分发单位</div>
<van-loading v-if="showLoading" type="spinner" size="24px" vertical />
<dee-form
v-if="formData[0].data.length > 0 && !showLoading"
:form="form"
:form-data="formData"
@supplierWithRoleSubmit="handleSubmit"
/>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
import { Notify } from 'vant'
import {
getTechnologyInsideDistribute,
setTechnologyInsideDistributeByWorkItem,
setTechnologySupplierDistributeByWorkItem,
getAllSupplierRouteUnit2AddressBookS,
getTechnologyInsideDistribute4ViewByWorkItem,
getCHSSupplierDistribute4ViewByWorkItem
} from '@/api/taskDetail'
export default {
name: 'SetDistributeCompany', // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
required: true
}
},
components: { DeeForm },
data () {
return {
showLoading: true,
form: {},
formData: [
{
data: [
{
key: 'internal',
title: '内部传阅',
component: {
name: 'el-CheckboxContent',
placeholder: '请选择',
userEcho: [], // 回显
options: []
}
},
{
key: 'supplierIssue',
title: '供应商发放',
component: {
name: 'el-CheckboxContent',
placeholder: '请选择',
userEcho: [], // 回显
options: []
}
}
]
}
],
internalData: [],
supplierIssueData: []
}
},
computed: {},
created () {
// 初始化数据
this.openInternal()
this.openSupplier()
},
methods: {
openInternal () {
getTechnologyInsideDistribute().then((res) => {
if (res.code === 0) {
this.setData(res.items)
this.internalData = res.items
this.getTechnologyInsideDistribute4ViewByWorkItem()
}
})
},
openSupplier () {
getAllSupplierRouteUnit2AddressBookS().then((res) => {
this.formData[0].data[1].component.options = res.items
this.supplierIssueData = Object.values(res.items)
this.getCHSSupplierDistribute4ViewByWorkItem()
})
},
setData (res) {
const data = {}
res.map((res) => {
if (res.checkBoxs) {
data[res.label] = res.checkBoxs
} else {
data[res.label] = [{ label: res.label }]
}
})
this.formData[0].data[0].component.options = data
this.showLoading = false
},
getTechnologyInsideDistribute4ViewByWorkItem () {
getTechnologyInsideDistribute4ViewByWorkItem({
workItemOid: this.basicData.items.id
}).then((res) => {
if (res.code === 0) {
const arrs = res.items?.split(';')
const setArr = []
this.internalData.map((items) => {
if (items.checkBoxs) {
items.checkBoxs.map((item) => {
arrs.map((arr) => {
if (item.label === arr) {
setArr.push(item)
}
})
})
} else {
arrs.map((arr) => {
if (items.label === arr) {
setArr.push(items)
}
})
}
})
this.formData[0].data[0].component.userEcho = this.unique(setArr, 'label')
}
})
},
getCHSSupplierDistribute4ViewByWorkItem () {
getCHSSupplierDistribute4ViewByWorkItem({ workItemOid: this.basicData.items.id }).then(res => {
if (res.items) {
let data = []
const items = res.items.split(';')
items.map((item) => {
this.supplierIssueData.map((x) => {
x.forEach((j) => {
if (item === j.routeDisplay) {
data.push(j)
}
})
})
})
data = this.unique(data, 'code')
this.formData[0].data[1].component.userEcho = data
}
})
},
handleSubmit (res) {
// eslint-disable-next-line no-prototype-builtins
if (res.hasOwnProperty('internal')) {
this.setTechnologyInsideDistributeByWorkItem(Object.keys(res.internal))
}
// eslint-disable-next-line no-prototype-builtins
if (res.hasOwnProperty('supplierIssue')) {
this.setTechnologySupplierDistributeByWorkItem(Object.keys(res.supplierIssue))
}
},
setTechnologyInsideDistributeByWorkItem (val) {
setTechnologyInsideDistributeByWorkItem({
workItemOid: this.basicData.items.id,
insideDistribute: val
}).then((res) => {
Notify({ type: 'success', message: res.message })
})
},
setTechnologySupplierDistributeByWorkItem (val) {
setTechnologySupplierDistributeByWorkItem({
workItemOid: this.basicData.items.id,
supplierDistribute: val
}).then((res) => {
Notify({ type: 'success', message: res.message })
})
},
unique (arr, child) {
for (var i = 0; i < arr.length; i++) {
for (var j = i + 1; j < arr.length; j++) {
if (arr[i][child] === arr[j][child]) {
// 第一个等同于第二个,splice方法删除第二个
arr.splice(j, 1)
j--
}
}
}
return arr
}
}
}
</script>
<style lang='scss' scoped>
.setDistribute-company {
.sub-title {
margin: 15px 0 10px 25px;
}
}
</style>
/**
* @Description: DS实物部件审签-设置消息传阅接收者
* @author xioln
* @date 2022-06-02
* @FilePath: src/views/busniessComponents/workFlowTask/setNoticeRecipient/index.vue
*/
<template>
<div class="bottom-part-signed">
<van-row>
<van-col span="12" class="vertical-center">
<div class="sub-title">设置消息传阅接收者</div>
</van-col>
<van-col span="12" class="vertical-center">
<van-button
plain
icon="chat-o"
type="primary"
size="mini"
color="#258cf7"
@click="sendNoticeByWorkItem"
>
发送消息
</van-button>
<van-button
plain
icon="replay"
type="primary"
size="mini"
color="#258cf7"
@click="replay"
>
刷新
</van-button>
</van-col>
<van-col span="24">
<dee-form
ref="form"
:form="form"
:rules="rules"
:form-data="formData"
@inputChange="inputChange"
@input="getInputData"
/>
</van-col>
<van-col span="24">
<van-cell-group>
<van-cell
v-for="(item, i) in messagePersonList"
:key="i"
:border="false"
>
<template #title>
<span>{{ item.recipient }}</span>
</template>
<template #label>
<span>{{ item.stateState }}</span>
<span class="right">{{ item.receiveTime }}</span>
</template>
</van-cell>
</van-cell-group>
</van-col>
</van-row>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
import { Notify } from 'vant'
import {
getFullName,
getWorkItemNoticeTable,
sendNoticeByWorkItem
} from '@/api/taskDetail'
export default {
props: {
basicData: {
type: Object,
required: true
}
},
components: { DeeForm },
data () {
return {
formData: [
{
split: 1,
// title: '设置消息传阅接收者',
data: [
{
title: '设置接收者',
key: 'setMesssageRecipient',
component: {
name: 'el-selectUser',
multiple: 'multiple',
placeholder: '请选择',
submit: true,
disabled: true,
filterable: true,
remote: true,
options: []
}
}
]
}
],
rules: {},
userOidList: [],
form: {},
isCompleted: false,
messagePersonList: []
}
},
computed: {},
created () {
this.getReceivedNotice()
},
methods: {
inputChange (v) {
if (this.timer) {
return
}
this.timer = setTimeout(() => {
const data = v.setMesssageRecipient
if (data.length >= 2) {
getFullName(data).then((res) => {
if (res.items.length > 0) {
this.formData[0].data[0].component.options.push(
this.packageOptionsData(res.items)
)
}
})
}
this.timer = null
}, 100)
},
getInputData (v) {
this.userOidList = v.userOids
},
// 查重
investigate (arr, b) {
arr.forEach((item) => {
if (item.value === b) {
return false
}
})
return true
},
packageOptionsData (res) {
const obj = {}
// eslint-disable-next-line no-unused-vars
for (const item of res) {
obj.label = item.fullName + '(' + item.name + ')'
obj.value = item.id
}
return obj
},
getReceivedNotice () {
const formData = new FormData()
formData.append('workItemOid', this.basicData.items.id)
getWorkItemNoticeTable(formData)
.then((res) => {
if (res.code === 0) {
this.constructionData(res)
} else {
this.$utils.showMessage(res.message, 'error')
}
})
.catch((e) => {})
},
constructionData (res) {
this.messagePersonList = []
res.items.rows.forEach((item) => {
const obj = {}
item.cells.forEach((x) => {
this.$set(obj, x.key, x.label)
})
this.messagePersonList.push(obj)
})
},
replay () {
this.getReceivedNotice()
},
sendNoticeByWorkItem () {
const formData = new FormData()
formData.append('workItemOid', this.basicData.items.id)
formData.append('recipientOids', this.userOidList.join('|'))
sendNoticeByWorkItem(formData)
.then((res) => {
if (res.code === 0) {
Notify({ type: 'success', message: res.message })
this.getReceivedNotice()
} else {
Notify({ type: 'error', message: res.message })
}
})
.catch((e) => {
Notify({ type: 'error', message: '通知失败,请联系系统管理员!' })
})
}
}
}
</script>
<style lang='scss'>
.bottom-part-signed {
.vertical-center {
display: flex;
align-items: center;
justify-content: center;
height: 25px;
}
.van-row {
padding: 25px;
}
.van-row .van-col {
margin-bottom: 10px;
}
.right {
float: right;
}
.select-input {
border: 1px solid #ebedf0;
}
.low-DataChangeTask .center {
display: flex;
margin-top: 0;
align-items: center;
}
}
</style>
<template>
<div class="set-Partici-pantWithRole">
<div class="sub-title">选择签审人员</div>
<van-loading v-if="showLoading" type="spinner" size="24px" vertical />
<dee-form
v-if="taskParticipationData[0].data.length > 0"
ref="form"
:split="3"
label-width="140px"
:form="form"
:rules="rules"
:form-data="taskParticipationData"
@inputChange="inputChange"
/>
<van-empty
v-if="taskParticipationData[0].data.length <= 0 && !showLoading"
class="custom-image"
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
description="签审人员为空"
/>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
import findVars from '@/components/common/findVars'
import {
getUser,
// getRoleUserTaskForm,
getInstallParticipantConfig,
getFullName
// searchRoleRangeUsesr
} from '@/api/taskDetail'
// import moment from 'moment'
// import { isICDObject } from '../../../../api/home'
export default {
props: {
basicData: {
type: Object,
required: true
}
},
components: { DeeForm },
data () {
return {
taskParticipationData: [
{
split: 1,
title: '',
data: []
}
],
rules: {},
userOption: [],
form: {},
isCompleted: false,
options: [],
roleNames: [],
timer: null,
workflowTemplateName: true,
showLoading: true
}
},
activated () {
// this.showPopover = false
},
watch: {},
created () {
const arr = findVars(this.basicData)
if (arr.extEndForms === 'setParticipantWithVoteRole') {
if (sessionStorage.getItem('checkData')) {
this.getParticipant(sessionStorage.getItem('checkData'))
}
} else {
arr.dynamicForm.map((obj) => {
if (
obj.key === 'setParticipant' ||
obj.key === 'setParticipant4Teach' ||
obj.key === 'setParticipantWithRole' ||
obj.key === 'setParticipant4TeachWithRole'
) {
this.getParticipant(obj.value)
}
})
}
},
mounted () {
this.$bus.$on('checkData', (d) => {
console.log(this.workflowTemplateName)
if (this.workflowTemplateName) {
this.getParticipant(d)
}
})
},
computed: {
},
methods: {
async getParticipant (obj) {
this.showLoading = true
const formData = new FormData()
formData.append('workitemOid', this.basicData.items.id)
formData.append('configKey', obj)
const itemId = this.basicData.items.businessObject.team.id
await getUser(itemId)
.then((x) => {
this.getUserData = x.items
})
.catch((e) => {})
await getInstallParticipantConfig(formData)
.then((res) => {
const filterArr = ['GACE_供应商更改单流程', 'GACE_器材代用流程']
if (filterArr.includes(res.items.workflowTemplateName)) {
this.workflowTemplateName = false
}
const data = []
if (res.message === null) {
this.taskParticipationData[0].data = []
}
const rangeData = res.items.uiRole
const getUserData = this.getUserData
const userEcho = {}
getUserData.forEach((item) => {
rangeData.map((x, index) => {
if (x.roleName === item.roleKey && item.principals.length > 0) {
userEcho[item.roleKey] = []
item.principals.forEach((obj) => {
userEcho[item.roleKey].push({
key: obj.id,
label: `${obj.fullName}(${obj.name})`
})
})
}
})
})
if (res.items.uiRole.length > 0) {
this.roleNames = res.items.uiRole
res.items.uiRole.map((item) => {
data.push({
key: item.roleName,
title: item.roleDisplayName,
component: {
name: 'el-selectUser',
multiple: 'multiple',
submit: true,
placeholder: '请选择',
disabled: this.isCompleted,
required: item.required,
filterable: true,
remote: true,
userEcho: userEcho[item.roleName], // 回显
range: item.range,
options: []
}
})
})
this.initData(data)
this.showLoading = false
}
})
.catch((e) => {
this.showLoading = false
})
},
initData (val) {
this.taskParticipationData[0].data = val
},
getFullName (val) {
const roleNames = this.roleNames
roleNames.forEach((item) => {
if (item.roleName in val) {
const data = val[item.roleName]
if (data.length >= 2) {
getFullName(data).then((res) => {
if (res.items.length > 0) {
this.taskParticipationData[0].data[
this.roleNames.indexOf(item)
].component.options.push(this.packageOptionsData(res.items))
}
})
}
}
})
},
inputChange (val) {
this.debounce(this.getFullName(val))
},
// 查重
investigate (arr, b) {
arr.forEach((item) => {
if (item.value === b) {
return false
}
})
return true
},
packageOptionsData (res) {
const obj = {}
// eslint-disable-next-line no-unused-vars
for (const item of res) {
obj.label = item.fullName + '(' + item.name + ')'
obj.value = item.id
}
return obj
},
inputCheck (val) {
},
// 防抖
debounce (fn, delay = 200) {
let timer = 0
return function () {
// 如果这个函数已经被触发了
if (timer) {
clearTimeout(timer)
}
timer = setTimeout(() => {
fn.apply(this, arguments) // 透传 this和参数
timer = 0
}, delay)
}
}
}
}
</script>
<style lang="scss">
.set-Partici-pantWithRole {
.sub-title {
margin: 15px 0 10px 25px;
}
.custom-image .van-empty__image {
width: 90px;
height: 90px;
}
}
</style>
/**
* @Description: 供应商会签者
* @author xioln
* @date 2022-07-20
* @FilePath: src/views/busniessComponents/workFlowTask/setSupplierWithRole/index.vue
*/
<template>
<div class="set-supplierWithRole">
<div class="sub-title">供应商会签者</div>
<van-loading v-if="showLoading" type="spinner" size="24px" vertical />
<dee-form
v-if="formData[0].data.length > 0 && !showLoading"
:form="form"
:form-data="formData"
@supplierWithRoleSubmit="handleSubmit"
/>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
import { Notify } from 'vant'
import {
getAllSupplierRouteUnit2AddressBookS,
getSupplier,
saveChoiceSupplier
} from '@/api/taskDetail'
export default {
name: 'SetDistributeCompany', // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
required: true
}
},
components: { DeeForm },
data () {
return {
showLoading: true,
supplierCheckboxData: [],
form: {},
formData: [
{
data: [
{
key: 'supplierSign',
title: '供应商会签者',
component: {
name: 'el-CheckboxContent',
placeholder: '请选择',
userEcho: [], // 回显
options: []
}
}
]
}
]
}
},
computed: {},
mounted () {
// 初始化数据
this.openSupplier()
},
methods: {
rebackChoiceSupplier () {
getSupplier({ workItemOid: this.basicData.items.id }).then((res) => {
if (res.items) {
let data = []
res.items.map((item) => {
this.supplierCheckboxData.map((x) => {
x.forEach((j) => {
if (item === j.routeDisplay) {
data.push(j)
}
})
})
})
data = this.unique(data, 'code')
this.formData[0].data[0].component.userEcho = data
}
})
},
openSupplier () {
getAllSupplierRouteUnit2AddressBookS().then((res) => {
if (res.code === 0) {
this.setData(res)
}
})
},
saveChoiceSupplier (val) {
saveChoiceSupplier(this.basicData.items.id, val).then((res) => {
Notify({ type: 'success', message: res.message })
})
},
setData (res) {
this.supplierCheckboxData = Object.values(res.items)
this.rebackChoiceSupplier()
this.formData[0].data[0].component.options = res.items
this.showLoading = false
},
handleSubmit (res) {
this.saveChoiceSupplier(Object.keys(res.supplierSign))
},
unique (arr, child) {
for (var i = 0; i < arr.length; i++) {
for (var j = i + 1; j < arr.length; j++) {
if (arr[i][child] === arr[j][child]) {
// 第一个等同于第二个,splice方法删除第二个
arr.splice(j, 1)
j--
}
}
}
return arr
}
}
}
</script>
<style lang='scss' scoped>
.set-supplierWithRole {
.sub-title {
margin: 15px 0 10px 25px;
}
}
</style>
/**
* @Description:EO文件
* @author xioln
* @date 2022-05-16
* @FilePath: src/views/busniessComponents/workFlowTask/showTree/index.vue
*/
<template>
<div class="show-tree">
<van-row>
<van-col v-if="cellData.length !== 0" span="24" class="van-col-class">
<van-cell
is-link
v-for="item in cellData"
:key="item.key"
:title="item.title"
>
<template #title>
<van-col span="24">
<van-tag type="primary">{{ item.name }}</van-tag>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">WP名称</van-col>
<van-col span="12" offset="1">{{ item.wpName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">WP更改批准时间</van-col>
<van-col span="12" offset="1">{{ item.wpLasterTime }}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow" class="search-icon center" /> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</div>
</template>
<script>
export default {
data () {
return {
cellData: []
}
},
computed: {},
created () {
// 初始化数据
},
methods: {}
}
</script>
<style lang='scss'>
.show-tree {
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
.van-row .van-col a {
font-size: 14px;
line-height: 14px;
height: 14px;
padding: 20px;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
.right {
text-align: right;
}
.center {
margin-top: 0;
display: flex;
align-items: center;
}
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
.van-col-span {
// width:95px;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
}
}
</style>
/**
* @Description: 签署文档列表
* @author xioln
* @date 2022-07-11
* @FilePath: src/views/busniessComponents/workFlowTask/signedDocumentTable/index.vue
*/
<template>
<div class="signed-document-table">
<van-row>
<van-col v-if="data.length !== 0" span="24" class="van-col-class">
<van-cell is-link v-for="item in data" :key="item.oid" @click="cellClick(item)">
<template #title>
<van-col span="24">
<van-col class="van-col-span" span="8">文档编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="8">文档名称</van-col>
<van-col span="14" offset="1">{{ item.docName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="8">文档版本</van-col>
<van-col span="14" offset="1">{{ item.docVersion }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="8">状态</van-col>
<van-col span="14" offset="1">{{ item.state }}</van-col>
</van-col>
</template>
<template #right-icon>
<van-icon name="arrow" class="search-icon center" />
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</div>
</template>
<script>
import { getSignedDocuments } from '@/api/taskDetail'
import moment from 'moment'
export default {
name: 'SignedDocumentTable', // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
required: true
}
},
components: {},
data () {
return {
data: []
}
},
computed: {},
created () {
// 初始化数据
this.getSignedDocuments()
},
methods: {
getSignedDocuments () {
if (!this.basicData.items) return
this.isFirst = false
getSignedDocuments({
workItemOid: this.basicData.items ? this.basicData.items.id : ''
})
.then((res) => {
console.log('getReceiveDocumentsByOid', res)
this.constructionData(res)
})
.catch((e) => {
this.$utils.showMessage(
'获取签署文档列表失败,请联系系统管理员',
'error'
)
})
},
constructionData (res) {
this.data = []
res.items.rows.forEach((item) => {
const obj = {}
item.cells.forEach((x) => {
// eslint-disable-next-line no-prototype-builtins
if (x.hasOwnProperty('link')) {
this.$set(obj, x.key, x.link.label)
this.$set(obj, 'oid', x.link.oid)
if (x.name === 'docNumber') {
this.$set(obj, 'number', x.link.label)
}
} else {
this.$set(obj, x.key, x.label)
}
this.$set(obj, 'link', true)
this.$set(obj, 'show', true)
})
this.data.push(obj)
})
},
cellClick (item) {
const id = item.oid
const dxClassName = 'com.yonde.platform.entity.pdm.doc.DxDocument'
const subTypeName = 'com.yonde.platform.entity.pdm.doc.DxDocument'
this.$router.push({
path: `/bomTreeDetail-${id}`,
query: {
oid: id,
title: '签署文档',
subTypeName: subTypeName,
dxClassName: dxClassName,
time: moment().valueOf()
}
})
}
}
}
</script>
<style lang='scss' scoped>
.signed-document-table {
.van-cell__title {
margin-right: 30px;
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
.van-col-span {
// width:95px;
font-weight: bold;
box-sizing: border-box;
display: inline-block;
text-align: justify;
text-align-last: justify;
vertical-align: middle; /*保证文字和input框上下是对齐的*/
}
.center {
margin-top: 0;
display: flex;
align-items: center;
}
}
</style>
/**
* @Description: ECN提交审签-复杂数据类签
* @author xioln
* @date 2022-05-12
* @FilePath: src/views/busniessComponents/workFlowTask/subECNMonitorTable/index.vue
*/
<template>
<div class="sub-ECNMonitorTable">
<div class="sub-title">ECN实施状态</div>
<van-row>
<van-col span="12" class="sub-content">
<a href="javascript:;">更改基线</a>
</van-col>
<van-col span="12" class="sub-content">
<a href="javascript:;">数据发放</a>
</van-col>
<van-col span="24" class="sub-content">
<span class="prompt-text">
{{ msg }}
</span>
</van-col>
<van-col v-if="cellData.length" class="van-col-class" span="24">
<van-cell is-link v-for="(item, i) in cellData" :key="i" @click="cellClick(item)">
<template #title>
<van-col span="24">
子ECN: <b>{{ item.number.label }}</b>
<van-tag color="#1989fa" class="right">{{
item.creator
}}</van-tag>
</van-col>
<van-col span="24" class="left">
相关部件:<b :key="i" v-for="(val, i) in item.objects"
><span
>{{ val.label }}<span v-show="i + 1 < val.len">,</span></span
></b
>
<van-tag color="#1989fa" class="right">{{ item.state }}</van-tag>
</van-col>
<van-col span="24">
有效性前: <b>{{ item.changeBeforeEff }}</b>
<van-tag color="#1989fa" class="right">{{
item.provideState
}}</van-tag>
</van-col>
<van-col span="24">
有效性后: <b>{{ item.changeBeforeEff }}</b>
<van-tag color="#1989fa" class="right">{{
item.baselineState
}}</van-tag>
</van-col>
</template>
<template #right-icon>
<van-icon name="arrow" class="search-icon center" />
</template>
</van-cell>
</van-col>
<van-col v-else class="van-col-class" span="24">
<van-empty description="ECN实时状态为空" />
</van-col>
</van-row>
</div>
</template>
<script>
import { getSubECNState } from '@/api/taskDetail'
import moment from 'moment'
export default {
// props: {
// basicData: {
// type: Object,
// required: true
// }
// },
components: {},
data () {
return {
msg: '注:该操作的页面及功能交互复杂,请转至PC端页面操作',
cellData: []
}
},
computed: {},
created () {
// 初始化数据
this.getSubECNStateData()
},
methods: {
async getSubECNStateData () {
const params = this.$utils.formDataParams({
// oid: this.basicData.items.id
oid: this.$route.query.id
})
await getSubECNState(params).then((res) => {
if (res.code === 0) {
this.cellData = res.items.map((item) => {
this.$set(item, 'creator', item.creator.split('(')[0])
return item
})
}
})
},
cellClick (item) {
const id = item?.objects[0]?.oid
this.$router.push({
path: `/bomTreeDetail-${id}`,
query: {
oid: id,
title: 'EBOM', // 子ECN详情
subTypeName: '',
dxClassname: '',
time: moment().valueOf()
}
})
}
}
}
</script>
<style lang='scss' scoped>
.sub-ECNMonitorTable {
width: 100%;
padding: 0;
.sub-title {
font-size: 14px;
font-weight: bold;
padding: 10px 25px;
}
.van-row {
width: 100%;
}
.sub-content {
text-align: center;
}
.van-row .van-col a {
font-size: 14px;
line-height: 14px;
height: 14px;
padding: 20px;
}
a:link {
text-decoration: blink;
color: rgba(24, 113, 249, 0.8);
}
a:active {
text-decoration: blink;
}
a:hover {
text-decoration: underline;
color: red;
}
a:visited {
text-decoration: none;
color: green;
}
.prompt-text {
font-size: 12px;
color: red;
// background: ;
padding: 20px 10px;
}
.right {
float: right;
}
.van-cell__title {
margin-right: 30px;
/*.right .van-col van-col--24{*/
/* display: inline;*/
/*}*/
.van-col--24 {
width: 107%;
.van-tag {
width: 19%;
}
}
}
.van-col-class .van-cell {
background: #f5f9fc;
margin-bottom: 10px;
border-radius: 8px;
font-size: 12px;
}
.van-col-class {
padding: 20px;
}
.center {
margin-top: 0;
display: flex;
align-items: center;
}
}
</style>
<template>
<div class="task-basic-info">
<dee-form :form="form" :form-data="formData" />
</div>
</template>
<script>
import DeeForm from '../../../../components/form/form'
import moment from 'moment'
// import { isICDObject } from '../../../../api/home'
export default {
props: {
basicData: {
type: Object,
required: true
}
},
components: { DeeForm },
data () {
return {
form: {},
formItemData: []
}
},
watch: {
basicData: {
handler: function (val) {
this.initData(val)
}
},
'$route.query.time': (val) => {
if (val !== moment().valueOf()) this.$forceUpdate()
}
},
created () {
// if (this.basicData) this.initData(this.basicData)
},
mounted () {},
computed: {
formData () {
return [{ title: '基本信息', data: this.formItemData }]
}
},
methods: {
initData (x) {
const formItemData = []
const form = {}
// formItemData.push({
// title: '主题',
// key: 'theme',
// component: {
// name: 'Link'
// }
// })
// this.$set(form, 'theme', '流程主题' || '')
// formItemData.push({
// title: '工作负责人',
// key: 'workLeader',
// component: { name: 'readable' }
// })
// // eslint-disable-next-line no-mixed-operators
// form.workLeader =
// (x.items.owner && `${x.items.owner.fullName}(${x.items.owner.name})`) ||
// ''
// formItemData.push({
// title: '流程启动者',
// key: 'name',
// component: { name: 'readable' }
// })
// form.name = '流程启动者' || ''
if (x.detailInfo) {
const subTypeName = x.detailInfo.subTypeName && x.detailInfo.subTypeName.split('___')[1]
const number = x.detailInfo.number && '-' + x.detailInfo.number
const name = x.detailInfo.name && ',' + x.detailInfo.name
const versionId = x.detailInfo.versionId && ',' + x.detailInfo.versionId
const iterationId = x.detailInfo.iterationId && '.' + x.detailInfo.iterationId
// const state = x.detailInfo.state && '(' + x.detailInfo.state.display + ')'
const subject = (subTypeName + number + name + versionId + iterationId).replace(/null/g, '')
formItemData.push({
title: '主题',
key: 'theme',
component: {
name: 'Link',
url: `/bomTreeDetail-${x.items.businessObject.id}`,
oid: x.items.businessObject.id,
subTypeName: x.items.businessObject.subTypeName,
dxClassName: x.items.businessObject.dxClassname,
title: x?.detailInfo.number
}
})
this.$set(form, 'theme', subject || '')
}
if (x.items) {
formItemData.push({ title: '工作负责人', key: 'workLeader', component: { name: 'readable' } })
// eslint-disable-next-line no-mixed-operators
form.workLeader = x.items.owner && `${x.items.owner.fullName}(${x.items.owner.name})` || ''
if (x.detailInfo) {
let name = ''
// eslint-disable-next-line no-prototype-builtins
if (x.items.processCreator && x.items.processCreator.hasOwnProperty('name')) {
name = `${x.items.processCreator.fullName}(${x.items.processCreator.name})`
}
formItemData.push({ title: '流程启动者', key: 'name', component: { name: 'readable' } })
form.name = name || ''
if (x.detailInfo.TASKDESCRIPTION) {
formItemData.push({ title: '任务说明', key: 'taskDescription', component: { name: 'readable' } })
// eslint-disable-next-line no-mixed-operators
form.taskDescription = x.detailInfo && x.detailInfo.TASKDESCRIPTION || ''
}
}
x.items.variables.forEach(x => {
if (x.name === 'errorMSG') {
formItemData.push({ title: '错误信息', key: 'errorMSG', component: { name: 'readable' } })
form.errorMSG = x.value || ''
}
})
}
this.formItemData = formItemData
this.$set(this, 'form', form)
}
}
}
</script>
<style lang="scss">
.task-basic-info {
// .van-field__body span {
// width: 100%;
// text-align: right;
// }
.vanLink .content[data-v-1e062e82] {
text-align: right;
width: 100%;
}
.van-field__control {
text-align: right;
}
}
</style>
......@@ -10,9 +10,7 @@
>
重新指派
</van-button>
<van-button type="info" size="small" round @click="finishTask"
>完成任务</van-button
>
<van-button type="info" size="small" round @click="finishTask">完成任务</van-button>
</div>
</template>
<script>
......
......@@ -18,7 +18,7 @@
</van-cell>
</van-col>
<van-col v-if="!checked" span="24">
<set-participant-with-role :basic-data="basicData" />
<!-- <set-participant-with-role :basic-data="basicData" /> -->
</van-col>
<van-col v-else span="24">
<div class="sub-title">
......@@ -41,12 +41,12 @@
</template>
<script>
import { getOnlyDistribute, updatePrimaryContent, getPrimaryContentLink, setOnlyDistribute } from '@/api/taskDetail'
import SetParticipantWithRole from '@/views/busniessComponents/workFlowTask/setParticipantWithRole/index.vue'
// import SetParticipantWithRole from '@/views/busniessComponents/workFlowTask/setParticipantWithRole/index.vue'
import { post } from '@/utils/http'
export default {
name: 'TempleteNumberWriteTable', // name写在组件的最前方,自定义组件为必填
components: { SetParticipantWithRole },
components: { },
props: {
basicData: {
type: Object,
......
This diff is collapsed.
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