Commit a8ddbc49 authored by 李苏's avatar 李苏 💬

录入调整。定制修改密码。样式属性调整

parent cecda52d
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar" />
<!-- 修改密码--> <!-- 修改密码-->
<el-dialog :append-to-body='true' title="修改密码" :visible.sync="settingVisible" width="40%"> <el-dialog :close-on-click-modal='false' :append-to-body='true' title="修改密码" :visible.sync="settingVisible" width="40%">
<div> <div>
<el-form ref="form" :model="users" :rules="rules" label-width="80px"> <el-form ref="form" :model="users" :rules="rules" label-width="80px">
<el-form-item label="旧密码" prop="oldPassword"> <el-form-item label="旧密码" prop="oldPassword">
<el-input v-model="users.oldPassword" placeholder="请输入旧密码" type="password" show-password/> <el-input v-model="users.oldPassword" placeholder="请输入旧密码" type="password" show-password />
</el-form-item> </el-form-item>
<el-form-item label="新密码" prop="newPassword"> <el-form-item label="新密码" prop="newPassword">
<el-input v-model="users.newPassword" placeholder="请输入新密码" type="password" show-password/> <el-input v-model="users.newPassword" placeholder="请输入新密码" type="password" show-password />
</el-form-item> </el-form-item>
<el-form-item label="确认密码" prop="confirmPassword"> <el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model="users.confirmPassword" placeholder="请确认新密码" type="password" show-password/> <el-input v-model="users.confirmPassword" placeholder="请确认新密码" type="password" show-password />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="refooter"> <div class="refooter">
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="settingVisible = false">取 消</el-button> <el-button @click="settingVisible = false">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button> <el-button type="primary" @click="submit">确 定</el-button>
</span> </span>
</div> </div>
</el-dialog> </el-dialog>
<!-- --> <!-- -->
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div class="right-menu"> <div class="right-menu">
<div style="height: 100%;float: left;"> <div style="height: 100%;float: left;">
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
</div> </div>
<div v-if="systemInfo.length!=0" style="height: 100%;width: 200px;float: left;"> <div v-if="systemInfo.length!=0" style="height: 100%;width: 200px;float: left;">
<ChangeProject/> <ChangeProject />
</div> </div>
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
...@@ -43,19 +44,19 @@ ...@@ -43,19 +44,19 @@
</template> </template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<el-avatar> {{user}} </el-avatar> <el-avatar> {{user}} </el-avatar>
<!-- <img :src="'https://p9-passport.byteacctimg.com/img/user-avatar/9e20870d6d673cafe6a0e22aa2f2aa96~300x300.image'" class="user-avatar"> --> <!-- <img :src="'https://p9-passport.byteacctimg.com/img/user-avatar/9e20870d6d673cafe6a0e22aa2f2aa96~300x300.image'" class="user-avatar"> -->
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!--<router-link to="/user/profile">--> <!--<router-link to="/user/profile">-->
<!--<el-dropdown-item>个人中心</el-dropdown-item>--> <!--<el-dropdown-item>个人中心</el-dropdown-item>-->
<!--</router-link>--> <!--</router-link>-->
<span @click="showItem"> <span @click="showItem">
<el-dropdown-item>修改密码</el-dropdown-item> <el-dropdown-item>修改密码</el-dropdown-item>
</span> </span>
<el-dropdown-item @click.native="setting = true"> <el-dropdown-item @click.native="setting = true">
<span>主题设置</span> <span>主题设置</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item divided @click.native="logout"> <el-dropdown-item divided @click.native="logout">
...@@ -68,227 +69,263 @@ ...@@ -68,227 +69,263 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import {
import Breadcrumb from '@/components/Breadcrumb' mapGetters
import TopNav from '@/components/TopNav' } from 'vuex'
import Hamburger from '@/components/Hamburger' import Breadcrumb from '@/components/Breadcrumb'
import Screenfull from '@/components/Screenfull' import TopNav from '@/components/TopNav'
import SizeSelect from '@/components/SizeSelect' import Hamburger from '@/components/Hamburger'
import Search from '@/components/HeaderSearch' import Screenfull from '@/components/Screenfull'
import RuoYiGit from '@/components/RuoYi/Git' import SizeSelect from '@/components/SizeSelect'
import RuoYiDoc from '@/components/RuoYi/Doc' import Search from '@/components/HeaderSearch'
import { updatePassword } from "common/src/api/development/development.js"; import RuoYiGit from '@/components/RuoYi/Git'
import ChangeProject from './changeProject.vue'; import RuoYiDoc from '@/components/RuoYi/Doc'
import {
updatePassword
} from "common/src/api/development/development.js";
import ChangeProject from './changeProject.vue';
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
TopNav, TopNav,
Hamburger, Hamburger,
Screenfull, Screenfull,
SizeSelect, SizeSelect,
Search, Search,
RuoYiGit, RuoYiGit,
RuoYiDoc, RuoYiDoc,
ChangeProject ChangeProject
}, },
mounted(){ mounted() {
this.user=localStorage.getItem('username')||'用户' this.user = localStorage.getItem('username') || '用户'
}, },
data(){ data() {
const equalToPassword = (rule, value, callback) => {
if (this.users.newPassword !== value) { const validateContent = (rule, value, callback) => {
callback(new Error("两次输入的密码不一致")); const regex =/^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[@$!%*?&])[A-Za-z0-9@$!%*?&]+$/;
} else { if (!regex.test(value)) {
callback(); callback(new Error('请输入包含数字、字母(大小写)和特殊符号(@$!%*?&)的组合'));
} } else {
}; callback();
return{ }
users: { };
oldPassword: undefined,
newPassword: undefined, const equalToPassword = (rule, value, callback) => {
confirmPassword: undefined if (this.users.newPassword !== value) {
}, callback(new Error("两次输入的密码不一致"));
user:'用户', } else {
settingVisible:false, callback();
// 表单校验 }
rules: { };
oldPassword: [ return {
{ required: true, message: "旧密码不能为空", trigger: "blur" } users: {
], oldPassword: undefined,
newPassword: [ newPassword: undefined,
{ required: true, message: "新密码不能为空", trigger: "blur" }, confirmPassword: undefined
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" } },
], user: '用户',
confirmPassword: [ settingVisible: false,
{ required: true, message: "确认密码不能为空", trigger: "blur" }, // 表单校验
{ required: true, validator: equalToPassword, trigger: "blur" } rules: {
] oldPassword: [{
required: true,
message: "旧密码不能为空",
trigger: "blur"
}],
newPassword: [{
required: true,
message: "新密码不能为空",
trigger: "blur"
},
{
min: 12,
max: 20,
message: "长度在 12 到 20 个字符",
trigger: "blur"
},
{
required: true,
validator: validateContent,
trigger: 'blur'
}
],
confirmPassword: [{
required: true,
message: "确认密码不能为空",
trigger: "blur"
},
{
required: true,
validator: equalToPassword,
trigger: "blur"
}
]
}
} }
}
},
computed: {
systemInfo(){
let data=this.$store.getters.systemInfo||[]
return data
}, },
...mapGetters([ computed: {
'sidebar', systemInfo() {
'avatar', let data = this.$store.getters.systemInfo || []
'device' return data
]),
setting: {
get() {
return this.$store.state.settings.showSettings
}, },
set(val) { ...mapGetters([
this.$store.dispatch('settings/changeSetting', { 'sidebar',
key: 'showSettings', 'avatar',
value: val 'device'
}) ]),
setting: {
get() {
return this.$store.state.settings.showSettings
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val
})
}
},
topNav: {
get() {
return this.$store.state.settings.topNav
}
} }
}, },
topNav: { methods: {
get() { submit() {
return this.$store.state.settings.topNav this.$refs["form"].validate(valid => {
} if (valid) {
} let params = {
}, oldPassword: Base64.encode(this.users.oldPassword),
methods: { newPassword: Base64.encode(this.users.newPassword),
submit() { newPasswordConfirm: Base64.encode(this.users.confirmPassword)
this.$refs["form"].validate(valid => { }
if (valid) { updatePassword(params).then(res => {
let params={ if (res.success) {
oldPassword: Base64.encode(this.users.oldPassword), this.$success('密码修改成功!')
newPassword: Base64.encode(this.users.newPassword), this.settingVisible = false
newPasswordConfirm: Base64.encode(this.users.confirmPassword) }
} })
updatePassword(params).then(res=>{
if(res.success){
this.$success('密码修改成功!')
this.settingVisible=false
}
})
// updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => { // updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
// this.$modal.msgSuccess("修改成功"); // this.$modal.msgSuccess("修改成功");
// }); // });
} }
}); });
}, },
showItem(){ showItem() {
this.settingVisible=true this.settingVisible = true
}, },
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
async logout() { async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', { this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$post('/logout').finally(()=>{ this.$post('/logout').finally(() => {
localStorage.clear() localStorage.clear()
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = '/index'; location.href = '/index';
}) })
}) })
}).catch(() => {}); }).catch(() => {});
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.navbar { .navbar {
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
background: #fff; background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08); box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
.hamburger-container { .hamburger-container {
line-height: 46px; line-height: 46px;
height: 100%; height: 100%;
float: left; float: left;
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background .3s;
-webkit-tap-highlight-color:transparent; -webkit-tap-highlight-color: transparent;
&:hover { &:hover {
background: rgba(0, 0, 0, .025) background: rgba(0, 0, 0, .025)
}
} }
}
.breadcrumb-container {
float: left;
}
.topmenu-container {
position: absolute;
left: 50px;
}
.errLog-container {
display: inline-block;
vertical-align: top;
}
.right-menu { .breadcrumb-container {
float: right; float: left;
height: 100%; }
line-height: 50px;
&:focus { .topmenu-container {
outline: none; position: absolute;
left: 50px;
} }
.right-menu-item { .errLog-container {
display: inline-block; display: inline-block;
padding: 0 8px; vertical-align: top;
}
.right-menu {
float: right;
height: 100%; height: 100%;
font-size: 18px; line-height: 50px;
color: #5a5e66;
vertical-align: text-bottom; &:focus {
outline: none;
}
&.hover-effect { .right-menu-item {
cursor: pointer; display: inline-block;
transition: background .3s; padding: 0 8px;
height: 100%;
font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
&:hover { &.hover-effect {
background: rgba(0, 0, 0, .025) cursor: pointer;
transition: background .3s;
&:hover {
background: rgba(0, 0, 0, .025)
}
} }
} }
}
.avatar-container { .avatar-container {
margin-right: 30px; margin-right: 30px;
.avatar-wrapper { .avatar-wrapper {
margin-top: 5px; margin-top: 5px;
position: relative; position: relative;
.user-avatar { .user-avatar {
cursor: pointer; cursor: pointer;
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 10px; border-radius: 10px;
} }
.el-icon-caret-bottom { .el-icon-caret-bottom {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: -20px; right: -20px;
top: 25px; top: 25px;
font-size: 12px; font-size: 12px;
}
} }
} }
} }
} }
}
</style> </style>
<template> <template>
<RelDialog @getForm='getForm' width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> <RelDialog :changeAddParams='changeAddParams' :changeEditParams='changeEditParams' @getForm='getForm' width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules">
<el-row :gutter="20" :app="this"> <el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " <EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-form-item label="异物图片"> <el-form-item label="异物图片">
<el-upload ref="upload" :headers='{ <el-upload ref="upload" :headers='{
Gtoken Gtoken
}' :action="`${baseurl}/ywxxgl/uywsjlr/attachment/upload`" list-type="picture-card" }' :action="`${baseurl}/attachment/upload/tmp`" list-type="picture-card"
:on-preview="handlePictureCardPreview" :on-success='success' :on-remove="handleRemove" :data="{ :on-preview="handlePictureCardPreview" :on-success='success' :on-remove="handleRemove" :data="{
groupid:'', groupid:'',
folder:'uywsjlr' folder:'uywsjlr'
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
mixins: [editMixin], mixins: [editMixin],
data() { data() {
return { return {
attachmentList:[],
showList:[], showList:[],
baseurl: baseurl, baseurl: baseurl,
Gtoken: Gtoken, Gtoken: Gtoken,
...@@ -131,15 +132,40 @@ ...@@ -131,15 +132,40 @@
} }
}, },
methods: { methods: {
changeEditParams(params){
let attachments=[]
this.attachmentList.forEach(item=>{
attachments.push({
id:item
})
})
this.showList.forEach(item=>{
attachments.push({
id:item.id
})
})
params.attachments=attachments
},
changeAddParams(params){
let attachments=[]
this.attachmentList.forEach(item=>{
attachments.push({
id:item
})
})
params.attachments=attachments
},
handleRemove(file, fileList) { handleRemove(file, fileList) {
let attachmentList = [] let attachmentList = []
fileList.forEach(item => { fileList.forEach(item => {
if (item.status == 'success') { if (item.status == 'success') {
attachmentList.push(item.response.data.id) attachmentList.push(item.response.data.records.id)
} }
}) })
this.form.attachmentList = attachmentList this.attachmentList = attachmentList
console.log(this.form.attachmentList) console.log(this.attachmentList)
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
...@@ -153,11 +179,11 @@ ...@@ -153,11 +179,11 @@
let attachmentList = [] let attachmentList = []
fileList.forEach(item => { fileList.forEach(item => {
if (item.status == 'success') { if (item.status == 'success') {
attachmentList.push(item.response.data.id) attachmentList.push(item.response.data.records.id)
} }
}) })
this.form.attachmentList = attachmentList this.attachmentList = attachmentList
} else { } else {
const delIndex = fileList.findIndex(item => item.uid === file.uid); const delIndex = fileList.findIndex(item => item.uid === file.uid);
...@@ -173,16 +199,7 @@ ...@@ -173,16 +199,7 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(res => { }).then(res => {
this.$post('ywxxgl/uywsjlr/attachment/delete', { this.showList.splice(index, 1)
id: [id]
}).then(res => {
if (res.success) {
this.showList.splice(index, 1)
this.$success('操作成功')
}
})
}) })
}, },
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<AttachFileShow :app='ctx.basePage'></AttachFileShow> <!-- <AttachFileShow :app='ctx.basePage'></AttachFileShow> -->
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> --> <!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template> </template>
......
...@@ -54,14 +54,12 @@ ...@@ -54,14 +54,12 @@
}' :data="{ }' :data="{
groupid:'', groupid:'',
folder:'usbjx' folder:'usbjx'
}" class="upload-demo" :action="`${baseurl}/jxgl/usbjx/attachment/upload`" }" class="upload-demo" :action="`${baseurl}/attachment/upload/tmp`"
:on-success='success' :on-remove="handleRemove" :file-list="fileList"> :on-success='success' :on-remove="handleRemove" :file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
</el-upload> </el-upload>
</div> </div>
</div> </div>
<div v-if="type!='add'"> <div v-if="type!='add'">
<span style="line-height: 40px;font-size: 12px;font-weight: 700;color: #666;">附件列表</span> <span style="line-height: 40px;font-size: 12px;font-weight: 700;color: #666;">附件列表</span>
<div class="download padding-10"> <div class="download padding-10">
...@@ -93,7 +91,7 @@ ...@@ -93,7 +91,7 @@
{{item.name}} {{item.name}}
</div> </div>
<div class="size"> <div class="size">
{{item.size}} {{ sizeFormatter(item.size) }}
</div> </div>
<div class="down"> <div class="down">
<el-button @click="download(item)" size="mini" type="success">下载文件</el-button> <el-button @click="download(item)" size="mini" type="success">下载文件</el-button>
...@@ -164,21 +162,11 @@ ...@@ -164,21 +162,11 @@
}, },
data() { data() {
return { return {
form: { attachmentList:[],
attachmentList: []
},
Gtoken: Gtoken, Gtoken: Gtoken,
baseurl: baseurl, baseurl: baseurl,
fileList: [], fileList: [],
downList: [{ downList: [
name: '测试1',
size: '200kb',
},
{
name: '测试2',
size: '2030kb',
}
], ],
showDialog: false, showDialog: false,
DialogWidth: '40vw', DialogWidth: '40vw',
...@@ -323,6 +311,14 @@ ...@@ -323,6 +311,14 @@
} }
}, },
methods: { methods: {
sizeFormatter(bytes){
if (bytes === 0) return '0 B';
var k = 1000, // or 1024
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k));
return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
},
download(item){ download(item){
let url=`jxgl/usbjx/attachment/download/${item.id}` let url=`jxgl/usbjx/attachment/download/${item.id}`
this.$cDownload(url, {},item.name) this.$cDownload(url, {},item.name)
...@@ -333,24 +329,17 @@ ...@@ -333,24 +329,17 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$post('jxgl/usbjx/attachment/delete', { this.downList.splice(index, 1)
id: [id]
}).then(res => {
if (res.success) {
this.downList.splice(index, 1)
this.$success('操作成功')
}
})
}) })
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
let attachmentList = [] let attachmentList = []
fileList.forEach(item => { fileList.forEach(item => {
if (item.status == 'success') { if (item.status == 'success') {
attachmentList.push(item.response.data.id) attachmentList.push(item.response.data.records.id)
} }
}) })
this.form.attachmentList = attachmentList this.attachmentList = attachmentList
}, },
success(res, file, fileList) { success(res, file, fileList) {
...@@ -362,10 +351,10 @@ ...@@ -362,10 +351,10 @@
let attachmentList = [] let attachmentList = []
fileList.forEach(item => { fileList.forEach(item => {
if (item.status == 'success') { if (item.status == 'success') {
attachmentList.push(item.response.data.id) attachmentList.push(item.response.data.records.id)
} }
}) })
this.form.attachmentList = attachmentList this.attachmentList = attachmentList
} else { } else {
const delIndex = fileList.findIndex(item => item.uid === file.uid); const delIndex = fileList.findIndex(item => item.uid === file.uid);
if (delIndex !== -1) { if (delIndex !== -1) {
...@@ -380,18 +369,19 @@ ...@@ -380,18 +369,19 @@
groupid: form.id, groupid: form.id,
}).then(res => { }).then(res => {
res.data.records.forEach(item => { res.data.records.forEach(item => {
autoAttachDownload({}, 'jxgl/usbjx', item.id).then(res => { this.downList.push(item)
let blob = new Blob([res], { // autoAttachDownload({}, 'jxgl/usbjx', item.id).then(res => {
type: 'application/' + item.type + ';charset=UTF-8', // let blob = new Blob([res], {
}); // type: 'application/' + item.type + ';charset=UTF-8',
let url = URL.createObjectURL(blob) // });
let uitem = { // let url = URL.createObjectURL(blob)
url, // let uitem = {
id: item.id // url,
} // id: item.id
this.downList.push(uitem) // }
// this.downList.push(uitem)
}) // })
...@@ -427,7 +417,14 @@ ...@@ -427,7 +417,14 @@
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.type == 'add') { if (this.type == 'add') {
let attachments=[]
this.attachmentList.forEach(item=>{
attachments.push({
id:item
})
})
let params = { let params = {
attachments,
details: [{ details: [{
id: 'U_JXGJ', id: 'U_JXGJ',
records: [...this.editTableData1] || [] records: [...this.editTableData1] || []
...@@ -448,6 +445,7 @@ ...@@ -448,6 +445,7 @@
this.$success('添加成功') this.$success('添加成功')
this.$refs.reldialog.closeAll() this.$refs.reldialog.closeAll()
let newData = this.form let newData = this.form
newData.id=res.data.id
this.app.$refs.TablePager.tableData.unshift(newData) this.app.$refs.TablePager.tableData.unshift(newData)
/* 总数据++ */ /* 总数据++ */
this.app.$refs.TablePager.total+=1 this.app.$refs.TablePager.total+=1
...@@ -458,8 +456,25 @@ ...@@ -458,8 +456,25 @@
} }
}) })
}else if(this.type=='edit'){ }else if(this.type=='edit'){
/* 修改的时候先拿去加载的文件list
和上传的list 混合然后上传
*/
let attachments=[]
this.attachmentList.forEach(item=>{
attachments.push({
id:item
})
})
this.downList.forEach(item=>{
attachments.push({
id:item
})
})
let params = { let params = {
attachments,
details: [{ details: [{
id: 'U_JXGJ', id: 'U_JXGJ',
records: [...this.editTableData1] || [] records: [...this.editTableData1] || []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment