修复周三测试提出的住数据bug
This commit is contained in:
parent
59a6cc4946
commit
a1d3e34009
|
@ -370,7 +370,7 @@ export default {
|
||||||
//width: 16px;
|
//width: 16px;
|
||||||
//height: 16px;
|
//height: 16px;
|
||||||
left: -14px;
|
left: -14px;
|
||||||
top: -3px;
|
top: 0px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
vertical-align: 2px;
|
vertical-align: 2px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
|
@ -98,209 +98,211 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 定义插槽:父组件可以使用 v-slot:prop="{row}" 搭配template标签,自定义每一列单元格的样式与操作 -->
|
<!-- 定义插槽:父组件可以使用 v-slot:prop="{row}" 搭配template标签,自定义每一列单元格的样式与操作 -->
|
||||||
<slot :name="item.id" :row="slotrow ? scope : scope.row">
|
<slot :name="item.id" :row="slotrow ? scope : scope.row">
|
||||||
<template v-if="!lookflag">
|
<template v-if="scope.$index + 1 != tableInfo.tableData.length">
|
||||||
<el-input
|
<template v-if="!lookflag">
|
||||||
v-if="item.type === 'input' || item.type === 'textrea'"
|
<el-input
|
||||||
:disabled="
|
v-if="item.type === 'input' || item.type === 'textrea'"
|
||||||
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
:maxlength="item.maxlength ? item.maxlength : ''"
|
:maxlength="item.maxlength ? item.maxlength : ''"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="item.type === 'number'"
|
v-if="item.type === 'number'"
|
||||||
type="number"
|
type="number"
|
||||||
onkeyup="value=value.replace(/[^\d]/g,'')"
|
onkeyup="value=value.replace(/[^\d]/g,'')"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
min="1"
|
min="1"
|
||||||
:maxlength="item.maxlength ? item.maxlength : ''"
|
:maxlength="item.maxlength ? item.maxlength : ''"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-if="item.type === 'checkbox'"
|
v-if="item.type === 'checkbox'"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
></el-checkbox>
|
></el-checkbox>
|
||||||
<BaseSelect
|
<BaseSelect
|
||||||
v-if="item.type === 'select'"
|
v-if="item.type === 'select'"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
:selectInfo="item"
|
:selectInfo="item"
|
||||||
:itemObj="item"
|
:itemObj="item"
|
||||||
:ruleForm="tableInfo.tableData[scope.row.index]"
|
:ruleForm="tableInfo.tableData[scope.row.index]"
|
||||||
></BaseSelect>
|
></BaseSelect>
|
||||||
<baseCascader
|
<baseCascader
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
v-if="item.type === 'treeselect'"
|
v-if="item.type === 'treeselect'"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:itemObj="item"
|
:itemObj="item"
|
||||||
:ruleForm="tableInfo.tableData[scope.row.index]"
|
:ruleForm="tableInfo.tableData[scope.row.index]"
|
||||||
>
|
>
|
||||||
</baseCascader>
|
</baseCascader>
|
||||||
<el-link
|
<el-link
|
||||||
style="
|
style="
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
"
|
"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
v-if="item.type === 'click'"
|
v-if="item.type === 'click'"
|
||||||
@click="clickBoxHandle(scope.row)"
|
@click="clickBoxHandle(scope.row)"
|
||||||
type="primary"
|
type="primary"
|
||||||
>{{
|
>{{
|
||||||
tableInfo.tableData[scope.row.index][item.id]
|
tableInfo.tableData[scope.row.index][item.id]
|
||||||
? tableInfo.tableData[scope.row.index][item.id]
|
? tableInfo.tableData[scope.row.index][item.id]
|
||||||
: "点击这里..."
|
: "点击这里..."
|
||||||
}}</el-link
|
}}</el-link
|
||||||
>
|
>
|
||||||
<div v-if="item.type === 'text'">
|
<div v-if="item.type === 'text'">
|
||||||
<el-tooltip class="item" effect="dark" placement="top">
|
<el-tooltip class="item" effect="dark" placement="top">
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<BaseDatePicker
|
<BaseDatePicker
|
||||||
v-if="item.type === 'datepick'"
|
v-if="item.type === 'datepick'"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
:row="scope.row"
|
:row="scope.row"
|
||||||
:low="item.low ? item.low : ''"
|
:low="item.low ? item.low : ''"
|
||||||
:up="item.up ? item.up : ''"
|
:up="item.up ? item.up : ''"
|
||||||
></BaseDatePicker>
|
></BaseDatePicker>
|
||||||
<BaseDatePicker
|
<BaseDatePicker
|
||||||
v-if="item.type === 'daterange'"
|
v-if="item.type === 'daterange'"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
datePickerType="daterange"
|
datePickerType="daterange"
|
||||||
></BaseDatePicker>
|
></BaseDatePicker>
|
||||||
<BaseDatePicker
|
<BaseDatePicker
|
||||||
v-if="item.type === 'datetimepick'"
|
v-if="item.type === 'datetimepick'"
|
||||||
datePickerType="datetime"
|
datePickerType="datetime"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
></BaseDatePicker>
|
></BaseDatePicker>
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
item.type === 'compute' &&
|
item.type === 'compute' &&
|
||||||
!lookflag &&
|
!lookflag &&
|
||||||
scope.$index + 1 != tableInfo.tableData.length
|
scope.$index + 1 != tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-tooltip class="item" effect="dark" placement="top">
|
<el-tooltip class="item" effect="dark" placement="top">
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
{{ calculator(item, scope.row) }}
|
{{ calculator(item, scope.row) }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ calculator(item, scope.row) }}
|
{{ calculator(item, scope.row) }}
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-if="item.type === 'switch'"
|
v-if="item.type === 'switch'"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:active-text="row.activeText"
|
:active-text="row.activeText"
|
||||||
:inactive-text="row.inactiveText"
|
:inactive-text="row.inactiveText"
|
||||||
:active-value="row.activeValue ? row.activeValue : true"
|
:active-value="row.activeValue ? row.activeValue : true"
|
||||||
:inactive-value="
|
:inactive-value="
|
||||||
row.inactiveValue || row.inactiveValue == 0
|
row.inactiveValue || row.inactiveValue == 0
|
||||||
? row.inactiveValue
|
? row.inactiveValue
|
||||||
: false
|
: false
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
item.type != 'checkbok' &&
|
item.type != 'checkbok' &&
|
||||||
item.type !== 'select' &&
|
item.type !== 'select' &&
|
||||||
item.type !== 'treeselect' &&
|
item.type !== 'treeselect' &&
|
||||||
item.type !== 'datepick'
|
item.type !== 'datepick'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-tooltip class="item" effect="dark" placement="top">
|
<el-tooltip class="item" effect="dark" placement="top">
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
{{ tableInfo.tableData[scope.row.index][item.id] }}
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<BaseSelect
|
<BaseSelect
|
||||||
v-if="item.type === 'select'"
|
v-if="item.type === 'select'"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
:selectInfo="item"
|
:selectInfo="item"
|
||||||
:itemObj="item"
|
:itemObj="item"
|
||||||
:ruleForm="tableInfo.tableData[scope.row.index]"
|
:ruleForm="tableInfo.tableData[scope.row.index]"
|
||||||
:lookflag="true"
|
:lookflag="true"
|
||||||
></BaseSelect>
|
></BaseSelect>
|
||||||
<baseCascader
|
<baseCascader
|
||||||
v-if="item.type === 'treeselect'"
|
v-if="item.type === 'treeselect'"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
:lookflag="true"
|
:lookflag="true"
|
||||||
:itemObj="item"
|
:itemObj="item"
|
||||||
:ruleForm="tableInfo.tableData[scope.row.index]"
|
:ruleForm="tableInfo.tableData[scope.row.index]"
|
||||||
>
|
>
|
||||||
</baseCascader>
|
</baseCascader>
|
||||||
<div v-if="item.type === 'datepick'">
|
<div v-if="item.type === 'datepick'">
|
||||||
{{
|
{{
|
||||||
tableInfo.tableData[scope.row.index][item.id].split("T")[0]
|
tableInfo.tableData[scope.row.index][item.id].split("T")[0]
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-if="item.type === 'checkbox'"
|
v-if="item.type === 'checkbox'"
|
||||||
:disabled="
|
:disabled="
|
||||||
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
lookflag || scope.$index + 1 == tableInfo.tableData.length
|
||||||
"
|
"
|
||||||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||||
></el-checkbox>
|
></el-checkbox>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -278,7 +278,7 @@ export default {
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.receiptsAddRow {
|
.receiptsAddRow {
|
||||||
margin-top: 30px;
|
margin-top: 15px;
|
||||||
border: 1px dotted #ccc;
|
border: 1px dotted #ccc;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
|
@ -47,8 +47,8 @@ const optionFormRow = [
|
||||||
disabled: false,
|
disabled: false,
|
||||||
required: true,
|
required: true,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,50}$/,
|
pattern: /^[a-z][a-z0-9_]{0,50}$/,
|
||||||
message: "须以字母开头且不能出现_外的字符与中文",
|
message: "须以需字母开头且字母小写且不能出现_外的字符与中文",
|
||||||
disabledOfId: true,
|
disabledOfId: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -249,7 +249,9 @@ export default {
|
||||||
},
|
},
|
||||||
// 主表按钮(删除)
|
// 主表按钮(删除)
|
||||||
mainDeleOnFunc(row, item) {
|
mainDeleOnFunc(row, item) {
|
||||||
this.$confirm('确定删除?')
|
console.log(row, 'row')
|
||||||
|
let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '确定是否删除?'
|
||||||
|
this.$confirm(msg)
|
||||||
.then(async(_) => {
|
.then(async(_) => {
|
||||||
this.openLoading('submit')
|
this.openLoading('submit')
|
||||||
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
|
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
|
||||||
|
@ -257,6 +259,10 @@ export default {
|
||||||
...row
|
...row
|
||||||
})
|
})
|
||||||
this.$vmNews('删除成功!', 'success')
|
this.$vmNews('删除成功!', 'success')
|
||||||
|
if (this.mainTempClick.id === row.id || row.dbType == 1) {
|
||||||
|
this.activedTableData = []
|
||||||
|
this.mainTempClick = {}
|
||||||
|
}
|
||||||
this.getMainTableHandle()
|
this.getMainTableHandle()
|
||||||
})
|
})
|
||||||
.catch((_) => {
|
.catch((_) => {
|
||||||
|
@ -407,7 +413,7 @@ export default {
|
||||||
this.$refs.mainTable.$refs.mainOptionForm.$refs['ruleForm'].validate(async(valid) => {
|
this.$refs.mainTable.$refs.mainOptionForm.$refs['ruleForm'].validate(async(valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
//主数据英文名黑名单
|
//主数据英文名黑名单
|
||||||
let blacklist = ['id', 'document_rule', 'document_rule_num', 'data_status', 'add_status', 'update_status', 'delete_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id','data_id']
|
let blacklist = ['id', 'document_rule', 'document_rule_num', 'data_status', 'add_status', 'update_status', 'delete_status', 'sorts', 'create_user_id', 'create_time', 'modify_user_id', 'modify_time', 'sts', 'org_id', 'company_id', 'data_id']
|
||||||
let form = this.$refs.mainTable.mainOptionForm
|
let form = this.$refs.mainTable.mainOptionForm
|
||||||
//判断黑名单
|
//判断黑名单
|
||||||
if (blacklist.includes(form.dbName)) {
|
if (blacklist.includes(form.dbName)) {
|
||||||
|
@ -529,6 +535,7 @@ export default {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
height: calc(100%);
|
height: calc(100%);
|
||||||
|
|
||||||
.mainAddRow {
|
.mainAddRow {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
border: 1px dotted #ccc;
|
border: 1px dotted #ccc;
|
||||||
|
|
|
@ -99,8 +99,8 @@ export default {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
required: true,
|
required: true,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,50}$/,
|
pattern: /^[a-z][a-z0-9_]{0,50}$/,
|
||||||
message: '须以字母开头且不能出现_外的字符与中文',
|
message: "须以需字母开头且字母小写且不能出现_外的字符与中文",
|
||||||
disabledOfId: true
|
disabledOfId: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -277,7 +277,7 @@ export default {
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.receiptsAddRow {
|
.receiptsAddRow {
|
||||||
margin-top: 30px;
|
margin-top: 15px;
|
||||||
border: 1px dotted #ccc;
|
border: 1px dotted #ccc;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
|
@ -43,10 +43,10 @@
|
||||||
<div class="upload">
|
<div class="upload">
|
||||||
<div class="uploadMain">
|
<div class="uploadMain">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="title">主数据logo</div>
|
<div class="smalltitle">主数据logo</div>
|
||||||
<el-upload class="avatar-uploader" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
|
<el-upload class="avatar-uploader" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-preview="handlePreview" :on-progress="handleProgress" :before-upload="beforeUpload"
|
:on-preview="handlePreview" :before-upload="handleProgress"
|
||||||
list-type="picture" :limit="1" :disabled="lookFlag" :on-success="handleAvatarSuccess"
|
list-type="picture" :limit="1" :disabled="lookFlag"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
>
|
>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
|
@ -121,10 +121,27 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 文件上传相关时间
|
// 文件上传相关时间
|
||||||
handleProgress(file, fileList) {
|
handleProgress(fileList, file) {
|
||||||
this.loading = true
|
console.log(fileList, 'file')
|
||||||
|
if (!fileList) return
|
||||||
|
if (
|
||||||
|
fileList.type.split('/')[1] != 'jpeg' &&
|
||||||
|
fileList.type.split('/')[1] != 'png'
|
||||||
|
) {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '只能上传jpg/png文件'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (fileList.size >= 2000000) {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '文件大小不超过2MB'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
this.handleAvatarSuccess({}, fileList).then(res => {
|
this.handleAvatarSuccess({}, fileList).then(res => {
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
|
@ -132,9 +149,9 @@ export default {
|
||||||
async handleAvatarSuccess(res, file) {
|
async handleAvatarSuccess(res, file) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$refs.upload.clearFiles()//清理文件上传状态
|
this.$refs.upload.clearFiles()//清理文件上传状态
|
||||||
this.imgUrl = URL.createObjectURL(file.raw)
|
this.imgUrl = URL.createObjectURL(file)
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
formData.append('file', file.raw)
|
formData.append('file', file)
|
||||||
formData.append('fileFlag', true)
|
formData.append('fileFlag', true)
|
||||||
formData.append('businessType', 'application')
|
formData.append('businessType', 'application')
|
||||||
return request({
|
return request({
|
||||||
|
@ -142,35 +159,18 @@ export default {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: formData
|
data: formData
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
|
||||||
if (res.status === '200') {
|
if (res.status === '200') {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.$vmNews('上传成功', 'success')
|
this.$vmNews('上传成功', 'success')
|
||||||
this.appLogo = res.attribute.id
|
this.appLogo = res.attribute.id
|
||||||
|
this.loading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.loading = false
|
||||||
return true
|
return true
|
||||||
|
|
||||||
},
|
},
|
||||||
async beforeUpload(file) {
|
async beforeUpload(file) {
|
||||||
if (
|
|
||||||
file.type.split('/')[1] != 'jpeg' &&
|
|
||||||
file.type.split('/')[1] != 'png'
|
|
||||||
) {
|
|
||||||
this.$message({
|
|
||||||
type: 'warning',
|
|
||||||
message: '只能上传jpg/png文件'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
if (file.size >= 2000000) {
|
|
||||||
this.$message({
|
|
||||||
type: 'warning',
|
|
||||||
message: '文件大小不超过2MB'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 保存按钮、列表验证
|
// 保存按钮、列表验证
|
||||||
saveHandle() {
|
saveHandle() {
|
||||||
|
@ -307,7 +307,7 @@ export default {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin-bottom: 32px;
|
margin-bottom: 20px;
|
||||||
margin-left: 32px;
|
margin-left: 32px;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
@ -399,7 +399,7 @@ export default {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
> .left {
|
> .left {
|
||||||
> .title {
|
> .smalltitle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
@ -443,10 +443,12 @@ export default {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
.line{
|
|
||||||
|
.line {
|
||||||
margin-left: 32px;
|
margin-left: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
.name{
|
|
||||||
|
.name {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
@ -455,7 +457,8 @@ export default {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
.value{
|
|
||||||
|
.value {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
|
Loading…
Reference in New Issue