Commit 3f1639b1 authored by ztf's avatar ztf

添加自定义组件

parent 24287eb6
import { post, get, put } from '../utils/http'
// export function login(data) {
// return post('/api/users/auth/login', data)
// }
// ?account=root&password=i
// export function login(data) {
// return post(`/workflow/user/auth/login?account=${data.account}&password=${data.password}`)
// }
export function login(data) {
return post('/DxUserAccount/auth/login', data, true)
// return post('/login', data)
// return post('/workflow/login', data)
}
// export function logout() {
// return post('/api/users/auth/logout')
// }
export function logout(params, userAction = true) {
return post('/DxUserAccount/auth/logout', params, userAction)
// return post('/logout?account=' + params[0], params)
}
// export function logout(params) {
// return post('/client/user/logout/' + params[0], params)
// }
// 获取部件单位字典清单
export function getUnitParts() {
return get('/api/systems/units/parts')
}
// 获取用户身份列表
export function getIdentList(params) {
return get('/UserAccount/getCurrentAccountRole', params)
}
// 切换用户身份信息
export function putAccountRole(params) {
return put('/UserAccount/selectAccountRole', params)
}
// 查询所有用户列表
export function getAllUsers(params) {
return post('/DxUserInfo/find/recursion', params)
}
// 修改密码
export function modifyPassword(params) {
return post('/UserAccount/modifyPassword', params, true)
}
export function getUserGroup() {
return post('/User/getUserOrg/')
}
// 通过用户名或账号模糊匹配查询存在账号的用户
export function getUsersByAccount(params) {
return get('/DxUserInfo/byAccount', params)
}
export function getFuzzyMatchUser(value) {
return post('/AuditLog/fuzzyMatchUser?value=' + value)
}
export function setUserTheme(theme) {
return post('/userTheme/collect?theme=' + theme, null, true)
}
export function getUserTheme() {
return get('/userTheme/findCollections')
}
export function getSecretMatrix() {
return get('/SecretCodeMatrix/getSecretMatrix')
}
export function getUserRole(userId) {
return get('/perm/Role/getUserRoleVO?userId=' + userId)
}
export function fetchFuzzyMatchUser(params) {
return post('/AuditLog/fuzzyMatchUser?' + params)
}
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-13 16:53:02
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-08-13 16:55:03
-->
<template>
<div class="ExtApplicantInternalInterfaceAddlist">
<dee-as-com
class="FeatureTypicalcom"
:lay-config="{
typeName: 'ExtApplicant',
layKey: 'addContributors-InternalInterfaceApplication-AddList'
}"
@selectionChange="selectionChange"
/>
<div class="btns">
<el-button type="primary" class="submitBTN" :disabled="!isDisable" @click="tosubmit">确定</el-button>
<el-button type="primary" @click="$emit('cancel')">取消</el-button>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ExtApplicantInternalInterfaceAddlist',
componentName: '新增提资方-内部接口申请单-添加',
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
selections: []
}
},
computed: {
isDisable() {
return Boolean(this.selections.length)
}
},
mounted() {
},
methods: {
selectionChange(data) {
this.selections = data
},
tosubmit() {
const source = this.$parent.$parent.$parent.$parent.basicData
const params = this.selections.map(r => {
return {
source: source,
operator: 'ADD',
target: r
}
})
post('ExtContractLink/recursions', params).then(res => {
this.$emit('completeEven')
})
}
}
}
</script>
<style lang='scss' scoped>
.ExtApplicantInternalInterfaceAddlist{
height: 80%;
.FeatureTypicalcom{
height: calc(100% - 50px);
}
.btns{
margin-top: 20px;
display: flex;
justify-content: center;
.submitBTN{
margin-right: 25px;
}
}
}
</style>
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-13 16:59:49
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-08-13 17:08:50
-->
<template>
<div class="ExtInterfaceInformingChangeAddlist">
<dee-as-com
class="FeatureTypicalcom"
:lay-config="{
typeName: 'ExtInterface',
layKey: 'InformingChange-Addlist'
}"
@selectionChange="selectionChange"
/>
<div class="btns">
<el-button type="primary" class="submitBTN" :disabled="!isDisable" @click="tosubmit">确定</el-button>
<el-button type="primary" @click="$emit('cancel')">取消</el-button>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ExtInterfaceInformingChangeAddlist',
componentName: '接口单-提资更改-内部接口单-添加',
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
selections: []
}
},
computed: {
isDisable() {
return Boolean(this.selections.length)
}
},
mounted() {
},
methods: {
selectionChange(data) {
this.selections = data
},
tosubmit() {
const source = this.$parent.$parent.$parent.$parent.basicData
const params = this.selections.map(r => {
return {
source: source,
operator: 'ADD',
target: r
}
})
post('ExtContractLink/recursions', params).then(res => {
this.$emit('completeEven')
})
}
}
}
</script>
<style lang='scss' scoped>
.ExtInterfaceInformingChangeAddlist{
height: 80%;
.FeatureTypicalcom{
height: calc(100% - 50px);
}
.btns{
margin-top: 20px;
display: flex;
justify-content: center;
.submitBTN{
margin-right: 25px;
}
}
}
</style>
<!-- 相关接口单添加
<template>
<dee-add-model-case-dialog
:show-sub-type="true"
width="60%"
title="添加"
:show-dialog="addDialog"
model-name="DxDocument"
search-attr="number,name"
:default-data="{latest:'LATEST',modelName: 'DxDocument',state:'published'}"
@close="addDialog= false"
@selection="addLinks"
/>
</template>
<script>
export default {
name: 'ExtRelatedInterfaceLinkAdd',
componentName: '相关接口单-添加',
components: {},
props: {
dialogShow: {
type: Boolean,
default: false
},
obj: {
type: Object,
default: () => {}
},
pageData: {
type: Object,
default: () => {}
}
},
data() {
return {
// defaultData: {
// latest: '',
// modelName: 'DxDocument'
// },
// latestOptions: [
// { value: '', label: '全部' },
// { value: 'LATEST', label: '最新' },
// { value: 'VERSION_NEWEST', label: '修订' }
// ]
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
selection(rows) {
this.$emit('add', rows)
this.$emit('close')
},
cancel() {
this.$emit('close')
}
}
}
</script>
<style lang='scss' scoped>
</style> -->
<template>
<!-- <dee-add-model-case-dialog
:show-sub-type="true"
width="70%"
title="添加对象"
:show-dialog="dialogShow"
:latest-options="latestOptions"
:default-data="defaultData"
@close="$emit('close')"
@selection="selection"
/> -->
<!-- width="70%"
title="添加"
:show-dialog="addDialog" -->
<div>相关接口单添加
<dee-add-model-case-dialog
:show-sub-type="true"
model-name="DxDocument"
search-attr="number,name"
:default-data="defaultData"
@close="$emit('close')"
@selection="selection"
/>
</div>
</template>
<script>
export default {
name: 'ExtRelatedInterfaceLinkAdd',
componentName: '相关接口单-添加',
components: {},
props: {
addDialog: {
type: Boolean,
default: false
},
obj: {
type: Object,
default: () => {}
},
pageData: {
type: Object,
default: () => {}
}
},
data() {
return {
defaultData: {
latest: '',
modelName: 'DxDocument'
}
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
selection(rows) {
this.$emit('add', rows)
this.$emit('close')
},
cancel() {
this.$emit('close')
}
}
}
</script>
<style lang="scss"></style>
<!-- 提资信息-附件 --> <!-- 提资信息-附件 -->
<template> <template>
<span> <span class="InterfaceInfoObjFileLinks">
<el-button v-show="showAdd" type="text" @click.stop="btnClick">操作</el-button> <el-button type="text" @click.stop="btnClick">操作</el-button>
<dee-dialog
:dialog-visible="dialogVisible"
title="附件"
@handleClose="handleClickCancel"
>
<dee-as-com
:basic-data="basicData"
class="ObjFileLinks"
:lay-config="{
typeName: 'ExtInforming',
layKey: 'objFileLinksEdit'
}"
/>
<span style="display:flex;justify-content: center;">
<el-button type="primary" class="submitBTN" :disabled="!isDisable" @click="tosubmit">提交</el-button>
<el-button type="primary" @click="handleClickCancel">取消</el-button>
</span>
</dee-dialog>
<el-dropdown> <el-dropdown>
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<el-button v-show="files.length" type="text">{{ `查看(${files.length})` }}</el-button> <el-button v-show="files.length" type="text">{{ `查看(${files.length})` }}</el-button>
...@@ -20,6 +38,7 @@ ...@@ -20,6 +38,7 @@
<script> <script>
import _get from 'lodash.get' import _get from 'lodash.get'
import { post } from '@/utils/http'
import { downFileByFileCode, downFileByFileId } from '@/api/file' import { downFileByFileCode, downFileByFileId } from '@/api/file'
export default { export default {
name: 'InterfaceInfoObjFileLinks', name: 'InterfaceInfoObjFileLinks',
...@@ -32,17 +51,18 @@ export default { ...@@ -32,17 +51,18 @@ export default {
filterKey: { filterKey: {
type: String, type: String,
default: () => '' default: () => ''
},
showAdd: {
type: Boolean,
default: false
} }
}, },
data() { data() {
return {} return {
dialogVisible: false,
selections: []
}
}, },
computed: { computed: {
isDisable() {
return Boolean(this.files.length)
},
files() { files() {
if (!this.scope || !this.scope.row || !this.scope.column) { if (!this.scope || !this.scope.row || !this.scope.column) {
return [] return []
...@@ -64,7 +84,8 @@ export default { ...@@ -64,7 +84,8 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
btnClick(row) { btnClick(row) {
this.$emit('clickRowFun', this.scope, { btnvalue: 'objFileLinks' }) this.dialogVisible = true
// this.$emit('clickRowFun', this.scope, { btnvalue: 'objFileLinks' })
}, },
downloadFile(file) { downloadFile(file) {
if (!file.fileCode && !file.resourceId) { if (!file.fileCode && !file.resourceId) {
...@@ -101,6 +122,21 @@ export default { ...@@ -101,6 +122,21 @@ export default {
this.$utils.showMessageWarning(message || '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!') this.$utils.showMessageWarning(message || '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!')
} }
} }
},
handleClickCancel() {
this.dialogVisible = false
},
tosubmit() {
const params = {
// id: form.id,
// objFileLinks: form.objFileLinks,
operator: 'NO_CHANGE'
}
post('Informing/recursion', params).then((res) => {
// this.$emit('completeEven')
this.dialogVisible = false
})
} }
} }
} }
......
<template>
<div class="dee-model">
<span v-if="readOnly">
{{ showValue||'' }}
</span>
<div v-else>
<el-input
v-if="foreign==='ExtContactList'"
v-model="proposedUnit"
/>
<!-- 下拉框 -->
<el-select
v-else-if="foreign==='InterContactList'"
v-model="proposedUnit"
clearable
multiple
@change="change"
>
<el-option
v-for="item in proposedUnitList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ProposedUnit',
componentName: '提出单位',
props: {
form: {
type: Object,
default: null
},
scope: {
type: Object,
default: null
},
disabled: {
type: Boolean,
default: false
},
readOnly: {
type: Boolean,
default: false
},
value: {
type: [String, Object, Array],
default: () => ''
}
},
data() {
return {
proposedUnitList: [], // 提出单位列表
proposedUnit: ''// 提出单位
}
},
computed: {
showValue() {
console.log('readOnly', this.readOnly)
console.log('操作value', this.value)
console.log('监听value之后赋值', this.proposedUnit)
if (!this.proposedUnit) {
return ''
}
if (this.proposedUnit instanceof Array) {
return this.proposedUnit.join()
}
return this.proposedUnit
},
foreign() {
if (!this.form || !this.form.dynamicAttrs || !this.form.dynamicAttrs.type) {
return ''
}
return this.form.dynamicAttrs.type
}
},
watch: {
'form.dynamicAttrs.type'(val, oldVal) {
if (val === 'InterContactList') {
this.$emit('input', '')
// this.getProposedUnitList()
} else {
this.$emit('input', '清华大学核研院')
}
},
'value'(val, oldVal) {
if (val) {
this.proposedUnit = val
}
}
},
// 生命周期 - 创建完成(访问当前this实例)
created() {},
// 生命周期 - 挂载完成(访问DOM元素)
mounted() {},
methods: {
change(val) {
this.$emit('input', val)
},
// 获取外单位列表
getProposedUnitList() {
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'items': [],
'operator': 'AND'
}
}
post('/Organization/nodes', params).then(res => {
const org = res.items.find(r => r.orgCode === '002')
if (!org || !org.children) {
this.proposedUnitList = []
return
}
this.proposedUnitList = org.children.map(row => ({
value: row.orgName,
label: row.orgName
}))
})
}
}
}
</script>
<style lang="scss">
/* @import url(); 引入css类 */
</style>
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-05 11:16:27
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-08-13 09:53:37
-->
<template> <template>
<div> <div>
<!-- 下拉框 --> <!-- 下拉框 -->
...@@ -51,7 +57,7 @@ export default { ...@@ -51,7 +57,7 @@ export default {
}) })
}, },
handleChange(val) { handleChange(val) {
this.$emit('input', this.value) this.$emit('input', val)
} }
} }
} }
......
<template>
<div class="user-select-com">
<el-select v-model="cloneValue" :value-key="valueKey" :disabled="disabled" :size="size" clearable filterable :remote="isRemote ? true : false" :remote-method="remoteMethod" @change="change">
<el-option
v-for="n in userListOptions"
:key="n.value"
:label="n.label"
:value="valueKey ? n.data : n.value"
/>
</el-select>
</div>
</template>
<script>
import { getAllUsers, getUsersByAccount } from '@/api/user'
import _get from 'lodash.get'
export default {
name: 'DxUserSelect',
componentName: '选择用户',
// modelRelationObjs: ['DxUser'],
components: { },
props: {
searchItems: {
type: Array,
default: () => []
},
user: {
type: [Number, String, Object],
default: ''
},
value: {
type: [Number, String, Object],
default: ''
},
disabled: {
type: Boolean,
default: false
},
isRemote: {
type: Boolean,
default: true
},
size: {
type: String,
default: () => ''
},
inputAttr: {
type: String,
default: () => 'value'
},
valueKey: {
type: String,
default: () => ''
}
},
data() {
return {
cloneValue: '',
userListOptions: []
}
},
computed: {
},
watch: {
user(val) {
if (val) {
this.cloneValue = this.getValue(val)
}
},
value: {
immediate: true,
handler(val) {
if (val) {
let cloneValue = this.getValue(this.value)
let userIds = cloneValue
if (this.valueKey) {
cloneValue = val
userIds = [val.id]
}
this.cloneValue = cloneValue
this.getUsers(this.valueKey ? userIds : [userIds])
} else {
this.cloneValue = ''
this.change('')
}
} }
},
mounted() {
},
methods: {
getValue(val) {
return Object.prototype.toString.call(val) === '[object Object]' ? (val.id ? Number(val.id) : '') : Number(val)
},
getUsers(userArr) {
const params = {
'indices': [
'USERS'
],
'pageFrom': 1,
'pageSize': 9999,
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'searchItems': {
'operator': 'AND',
'items': this.searchItems.length ? this.searchItems : []
}
}
if (userArr && userArr.length) {
params.searchItems.children = [
{
'items': [
{
'fieldName': 'id',
'operator': 'IN',
'value': userArr
}
]
}
]
}
getAllUsers(params).then(res => {
if (res.items && res.items.content) {
this.userListOptions = res.items.content.map(n => {
return {
label: `${n.userName}`,
value: n.id,
data: n
}
})
} else {
this.userListOptions = []
}
if (userArr && userArr.length) {
this.change(this.cloneValue)
}
})
},
remoteMethod(query) {
if (query.length > 1) {
const params = {
userAccount: query.trim()
}
getUsersByAccount(params).then(res => {
if (res.items) {
this.userListOptions = res.items.map(item => {
return {
label: item.userName + '(' + item.userAccount + ')',
value: item.id,
data: item
}
}).filter(r => r)
}
})
}
},
change(val) {
if (this.valueKey) {
this.$emit('getUser', val)
this.$emit('input', val)
} else {
const item = this.userListOptions.find(r => {
return r.value === val
})
this.$emit('getUser', item && item.data)
if (this.inputAttr) {
this.$emit('input', item ? _get(item, this.inputAttr) : '')
}
}
}
}
}
</script>
<style lang="scss" >
.user-select-com{
.el-form-item{
margin-bottom:22px!important;
}
}
</style>
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-13 16:59:49
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-08-14 10:41:04
-->
<template>
<div class="TerminateInternalInterface">
<div class="message">您确定终止下列内部接口单?</div>
<dee-as-com
class="FeatureTypicalcom"
:lay-config="{
typeName: 'ExtInterface',
layKey: 'Terminate-internalInterface'
}"
@selectionChange="selectionChange"
/>
<div class="btns">
<el-button type="primary" class="submitBTN" :disabled="!isDisable" @click="tosubmit">确定</el-button>
<el-button type="primary" @click="$emit('cancel')">取消</el-button>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'TerminateInternalInterface',
componentName: '接口单-终止',
props: {
basicData: {
type: Object,
default: () => { }
}
},
data() {
return {
selections: []
}
},
computed: {
isDisable() {
return Boolean(this.selections.length)
}
},
mounted() {
},
methods: {
selectionChange(data) {
this.selections = data
},
tosubmit() {
const source = this.$parent.$parent.$parent.$parent.basicData
const params = this.selections.map(r => {
return {
source: source,
operator: 'ADD',
target: r
}
})
post('ExtAuditObject/recursions', params).then(res => {
this.$emit('completeEven')
})
}
}
}
</script>
<style lang='scss' scoped>
.TerminateInternalInterface {
height: 80%;
.message{
text-align: center;
}
.FeatureTypicalcom {
height: calc(100% - 50px);
}
.btns {
margin-top: 20px;
display: flex;
justify-content: center;
.submitBTN {
margin-right: 25px;
}
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com * @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-07-31 15:11:47 * @Date: 2024-07-31 15:11:47
* @LastEditors: zhangtianfeng 3232807530@qq.com * @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-07-31 15:13:41 * @LastEditTime: 2024-08-12 15:37:19
--> -->
<template> <template>
<dee-form <dee-form
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
:form-buttons="formButtons" :form-buttons="formButtons"
form-btn-position="center" form-btn-position="center"
@on-submit="submit" @on-submit="submit"
@on-cancel="close" @on-cancel="cancel"
/> />
</template> </template>
...@@ -22,15 +22,7 @@ export default { ...@@ -22,15 +22,7 @@ export default {
name: 'EditECR', name: 'EditECR',
componentName: '详情按钮-编辑ECR', componentName: '详情按钮-编辑ECR',
props: { props: {
dialogShow: { basicData: {
type: Boolean,
default: () => false
},
node: {
type: Object,
default: () => {}
},
editObj: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
...@@ -99,11 +91,11 @@ export default { ...@@ -99,11 +91,11 @@ export default {
} }
}, },
watch: { watch: {
dialogShow: { basicData: {
immediate: true, immediate: true,
handler: function(flag) { handler: function(flag) {
if (flag) { if (flag && flag.versionId) {
this.init() this.getData()
} else { } else {
this.clear() this.clear()
} }
...@@ -119,27 +111,22 @@ export default { ...@@ -119,27 +111,22 @@ export default {
if (this.loading) { if (this.loading) {
return return
} }
this.loading = true // this.loading = true
this.ecrApi.save(this.form).then(res => { this.ecrApi.save(this.form).then(res => {
this.$emit('close') this.$emit('cancel')
}).filnally(() => { }).filnally(() => {
this.loading = false this.loading = false
}) })
}, },
close() { cancel() {
this.$emit('close') this.$emit('cancel')
},
init() {
if (this.node && this.node.versionId) {
this.getData()
}
}, },
getData() { getData() {
this.loading = true this.loading = true
const customSearchItems = { data: { items: [{ const customSearchItems = { data: { items: [{
fieldName: 'targetId', fieldName: 'targetId',
operator: 'EQ', operator: 'EQ',
value: this.node.versionId value: this.basicData.versionId
}] }} }] }}
this.ecrLinkApi this.ecrLinkApi
.openProp(['source']) .openProp(['source'])
...@@ -152,7 +139,7 @@ export default { ...@@ -152,7 +139,7 @@ export default {
} }
} else { } else {
this.$utils.showMessageWarning('未找到相关ECR!') this.$utils.showMessageWarning('未找到相关ECR!')
this.close() this.cancel()
} }
this.loading = false this.loading = false
}).catch(() => { }).catch(() => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com * @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-07-31 14:50:38 * @Date: 2024-07-31 14:50:38
* @LastEditors: zhangtianfeng 3232807530@qq.com * @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-07-31 15:06:17 * @LastEditTime: 2024-08-13 15:05:20
--> -->
<template> <template>
<dee-form <dee-form
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
:form-buttons="formButtons" :form-buttons="formButtons"
form-btn-position="center" form-btn-position="center"
@on-submit="submit" @on-submit="submit"
@on-cancel="close" @on-cancel="cancel"
/> />
</template> </template>
...@@ -25,17 +25,13 @@ export default { ...@@ -25,17 +25,13 @@ export default {
components: {}, components: {},
componentName: '详情按钮-升版', componentName: '详情按钮-升版',
props: { props: {
dialogShow: {
type: Boolean,
default: () => false
},
node: {
type: Object,
default: () => {}
},
businessTab: { businessTab: {
type: Object, type: Object,
default: () => null default: () => null
},
basicData: {
type: Object,
default: () => {}
} }
}, },
data() { data() {
...@@ -111,10 +107,10 @@ export default { ...@@ -111,10 +107,10 @@ export default {
computed: { computed: {
}, },
watch: { watch: {
dialogShow: { basicData: {
immediate: true, immediate: true,
handler: function(flag) { handler: function(val) {
if (flag) { if (val) {
this.init() this.init()
} else { } else {
this.clear() this.clear()
...@@ -133,7 +129,7 @@ export default { ...@@ -133,7 +129,7 @@ export default {
} }
this.loading = true this.loading = true
post(`/DxDocument/ext/version/${this.form.id}/revise`, this.form).then(res => { post(`/DxDocument/ext/version/${this.form.id}/revise`, this.form).then(res => {
this.$emit('close') this.$emit('cancel')
this.refresh(res.items) this.refresh(res.items)
}).filnally(() => { }).filnally(() => {
this.loading = false this.loading = false
...@@ -151,13 +147,13 @@ export default { ...@@ -151,13 +147,13 @@ export default {
} }
this.businessTab.reload({ type: 'updateVersion', id: items.id }, newlink) this.businessTab.reload({ type: 'updateVersion', id: items.id }, newlink)
}, },
close() { cancel() {
this.$emit('close') this.$emit('cancel')
}, },
init() { init() {
if (this.node && this.node.id) { if (this.basicData && this.basicData.id) {
this.form.id = this.node.id this.form.id = this.basicData.id
this.form.phaseState = this.node.phaseState || '' this.form.phaseState = this.basicData.phaseState || ''
} }
}, },
clear() { clear() {
......
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