修改中英文切换

This commit is contained in:
qq787203167
2022-02-23 15:12:41 +08:00
parent daa473e220
commit 742403daab
9 changed files with 557 additions and 202 deletions
@@ -39,7 +39,20 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-else-if="item.field_show_type === 'dateAll'">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span>
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
<span class="title-text-text">{{item.db_field_txt}}</span>
</div>
<a-form-model-item class="itemModel" :prop="item.db_field_name">
<a-range-picker class="box-input" v-model="formInline[item.db_field_name]"
:disabled="disabled"
@change="onChange(item.db_field_name)"></a-range-picker>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-else-if="item.field_show_type === 'date'">
<div class="box-title-text">
<div class="title-text">
@@ -58,20 +71,6 @@
</div>
</a-col>
<a-col :span="12" v-else-if="item.field_show_type === 'SMULTITIME'">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span>
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
<span class="title-text-text">{{item.db_field_txt}}</span>
</div>
<a-form-model-item class="itemModel" :prop="item.db_field_name">
<a-range-picker class="box-input" v-model="formInline[item.db_field_name]"
:disabled="disabled"
@change="onChange"></a-range-picker>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-else-if="item.field_show_type === 'NUMBER'">
<div class="box-title-text">
@@ -152,7 +151,37 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-else-if="item.field_show_type === 'treeSelect'">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span>
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
<span class="title-text-text">{{item.db_field_txt}}</span>
</div>
<a-form-model-item class="itemModel" :prop="item.db_field_name">
<a-tree-select
v-model="formInline[item.db_field_name]"
style="width: 100%"
:maxTagCount="1"
:tree-data="treeData"
tree-checkable
placeholder="Please select"
/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24" v-else-if="item.field_show_type === 'file'">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span>
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
<span class="title-text-text">{{item.db_field_txt}}</span>
</div>
<a-form-model-item class="itemModel" :prop="item.db_field_name">
<PersonnelSelection :query="item" :disabled="disabled" v-model="formInline[item.db_field_name]"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-else-if="item.field_show_type === 'file'">
<div class="box-title-text">
<div class="title-text">
@@ -194,6 +223,7 @@
<script>
import uploadFile from '@/components/uploadFile/file'
import Standardselection from '@/components/Standardselection/index'
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction } from '@/api/manage'
import eventBUs from '../../common/event'
import moment from 'moment'
@@ -202,7 +232,8 @@
name: 'index',
components: {
uploadFile,
Standardselection
Standardselection,
PersonnelSelection
},
props: {
url: {
@@ -249,7 +280,51 @@
text: '关联信息',
content: []
}
]
],
treeData:[
{
title: 'Node1',
value: '0-0',
key: '0-0',
children: [
{
title: 'Child Node1',
value: '0-0-0',
key: '0-0-0',
children: [
{
title: 'Child Node1',
value: '0-0-0-0',
key: '0-0-0-0',
},
],
},
],
},
{
title: 'Node2',
value: '0-1',
key: '0-1',
children: [
{
title: 'Child Node3',
value: '0-1-0',
key: '0-1-0',
disabled: true,
},
{
title: 'Child Node4',
value: '0-1-1',
key: '0-1-1',
},
{
title: 'Child Node5',
value: '0-1-2',
key: '0-1-2',
},
],
},
],
}
},
mounted() {
@@ -288,10 +363,12 @@
dateChange(item) {
this.formInline[item.db_field_name] = moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD')
},
onChange(date, dateString) {
console.log(typeof date)
// moment(date).format('YYYY-MM-DD')
onChange(item) {
let dateOne = moment(this.formInline[item][0]).format('YYYY-MM-DD')
let dateTwo = moment(this.formInline[item][1]).format('YYYY-MM-DD')
this.formInline[item] = [dateOne, dateTwo]
},
clickButtonToUpload(current) {
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true