Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -53,10 +53,14 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
fileIds (value) {
|
||||
if (value) {
|
||||
this.getFileList()
|
||||
}
|
||||
fileIds: {
|
||||
handler (value) {
|
||||
if (value) {
|
||||
this.getFileList()
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
||||
+23
-11
@@ -93,7 +93,7 @@ export default {
|
||||
graph: null,
|
||||
loadEnd: false,
|
||||
selectedNodeId: null,
|
||||
lastQueryId: null
|
||||
lastQueryId: null // 记录上次查询的节点id
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -115,6 +115,12 @@ export default {
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
this.loadEnd = true
|
||||
window.onresize = () => {
|
||||
const width = document.getElementById(this.domId).clientWidth
|
||||
const height = document.getElementById(this.domId).clientHeight
|
||||
this.graph.changeSize(width, height)
|
||||
this.graph.fitCenter()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@@ -153,7 +159,7 @@ export default {
|
||||
})
|
||||
|
||||
// 文本的部分
|
||||
let textContent = (cfg.num || '') + ' ' + (cfg.name || '')
|
||||
let textContent = (cfg.num || '') + ' ' + (cfg.name || '')
|
||||
// if (textContent.length > 40) {
|
||||
// textContent = textContent.slice(0, 20) + '\n' + textContent.slice(20, 40) + '\n' + textContent.slice(40)
|
||||
// } else if (textContent.length > 20) {
|
||||
@@ -302,6 +308,12 @@ export default {
|
||||
if (this.lastQueryId) {
|
||||
this.graph.setItemState(this.lastQueryId, 'selected', false)
|
||||
}
|
||||
if (this.selectedNodeId) {
|
||||
this.graph.setItemState(this.selectedNodeId, 'selected', false)
|
||||
}
|
||||
const node = this.graph.findById(nodeId)
|
||||
this.selectedNodeId = nodeId
|
||||
this.$emit('select', node._cfg.model)
|
||||
this.lastQueryId = nodeId
|
||||
const matrix = item.get('group').getMatrix()
|
||||
const point = {
|
||||
@@ -311,19 +323,19 @@ export default {
|
||||
const width = this.graph.get('width')
|
||||
const height = this.graph.get('height')
|
||||
// 找到视口中心
|
||||
var viewCenter = {
|
||||
const viewCenter = {
|
||||
x: width / 2,
|
||||
y: height / 2
|
||||
}
|
||||
var modelCenter = this.graph.getPointByCanvas(viewCenter.x, viewCenter.y)
|
||||
var viewportMatrix = this.graph.get('group').getMatrix()
|
||||
const modelCenter = this.graph.getPointByCanvas(viewCenter.x, viewCenter.y)
|
||||
const viewportMatrix = this.graph.get('group').getMatrix()
|
||||
// 画布平移的目标位置,最终目标是graph.translate(dx, dy);
|
||||
var dx = (modelCenter.x - point.x) * viewportMatrix[0]
|
||||
var dy = (modelCenter.y - point.y) * viewportMatrix[4]
|
||||
var lastX = 0
|
||||
var lastY = 0
|
||||
var newX = void 0
|
||||
var newY = void 0
|
||||
const dx = (modelCenter.x - point.x) * viewportMatrix[0]
|
||||
const dy = (modelCenter.y - point.y) * viewportMatrix[4]
|
||||
let lastX = 0
|
||||
let lastY = 0
|
||||
let newX = void 0
|
||||
let newY = void 0
|
||||
// 动画每次平移一点,直到目标位置
|
||||
this.graph.get('canvas').animate({
|
||||
onFrame: (ratio) => {
|
||||
|
||||
@@ -210,7 +210,7 @@ export default {
|
||||
this.$message.warning(this.$t('businessSupport.standardizationActivity.addUpToFourLevels'))
|
||||
return
|
||||
}
|
||||
this.$refs.modalForm.add({ pid: this.selectedNodeId, pName: this.selectedNode.name, level: this.selectedNode.level + 1 })
|
||||
this.$refs.modalForm.add({ pid: this.selectedNodeId, supperName: this.selectedNode.name, level: this.selectedNode.level + 1 })
|
||||
},
|
||||
handleEdit () {
|
||||
// 需要先选中一个节点
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('businessSupport.standardizationActivity.ourPersonnel')"
|
||||
type="radio"
|
||||
v-decorator="['personnelId', validatorRules.personnelId]"
|
||||
@listChange="handleUserChange"
|
||||
@nameChange="handleUserNameChange" />
|
||||
:name-str="model.personnel"
|
||||
@listChange="handleUserChange" />
|
||||
</a-form-item>
|
||||
<!--工号-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
@@ -171,7 +171,10 @@ export default {
|
||||
handleOk () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
if (!errors) {
|
||||
console.log(JSON.parse(JSON.stringify(this.model)))
|
||||
console.log(JSON.parse(JSON.stringify(values)))
|
||||
const formData = Object.assign(this.model, values)
|
||||
console.log(formData)
|
||||
this.$emit('ok', formData)
|
||||
this.close()
|
||||
}
|
||||
@@ -191,13 +194,12 @@ export default {
|
||||
jobNum: data.username, // 工号
|
||||
mailbox: data.email, // 邮箱
|
||||
department: data.orgCodeTxt, // 部门
|
||||
phone: data.phone // 电话
|
||||
phone: data.phone, // 电话
|
||||
personnel: data.realname
|
||||
}
|
||||
this.model = Object.assign(this.model, obj)
|
||||
this.form.setFieldsValue(obj)
|
||||
},
|
||||
handleUserNameChange (name) {
|
||||
this.model.personnel = name
|
||||
},
|
||||
/**
|
||||
* 校验电话
|
||||
* @param rule
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<j-date :placeholder="$t('pleaseSelect') + $t('workCenter.postMeetingManageProcess.attendanceDate')"
|
||||
show-type="day"
|
||||
date-format="YYYY-MM-DD"
|
||||
:disabled="disabled"
|
||||
v-decorator="['participationTime', validatorRules.participationTime]" />
|
||||
</a-form-item>
|
||||
<!--会议名称-->
|
||||
@@ -26,6 +27,7 @@
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.postMeetingManageProcess.meetingName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
:disabled="disabled"
|
||||
v-decorator="['name', validatorRules.name]" />
|
||||
</a-form-item>
|
||||
<!--参会人员-->
|
||||
@@ -33,7 +35,16 @@
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.enStandardRevision.conferee')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enStandardRevision.conferee')"
|
||||
v-decorator="['personnelId', validatorRules.personnelId]" @nameChange="handleUserNameChange"/>
|
||||
:disabled="disabled"
|
||||
:name-str="model.personnel"
|
||||
v-decorator="['personnelId', validatorRules.personnelId]" @nameChange="handleUserNameChange" />
|
||||
</a-form-item>
|
||||
<!--会议资料-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('businessSupport.standardizationActivity.meetingMaterial')"
|
||||
v-if="disabled">
|
||||
<file-echo :file-ids="model.meetingData" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</j-modal>
|
||||
@@ -41,10 +52,11 @@
|
||||
|
||||
<script>
|
||||
import UserSelection from '../../../../components/selection/UserSelection'
|
||||
import FileEcho from '../../../../components/FileEcho'
|
||||
|
||||
export default {
|
||||
name: 'MeetingModal',
|
||||
components: { UserSelection },
|
||||
components: { FileEcho, UserSelection },
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('businessSupport.standardizationActivity.attendanceRecord'),
|
||||
@@ -86,12 +98,15 @@ export default {
|
||||
}],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
}
|
||||
},
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.disabled = false
|
||||
this.visible = true
|
||||
this.model.source = '1'
|
||||
},
|
||||
view (record) {
|
||||
this.visible = true
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
disabled
|
||||
v-decorator="['pName', validatorRules.pName]" />
|
||||
v-decorator="['supperName', validatorRules.supperName]" />
|
||||
</a-form-item>
|
||||
<!--节点类型-->
|
||||
<a-form-item :labelCol="labelCol"
|
||||
@@ -145,7 +145,7 @@ export default {
|
||||
},
|
||||
validatorRules: {
|
||||
// 上级节点
|
||||
pName: {
|
||||
supperName: {
|
||||
rules: [{
|
||||
required: false,
|
||||
message: this.$t('pleaseEnter') + this.$t('businessSupport.standardizationActivity.parentNode')
|
||||
|
||||
@@ -16,13 +16,19 @@
|
||||
:row-selection="needRowSelection ? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange } : null">
|
||||
|
||||
<template v-slot:file="{text, record, index}">
|
||||
<!--会后资料,如果数据从流程来,就是查看,如果是新增的,就正常显示上传-->
|
||||
<a-button type="primary"
|
||||
class="button-text"
|
||||
@click="clickButtonToUpload(text, index, 'meetingData')">
|
||||
@click="clickButtonToUpload(text, index, 'meetingData')" v-if="record.source !== '2'">
|
||||
{{
|
||||
(text === 'null' || text === '' || text === null || text === undefined) ? $t('uploadFile.clickUpload') : $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
<a></a>
|
||||
</a-button>
|
||||
|
||||
<div class="action-span-cell" v-else>
|
||||
<a @click="handleView(record)">{{ $t('view') }}</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
@@ -151,6 +157,9 @@ export default {
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.$set(this.realDataSource[this.uploadTable.index], this.uploadTable.dbFieldName, attIdList.join(','))
|
||||
this.$emit('ok', this.realDataSource)
|
||||
},
|
||||
handleView (record) {
|
||||
this.$refs.formModal.view(record)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user