修改已知问题

This commit is contained in:
qq787203167
2022-06-14 18:38:17 +08:00
parent a6ba8df1e2
commit fb9a865f25
@@ -119,15 +119,15 @@
</div>
</div>
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 19px">
<div class="operator-text" @click="submitClick(0)">
<div class="operator-text" @click="submitClick(0)" v-if="isRoleSwitching">
<a-icon type="check-circle"/>
{{ $t('submit') }}
</div>
<div class="operator-text" @click="submitClick(1)">
<div class="operator-text" @click="submitClick(1)" v-if="isRoleSwitching">
<a-icon type="close-circle"/>
{{ $t('overrule') }}
</div>
<div class="operator-text" @click="batSettingClick">
<div class="operator-text" @click="batSettingClick" v-if="isRoleSwitching">
<a-icon type="setting"/>
{{ $t('batSetting') }}
</div>
@@ -235,6 +235,7 @@
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.inventoryAffirmDueDate"
style="width: 100%"/>
@@ -244,6 +245,7 @@
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'taskAffirmDueDate'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.taskAffirmDueDate"
style="width: 100%"/>
@@ -336,14 +338,9 @@
<a-select allowClear :placeholder="$t('pleaseSelect')+$t('roleSwitching')"
v-model="formInlineRoleSwitching.roleSwitchingCode">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option :value="'0'">
<span class="itemOption-index" :title="$t('StudioEngineer')">
{{$t('StudioEngineer')}}
</span>
</a-select-option>
<a-select-option :value="'4'">
<span class="itemOption-index" :title="$t('regulatoryEngineerOrcertifiedEngineer')">
{{$t('regulatoryEngineerOrcertifiedEngineer')}}
<a-select-option :value="item.roleCode" v-for="item in roleSwitchingList">
<span class="itemOption-index" :title="item.roleName">
{{item.roleName}}
</span>
</a-select-option>
</a-select>
@@ -386,7 +383,8 @@
},
data() {
return {
columns: [
roleSwitchingList: [],
columnsAll: [
{
title: this.$t('standard'),
align: 'center',
@@ -683,6 +681,7 @@
],
visibleFile: false,
JLoading: false,
isRoleSwitching: true,
formInlineComment: {},
rulesComment: {
commentContent: [
@@ -801,19 +800,19 @@
{
type: 'Personnel',
value: 'regulationOwnerId',
valueName:'regulationOwnerIdName',
valueName: 'regulationOwnerIdName',
text: this.$t('regulatoryEngineer')
},
{
type: 'Personnel',
value: 'homologationEngineerId',
valueName:'homologationEngineerIdName',
valueName: 'homologationEngineerIdName',
text: this.$t('certifiedEngineer')
},
{
type: 'Personnel',
value: 'engineeringInterfacePerson',
valueName:'engineeringInterfacePersonName',
valueName: 'engineeringInterfacePersonName',
text: this.$t('engineeringInterfacePerson')
}
],
@@ -837,6 +836,7 @@
if (this.$route.query.studioEngineer == this.userInfo().id) {
this.JLoading = true
this.getAndUserId()
this.getRoleByUserId()
} else {
this.isDisplay = false
}
@@ -861,6 +861,18 @@
}
}
return columnResult
},
columns() {
let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
if (!this.isRoleSwitching) {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation')) {
columnResult.splice(i, 1)
i--
}
}
}
return columnResult
}
},
methods: {
@@ -868,6 +880,18 @@
handleModule() {
downloadFile(this.url.exportTemplate, this.$t('listOfRegulations') + this.$t('importTemplate') + '.xls', {})
},
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
getRoleByUserId() {
getAction('/sys/role/getRoleByUserId', {}).then((res) => {
if (res.success) {
this.roleSwitchingList = res.result || []
} else {
this.roleSwitchingList = []
}
})
},
getAndUserId() {
let query = {
projectLibraryId: this.$route.query.id,
@@ -878,10 +902,14 @@
this.isDisplay = true
this.formInlineRoleSwitching.roleSwitchingCode = res.result.roleCode
this.AndUserId = res.result.id
this.isRoleSwitching = true
if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
this.isDisplay = true
} else {
this.isDisplay = false
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
this.isRoleSwitching = false
}
}
this.JLoading = false
} else {
@@ -1020,10 +1048,14 @@
this.confirmLoadingRoleSwitching = true
postAction(this.url.AndUserIdEdit, query).then((res) => {
if (res.success) {
this.isRoleSwitching = true
if (this.formInlineRoleSwitching.roleSwitchingCode == '0') {
this.isDisplay = true
} else {
this.isDisplay = false
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
this.isRoleSwitching = false
}
}
this.$message.success(this.$t('OperationSuccessful'))
this.visibleRoleSwitching = false
@@ -1044,10 +1076,11 @@
this.visibleRoleSwitching = true
this.$nextTick(() => {
this.$refs.ruleFormRoleSwitching.clearValidate()
if (this.isDisplay) {
if (!this.formInlineRoleSwitching.roleSwitchingCode) {
this.formInlineRoleSwitching.roleSwitchingCode = '0'
} else {
this.formInlineRoleSwitching.roleSwitchingCode = '4'
}
if (!(this.roleSwitchingList.some(val => val.roleCode == this.formInlineRoleSwitching.roleSwitchingCode))) {
this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0].roleCode
}
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
})
@@ -1148,6 +1181,9 @@
} else {
roleCode = 4
}
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
roleCode = 0
}
let query = {
...this.queryParamQuery,
...this.queryParam,
@@ -1155,6 +1191,7 @@
roleCode: roleCode
}
this.loading = true
this.getRoleByUserId()
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result