修复周三测试提出的住数据bug
This commit is contained in:
parent
59a6cc4946
commit
a1d3e34009
|
@ -370,7 +370,7 @@ export default {
|
|||
//width: 16px;
|
||||
//height: 16px;
|
||||
left: -14px;
|
||||
top: -3px;
|
||||
top: 0px;
|
||||
position: absolute;
|
||||
vertical-align: 2px;
|
||||
border-radius: 50%;
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
<template slot-scope="scope">
|
||||
<!-- 定义插槽:父组件可以使用 v-slot:prop="{row}" 搭配template标签,自定义每一列单元格的样式与操作 -->
|
||||
<slot :name="item.id" :row="slotrow ? scope : scope.row">
|
||||
<template v-if="scope.$index + 1 != tableInfo.tableData.length">
|
||||
<template v-if="!lookflag">
|
||||
<el-input
|
||||
v-if="item.type === 'input' || item.type === 'textrea'"
|
||||
|
@ -302,6 +303,7 @@
|
|||
v-model="tableInfo.tableData[scope.row.index][item.id]"
|
||||
></el-checkbox>
|
||||
</template>
|
||||
</template>
|
||||
</slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -278,7 +278,7 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
.receiptsAddRow {
|
||||
margin-top: 30px;
|
||||
margin-top: 15px;
|
||||
border: 1px dotted #ccc;
|
||||
text-align: center;
|
||||
height: 50px;
|
||||
|
|
|
@ -47,8 +47,8 @@ const optionFormRow = [
|
|||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,50}$/,
|
||||
message: "须以字母开头且不能出现_外的字符与中文",
|
||||
pattern: /^[a-z][a-z0-9_]{0,50}$/,
|
||||
message: "须以需字母开头且字母小写且不能出现_外的字符与中文",
|
||||
disabledOfId: true,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -249,7 +249,9 @@ export default {
|
|||
},
|
||||
// 主表按钮(删除)
|
||||
mainDeleOnFunc(row, item) {
|
||||
this.$confirm('确定删除?')
|
||||
console.log(row, 'row')
|
||||
let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '确定是否删除?'
|
||||
this.$confirm(msg)
|
||||
.then(async(_) => {
|
||||
this.openLoading('submit')
|
||||
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
|
||||
|
@ -257,6 +259,10 @@ export default {
|
|||
...row
|
||||
})
|
||||
this.$vmNews('删除成功!', 'success')
|
||||
if (this.mainTempClick.id === row.id || row.dbType == 1) {
|
||||
this.activedTableData = []
|
||||
this.mainTempClick = {}
|
||||
}
|
||||
this.getMainTableHandle()
|
||||
})
|
||||
.catch((_) => {
|
||||
|
@ -529,6 +535,7 @@ export default {
|
|||
margin-left: 5px;
|
||||
border-radius: 8px;
|
||||
height: calc(100%);
|
||||
|
||||
.mainAddRow {
|
||||
margin-top: 30px;
|
||||
border: 1px dotted #ccc;
|
||||
|
|
|
@ -99,8 +99,8 @@ export default {
|
|||
disabled: false,
|
||||
required: true,
|
||||
fontSize: 16,
|
||||
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,50}$/,
|
||||
message: '须以字母开头且不能出现_外的字符与中文',
|
||||
pattern: /^[a-z][a-z0-9_]{0,50}$/,
|
||||
message: "须以需字母开头且字母小写且不能出现_外的字符与中文",
|
||||
disabledOfId: true
|
||||
}
|
||||
]
|
||||
|
|
|
@ -277,7 +277,7 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
.receiptsAddRow {
|
||||
margin-top: 30px;
|
||||
margin-top: 15px;
|
||||
border: 1px dotted #ccc;
|
||||
text-align: center;
|
||||
height: 50px;
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
<div class="upload">
|
||||
<div class="uploadMain">
|
||||
<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/"
|
||||
:on-preview="handlePreview" :on-progress="handleProgress" :before-upload="beforeUpload"
|
||||
list-type="picture" :limit="1" :disabled="lookFlag" :on-success="handleAvatarSuccess"
|
||||
:on-preview="handlePreview" :before-upload="handleProgress"
|
||||
list-type="picture" :limit="1" :disabled="lookFlag"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<div class="line">
|
||||
|
@ -121,10 +121,27 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
// 文件上传相关时间
|
||||
handleProgress(file, fileList) {
|
||||
this.loading = true
|
||||
handleProgress(fileList, file) {
|
||||
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.loading = false
|
||||
})
|
||||
},
|
||||
handlePreview(file) {
|
||||
|
@ -132,9 +149,9 @@ export default {
|
|||
async handleAvatarSuccess(res, file) {
|
||||
this.loading = true
|
||||
this.$refs.upload.clearFiles()//清理文件上传状态
|
||||
this.imgUrl = URL.createObjectURL(file.raw)
|
||||
this.imgUrl = URL.createObjectURL(file)
|
||||
let formData = new FormData()
|
||||
formData.append('file', file.raw)
|
||||
formData.append('file', file)
|
||||
formData.append('fileFlag', true)
|
||||
formData.append('businessType', 'application')
|
||||
return request({
|
||||
|
@ -142,35 +159,18 @@ export default {
|
|||
method: 'post',
|
||||
data: formData
|
||||
}).then((res) => {
|
||||
|
||||
if (res.status === '200') {
|
||||
console.log(res)
|
||||
this.$vmNews('上传成功', 'success')
|
||||
this.appLogo = res.attribute.id
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
return true
|
||||
|
||||
},
|
||||
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() {
|
||||
|
@ -307,7 +307,7 @@ export default {
|
|||
margin-left: 5px;
|
||||
|
||||
.title {
|
||||
margin-bottom: 32px;
|
||||
margin-bottom: 20px;
|
||||
margin-left: 32px;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
|
@ -399,7 +399,7 @@ export default {
|
|||
justify-content: space-between;
|
||||
|
||||
> .left {
|
||||
> .title {
|
||||
> .smalltitle {
|
||||
font-size: 18px;
|
||||
color: #999999;
|
||||
margin-bottom: 10px;
|
||||
|
@ -443,9 +443,11 @@ export default {
|
|||
margin-top: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 16px;
|
||||
|
||||
.line {
|
||||
margin-left: 32px;
|
||||
display: flex;
|
||||
|
||||
.name {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
|
@ -455,6 +457,7 @@ export default {
|
|||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.value {
|
||||
display: flex;
|
||||
margin-left: 15px;
|
||||
|
|
Loading…
Reference in New Issue