Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanyizhou
2021-11-21 17:25:36 +08:00
21 changed files with 1249 additions and 262 deletions
+45 -4
View File
@@ -1,8 +1,12 @@
<template>
<div @click="toPage">
<div>
<div v-if="label">
<span class="card-font">{{ label }}</span>
<div v-if="label" class="icon-style">
<span v-for="item in icons" v-if="item.label === label" :class="item.icon">
<span style="padding-left: 10px">
{{ label }}
</span>
</span>
</div>
<div v-else>
<div class="labelNull">
@@ -17,7 +21,43 @@
export default {
name: 'EnterCard',
props: ['icon', 'label', 'path'],
data () {
return {
icons: [],
iconList: ['el-icon-help','el-icon-s-order',
'el-icon-document-remove','el-icon-document-checked',
'el-icon-folder','el-icon-notebook-2',
'el-icon-bangzhu','el-icon-reading'],
iconInfo: [],
}
},
mounted() {
this.getData()
},
methods: {
getData (){
this.$http.get('/sarPersonalCenter/sar-user-personal-menu/getList',
{
userId: this.$store.getters.userInfo.userId
}, {_this: this}, res => {
if (res.ok) {
res.data.records.forEach(item => {
this.icons.push({
label: item.menuName,
icon: ''
})
})
}
this.icons.forEach((item,index)=>{
if (index > this.iconList.length) {
let i = index % this.iconList.length
item.icon = this.iconList[i]
} else {
item.icon = this.iconList[index]
}
})
})
},
toPage() {
this.$router.push(this.path)
}
@@ -40,13 +80,14 @@
border-radius: 5px;
width: 100%;
height: 70px;
background-color: #99BEDB;
color: #fff;
background-color: #4788c0;
}
}
.wx-card:hover {
& > div {
color: #fff;
background-color: #0068B7;
background-color: #3a8ee6;
}
}
.wx-card1 {
+94 -6
View File
@@ -1,13 +1,91 @@
<!-- 尾部链接 -->
<template>
<div class="link" id="link">
<!-- 此部分暂时这样写到后面做修改 -->
<div style="display: inline-block;width: 15%;">
<span class="title borderRight">友情链接</span>
</div>
<div style="display: inline-block;width: 80%;text-align: center">
<div>
<span class="title borderRight">友情链接</span>
<el-row>
<el-col :span="4">
<a style="color: #0068B7;" href="http://www.sac.gov.cn/">国标委</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://www.catarc.org.cn/">汽标委</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://openstd.samr.gov.cn/bzgk/gb/index">国标全文公开</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://std.samr.gov.cn/">全国标准信息公共服务</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://jtst.mot.gov.cn/">交通部标准信息</a>
</el-col>
</el-row>
</div>
<div>
<el-row>
<el-col :span="4">
<a style="color: #0068B7;" href="https://www.un.org/zh/aboutun/structure/unece/">欧洲经济委员会</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://eur-lex.europa.eu">欧盟</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://www.interregs.com/">InterRegs </a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://tbt.sist.org.cn/cslm/wtotbttb/">WTO/TBT通报</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://www.iso.org/home.html">ISO</a>
</el-col>
</el-row>
</div>
</div>
<div style="display: inline-block;width: 15%;">
<span class="borderLeft"></span>
<span class="myLi1" @click="$router.push('linkManage')">更多链接 </span></div>
<!-- <div>
<span class="myLi1 borderRight" v-for="(link, index) in linkList" :key="index" @click="openLinkUrl(link.url)" :title="link.name" >
{{ link.name }}
</span>
<span class="myLi1" @click="$router.push('linkManage')">更多链接 </span>
</div>
</div>
<div v-show="false">
<span class="myLi1 borderRight" v-for="(link, index) in linkList" :key="index" @click="openLinkUrl(link.url)" :title="link.name" >
{{ link.name }}
</span>
<span class="myLi1" @click="$router.push('linkManage')">更多链接 </span>
</div>-->
</div>
</template>
@@ -70,6 +148,7 @@
}
let list
list = res.data.slice(0, c)
console.log(list)
this.linkList = list
})
}
@@ -85,16 +164,25 @@
border-radius: 3px;
height: 100%;
align-items: center;
justify-content: space-around;
box-shadow: 1px 1px 10px rgba(0,0,0,0.1);
.borderRight {
padding-right: 30px;
margin-right: 30px;
//padding-right: 50px;
//margin-right: 50px;
border-right: 2px dotted #aaa;
}
.borderLeft {
margin-right: 50px;
//padding-left: 50px;
//margin-left: 50px;
border-left: 2px dotted #aaa;
}
.borderMiddle {
border-left: 2px dotted #aaa;
}
.title {
padding-right: 50px;
font-weight: bold;
padding-left: 10px;
padding-left: 40px;
width: 80px;
}
.myLi1 {
@@ -105,7 +105,7 @@ export default {
width: 18vm;
height: 40px;
color: #333333;
font-size: 13px;
font-size: 14px;
border: 0;
border-radius: 3px;
background-color: #FFFFFF;
@@ -1289,10 +1289,10 @@ export default {
}
.more {
float: right;
color: #5ea9f6;
color: #4788c0;
margin: 15px 15px;
&:hover {
color: #5ea9f6;
color: #3a8ee6;
cursor: pointer;
}
}
+8 -5
View File
@@ -28,10 +28,10 @@
<todo-list></todo-list>
</div>
</div>
<div calss="home_footer">
<div class="footer">
<div calss="home_footer" style="padding: 0">
<el-card class="footer">
<Empennage></Empennage>
</div>
</el-card>
</div>
</div>
</template>
@@ -182,9 +182,12 @@ export default {
}
}
}
/deep/.el-card__body {
padding: 0;
}
.footer {
height: 49px;
line-height: 49px;
height: 90px;
line-height: 44px;
//margin-top: 0.3vh;
//line-height: 5.2vh;
background: #FFFFFF;
+1 -1
View File
@@ -73,7 +73,7 @@
</div>
<div class="content_text">
<span>会议附件 :
<span v-if="item.files.length === '0'">{{ '-' }}</span>
<span v-if="item.files.length === 0">{{ '-' }}</span>
<span v-for="res in item.files" :key="res.id" style="color: #409EFF;" @click="previews(res.id)">
{{ res.name }} {{ ';'}}
</span>
@@ -128,7 +128,7 @@
<h4>责任部门对接人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.dockUserList" style="display: none;"></el-input>
<el-input v-model="roleForm.dockUserName" placeholder="选择责任人" @click.native="choiceZRRS">
<el-input v-model="roleForm.dockUserName" :title="roleForm.dockUserName" placeholder="选择责任人" readonly="readonly" @click.native="choiceZRRS">
</el-input>
</div>
</el-form-item>
@@ -140,7 +140,7 @@
<h4>标准法规部部长</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.ministerUser" style="display: none;"></el-input>
<el-input v-model="roleForm.ministerUserName" placeholder="选择标准法规部部长" @click.native="choiceZRR('ministerUser', '选择标准法规部部长', roleForm.ministerUser)"></el-input>
<el-input v-model="roleForm.ministerUserName" placeholder="选择标准法规部部长" readonly="readonly" @click.native="choiceZRR('ministerUser', '选择标准法规部部长', roleForm.ministerUser)"></el-input>
</div>
</el-form-item>
</el-card>
@@ -151,7 +151,7 @@
<h4>技术管理中心主任</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.directorUser" style="display: none;"></el-input>
<el-input v-model="roleForm.directorUserName" placeholder="选择技术管理中心主任" @click.native="choiceZRR('directorUser', '选择技术管理中心主任', roleForm.directorUser)"></el-input>
<el-input v-model="roleForm.directorUserName" placeholder="选择技术管理中心主任" readonly="readonly" @click.native="choiceZRR('directorUser', '选择技术管理中心主任', roleForm.directorUser)"></el-input>
</div>
</el-form-item>
</el-card>
@@ -162,7 +162,7 @@
<h4>工程研究总院院长</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.presidentUser" style="display: none;"></el-input>
<el-input v-model="roleForm.presidentUserName" placeholder="选择工程研究总院院长" @click.native="choiceZRR('presidentUser', '选择工程研究总院院长', roleForm.presidentUser)"></el-input>
<el-input v-model="roleForm.presidentUserName" placeholder="选择工程研究总院院长" readonly="readonly" @click.native="choiceZRR('presidentUser', '选择工程研究总院院长', roleForm.presidentUser)"></el-input>
</div>
</el-form-item>
</el-card>
@@ -347,12 +347,15 @@ export default {
upload(row, title) {
var params = {
columnName: {
chapterNumber: '章条编号',
chapterName: '章节名称',
commentText: '修改意见内容(包括理由或依据)',
department: '提出部门',
responUserName: '提出人',
stateText: '处理意见'
chapterNumber: "章条编号",
chapterName: "章节名称",
commentText: "修改意见内容(包括理由或依据)",
oldText: "修改前",
newText: "修改后",
reason: "修改理由",
department: "提出部门",
responUserName: "提出人",
stateText: "处理意见"
},
dataList: []
}
@@ -347,12 +347,15 @@ export default {
upload(row, title) {
var params = {
columnName: {
chapterNumber: '章条编号',
chapterName: '章节名称',
commentText: '修改意见内容(包括理由或依据)',
department: '提出部门',
responUserName: '提出人',
stateText: '处理意见'
chapterNumber: "章条编号",
chapterName: "章节名称",
commentText: "修改意见内容(包括理由或依据)",
oldText: "修改前",
newText: "修改后",
reason: "修改理由",
department: "提出部门",
responUserName: "提出人",
stateText: "处理意见"
},
dataList: []
}
@@ -350,6 +350,9 @@ export default {
chapterNumber: "章条编号",
chapterName: "章节名称",
commentText: "修改意见内容(包括理由或依据)",
oldText: "修改前",
newText: "修改后",
reason: "修改理由",
department: "提出部门",
responUserName: "提出人",
stateText: "处理意见"
@@ -14,12 +14,12 @@
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" onclick="">查询</el-button>
<el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" onclick="">清空</el-button>
</el-form-item>
<el-divider/>
<div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button>
<el-button type="primary" size="small" @click="dataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -61,7 +61,7 @@
</el-table-column>
<el-table-column
align="center"
prop="payMoney"
prop="money"
label="支出金额">
</el-table-column>
<el-table-column
@@ -71,8 +71,16 @@
</el-table-column>
<el-table-column
align="center"
prop="detailAnnex"
prop="annex"
show-overflow-tooltip
label="详细附件">
<template slot-scope="scope">
<span v-if="scope.row.annex.length === 0">{{ '-' }}</span>
<span v-for="res in scope.row.annex" :key="res.id" style="color: #409EFF;">
{{ res.name }} {{ ';'}}
</span>
<!--<el-button size="mini" type="primary" @click="fileDetail(scope.row)"></el-button>-->
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope">
@@ -111,26 +119,53 @@
</el-input>
</el-form-item>
<el-form-item label="支出金额">
<el-input v-model="formShowData.payMoney" type="text" placeholder="请填写"></el-input>
<el-input v-model="formShowData.money" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="用途">
<el-input v-model="formShowData.use" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="详细附件">
<el-input v-model="formShowData.detailAnnex" type="text">
<el-input v-model="formShowData.annex" type="text">
</el-input>
<el-upload
:disabled="acceptShow"
multiple
ref="uploadFile"
:action="actionPath"
name="file"
:file-list="annexList"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
:before-upload="handleBeforeUpload"
:before-remove="handleBeforeRemove"
:on-success="handleOnsuccess"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button>
<el-button size="small" @click="drawerTable = false">取消</el-button>
<el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div>
</el-drawer>
<el-dialog
:visible.sync="annexDialog"
width="30%"
:before-close="handleClose">
<el-upload
:action="''"
name="file"
:file-list="annexList"
:on-preview="handleOnPreview"
>
</el-upload>
</el-dialog>
<!-- <div>
&lt;!&ndash; 导入弹框 &ndash;&gt;
<el-dialog
@@ -149,6 +184,7 @@
</template>
<script>
import { exportQuery, exportEdit, exportAdd, exportDel } from '@/api/statisticsApi'
export default {
name: "child2",
data() {
@@ -166,15 +202,24 @@ export default {
tableData: [],
multipleSelection: [],
formShowData: {
id: '',
name: '',
payMoney: '',
money: '',
use: '',
detailAnnex: ''
annex: ''
},
drawerTable: false,
drawerTitle: '',
formRules: {},
submitLoading: false,
// 上传路径
actionPath: 'api/att/attFile/upload',
acceptShow: false,
annexDialog: false,
annexList: [],
}
},
@@ -183,14 +228,102 @@ export default {
},
methods: {
getTableData() {
exportQuery(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
//新增方法
dataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
// 查询按钮
queryData() {
this.getTableData()
},
//清空
resetForm() {
this.formQuery = {}
this.getTableData()
},
// 提交按钮
submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
exportAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
exportEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
},
//删除方法
deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
exportDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
},
// 列表更多按钮
handleCommand(command) {
@@ -199,13 +332,48 @@ export default {
this.editRowOne(command[0]);
break;
case "删除":
this.deleteRowOne("delOne", command[0].id);
this.deleteRowOne(command[0].id);
break;
}
},
editRowOne() {
editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
name: item.name,
money: item.money,
use: item.use,
annex: item.annex
}
this.drawerTable = true
},
deleteRowOne() {
deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
exportDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
/** 分页 */
pageChange(page) {
@@ -216,6 +384,81 @@ export default {
this.formQuery.pageSize = pageSize
this.getTableData()
},
/** 附件详情 */
fileDetail(val) {
this.tableFile = val
this.annexList = this.tableFile.annex
this.annexDialog = true
this.acceptShow = true
},
// 文件上传成功
handleOnsuccess(res, file, fileList) {
if (res.ok) {
if (this.annexList !== undefined) {
this.newDataList = this.annexList
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
})
} else {
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
})
}
this.tableFile.annex = this.newDataList
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
this.newDataList = []
this.fileMadel = false
}
},
// 移除上传的文件
handleBeforeRemove(file, fileList) {
this.annexList.forEach((item, index) => {
if (item.name === file.name || item.id === file.id ) {
this.annexList.splice(index,1)
}
})
this.tableFile.annex = this.annexList
},
// 文件上传限制条件
handleBeforeUpload(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式
if (fileSuffix === '.ZIP' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.zip' || fileSuffix === '.xls' || fileSuffix === '.xlsx') {
return true
} else {
this.spinShow = false
this.$message.error('文件' + file.name + '格式不正确,请上传ZIP/DOCX或XLS文件')
return false
}
// 判断文件上传大小
// eslint-disable-next-line no-unreachable
if (file.size / 1024 / 1024 <= 200) {
return true
} else {
this.$message.error('文件' + file.name + '大小不超过200M')
return false
}
return true
},
// 点击上传的文件进行下载
handleOnPreview(file) {
let attId = file.id
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
}
}
</script>
@@ -7,18 +7,18 @@
<el-input v-model="formQuery.name" size="small" placeholder="请输入标准名称"></el-input>
</el-form-item>
<el-form-item label="标准编号">
<el-input v-model="formQuery.num" size="small" placeholder="请输入标准编号"></el-input>
<el-input v-model="formQuery.number" size="small" placeholder="请输入标准编号"></el-input>
</el-form-item>
<el-form-item label="补助来源">
<el-input v-model="formQuery.source" size="small" placeholder="请输入补助来源"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="">查询</el-button>
<el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button>
</el-form-item>
<el-divider/>
<div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button>
<el-button type="primary" size="small" @click="dataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -56,7 +56,7 @@
</el-table-column>
<el-table-column
align="center"
prop="num"
prop="number"
label="标准编号">
</el-table-column>
<el-table-column
@@ -66,13 +66,16 @@
</el-table-column>
<el-table-column
align="center"
prop="money"
prop="cost"
label="补助金额">
</el-table-column>
<el-table-column
align="center"
prop="time"
label="入账时间">
<template slot-scope="scope">
{{ scope.row.time ? $moment(scope.row.time).format("YYYY-MM-DD HH:mm:ss") : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope">
@@ -111,25 +114,30 @@
</el-input>
</el-form-item>
<el-form-item label="标准编号">
<el-input v-model="formShowData.num" type="text" placeholder="请填写"></el-input>
<el-input v-model="formShowData.number" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="补助来源">
<el-input v-model="formShowData.source" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="补助金额">
<el-input v-model="formShowData.money" type="text" placeholder="请填写">
<el-input v-model="formShowData.cost" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="入账时间">
<el-input v-model="formShowData.time" type="text" placeholder="请填写">
</el-input>
<el-date-picker
v-model="formShowData.time"
type="datetime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button>
<el-button size="small" @click="drawerTable = false">取消</el-button>
<el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div>
</el-drawer>
@@ -171,6 +179,7 @@
</template>
<script>
import { inComeQuery, inComeEdit, inComeAdd, inComeDel } from '@/api/statisticsApi'
export default {
name: "child1",
data() {
@@ -178,7 +187,7 @@ export default {
loading: false,
formQuery: {
name: '',
num: '',
number: '',
source: '',
current: 1,
page: 1,
@@ -188,33 +197,120 @@ export default {
tableData: [],
multipleSelection: [],
formShowData: {
id: '',
name: '',
num: '',
number: '',
source: '',
money: '',
cost: '',
time: ''
},
drawerTable: false,
drawerTitle: '',
formRules: {},
submitLoading: false
}
},
created() {
this.getTableData()
},
methods: {
getTableData() {
inComeQuery(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
//新增方法
dataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
// 提交按钮
submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
inComeAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
inComeEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
},
handleSelectionChange(val) {
this.multipleSelection = val
},
//删除方法
deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
inComeDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
},
//点击确定(编辑)(没出)
handleSelectionChange() {
// 查询按钮
queryData() {
this.getTableData()
},
//清空
resetForm(formName) {
resetForm() {
this.formQuery = {}
this.getTableData()
},
// 列表更多按钮
handleCommand(command) {
@@ -223,13 +319,50 @@ export default {
this.editRowOne(command[0]);
break;
case "删除":
this.deleteRowOne("delOne", command[0].id);
this.deleteRowOne(command[0].id);
break;
}
},
editRowOne() {
editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
type: item.type,
number: item.number,
name: item.name,
source: item.source,
cost: item.cost,
time: this.$moment(item.time).format('YYYY-MM-DD HH:mm:ss'),
}
this.drawerTable = true
},
deleteRowOne() {
deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
inComeDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
/** 分页 */
pageChange(page) {
@@ -116,7 +116,7 @@
:visible.sync="drawerTable">
<div style="margin: 10px;height: inherit">
<el-form label-width="100px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="类型">
<el-form-item label="类型" prop="type">
<el-select v-model="formShowData.type" type="text" placeholder="请填写">
<el-option
v-for="item in typeOptions"
@@ -126,18 +126,18 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="项目编号">
<el-form-item label="项目编号" prop="proId">
<el-input v-model="formShowData.proId" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="项目名称">
<el-form-item label="项目名称" prop="proName">
<el-input v-model="formShowData.proName" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="费用列支项">
<el-form-item label="费用列支项" prop="costOutlay">
<el-input v-model="formShowData.costOutlay" placeholder="请选择">
</el-input>
</el-form-item>
<el-form-item label="费用支出">
<el-form-item label="费用支出" prop="cost">
<el-input v-model="formShowData.cost" placeholder="请选择">
</el-input>
</el-form-item>
@@ -193,7 +193,13 @@ export default {
},
drawerTable: false,
drawerTitle: '',
formRules: {},
formRules: {
type: [{ required: true, message: '请选择类型', trigger: 'blur' }],
proId: [{ required: true, message: '请填写项目编号', trigger: 'blur' }],
proName: [{ required: true, message: '请填写项目名称', trigger: 'blur' }],
costOutlay: [{ required: true, message: '请填写费用列支项', trigger: 'blur' }],
cost: [{ required: true, message: '请填写费用支出', trigger: 'blur' }],
},
submitLoading: false,
typeOptions: [
@@ -381,7 +387,7 @@ export default {
position: inherit!important;
}
.el-form-item {
margin-bottom: 10px;
margin-bottom: 20px;
}
.el-divider--horizontal {
@@ -7,19 +7,19 @@
<el-input v-model="formQuery.type" size="small" placeholder="请输入标准类型"></el-input>
</el-form-item>
<el-form-item label="标准代号">
<el-input v-model="formQuery.num" size="small" placeholder="请输入标准代号"></el-input>
<el-input v-model="formQuery.number" size="small" placeholder="请输入标准代号"></el-input>
</el-form-item>
<el-form-item label="标准名称">
<el-input v-model="formQuery.name" size="small" placeholder="请输入标准名称">
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" onclick="">查询</el-button>
<el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button>
</el-form-item>
<el-divider/>
<div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button>
<el-button type="primary" size="small" @click="formDataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -47,44 +47,33 @@
align="center"
type="index"
label="序号"
width="50"
>
width="50">
</el-table-column>
<el-table-column
align="center"
prop="type"
label="标准类型"
>
label="标准类型">
</el-table-column>
<el-table-column
align="center"
prop="num"
label="标准代号"
>
prop="number"
label="标准代号">
</el-table-column>
<el-table-column
align="center"
prop="name"
label="标准名称"
>
label="标准名称">
</el-table-column>
<el-table-column
align="center"
prop="pages"
label="页数"
>
label="页数">
</el-table-column>
<el-table-column
align="center"
prop="cost"
label="费用"
>
label="费用">
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope">
@@ -107,7 +96,7 @@
<loading :loading="loading">加载中...</loading>
<pagination
:page="formQuery.page"
:total="formQuery.tableTotal"
:total="tableTotal"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"/>
</div>
@@ -116,26 +105,26 @@
size="50%"
:title="drawerTitle"
:visible.sync="drawerTable">
<div style="margin: 10px;height: inherit">
<div style="margin: 10px 50px 10px 20px;height: inherit">
<el-form label-width="150px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="标准类型">
<el-form-item label="标准类型" prop="type">
<el-select v-model="formShowData.type" type="text" placeholder="请填写">
<el-option label="1" value="one"></el-option>
<el-option label="2" value="two"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标准代号">
<el-input v-model="formShowData.num" type="text" placeholder="请填写"></el-input>
<el-form-item label="标准代号" prop="number">
<el-input v-model="formShowData.number" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="标准名称">
<el-form-item label="标准名称" prop="name">
<el-input v-model="formShowData.name" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="页数">
<el-form-item label="页数" prop="pages">
<el-input v-model="formShowData.pages" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="费用">
<el-form-item label="费用" prop="cost">
<el-input v-model="formShowData.cost" placeholder="请选择">
</el-input>
</el-form-item>
@@ -143,7 +132,7 @@
</div>
<div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button>
<el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div>
</el-drawer>
@@ -186,6 +175,7 @@
</template>
<script>
import { CgfysAll, CgfysEdit, CgfysAdd, CgfysDelMore } from '@/api/statisticsApi'
export default {
name: "child4",
data() {
@@ -193,20 +183,34 @@ export default {
loading: false,
formQuery: {
type: '',
num: '',
number: '',
name: '',
current: 1,
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
tableTotal: 0
},
tableTotal: 0,
tableData: [],
multipleSelection: [],
formShowData: {},
formShowData: {
id: '',
type: '',
number: '',
name: '',
pages: '',
cost: ''
},
drawerTable: false,
drawerTitle: '',
formRules: {}
formRules: {
type: [{ required: true, message: '请选择标准类型', trigger: 'blur' }],
number: [{ required: true, message: '请填写标准代号', trigger: 'blur' }],
name: [{ required: true, message: '请填写标准代号', trigger: 'blur' }],
pages: [{ required: true, message: '请填写页数', trigger: 'blur' }],
cost: [{ required: true, message: '请填写费用', trigger: 'blur' }],
},
submitLoading: false,
}
},
@@ -215,17 +219,104 @@ export default {
},
methods: {
getTableData() {
CgfysAll(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
//新增方法
formDataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
// 提交方法
submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
CgfysAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
CgfysEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
},
//删除方法
deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
CgfysDelMore(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
},
// 查询
queryData() {
this.getTableData()
},
//清空
resetForm() {
this.formQuery = {}
this.getTableData()
},
// 列表更多按钮
handleCommand(command) {
@@ -234,13 +325,49 @@ export default {
this.editRowOne(command[0]);
break;
case "删除":
this.deleteRowOne("delOne", command[0].id);
this.deleteRowOne(command[0].id);
break;
}
},
editRowOne() {
editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
type: item.type,
number: item.number,
name: item.name,
pages: item.pages,
cost: item.cost
}
this.drawerTable = true
},
deleteRowOne() {
deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
CgfysDelMore(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
/** 分页 */
pageChange(page) {
@@ -264,10 +391,10 @@ export default {
.pagination {
position: inherit!important;
}
.el-form-item {
margin-bottom: 0px;
}
.el-form-item {
margin-bottom: 20px;
}
.el-divider--horizontal {
height: 0.5px;
margin: 10px 0;
@@ -131,16 +131,13 @@
:visible.sync="drawerTable">
<div style="margin: 10px;height: inherit">
<el-form label-width="100px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="主办单位">
<el-select v-model="formShowData.unit" type="text" placeholder="请填写">
<el-option label="1" value="one"></el-option>
<el-option label="2" value="two"></el-option>
</el-select>
<el-form-item label="主办单位" prop="unit">
<el-input v-model="formShowData.unit" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="会议名称">
<el-form-item label="会议名称" prop="meetName">
<el-input v-model="formShowData.meetName" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="会议时间">
<el-form-item label="会议时间" prop="meetTime">
<el-date-picker
v-model="formShowData.meetTime"
type="datetime"
@@ -149,17 +146,23 @@
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="会费标准">
<el-form-item label="会费标准" prop="payStandard">
<el-input v-model="formShowData.payStandard" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="实际发生">
<el-form-item label="实际发生" prop="payReality">
<el-input v-model="formShowData.payReality" placeholder="请选择">
</el-input>
</el-form-item>
<el-form-item label="费用列支">
<el-input v-model="formShowData.costOutlay" placeholder="请选择">
</el-input>
<el-form-item label="费用列支" prop="costOutlay">
<el-select size="small" v-model="formShowData.costOutlay">
<el-option
v-for="item in costOptions"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
@@ -229,7 +232,14 @@ export default {
drawerTable: false,
drawerTitle: '',
formRules: {},
formRules: {
unit: [{ required: true, message: '请填写主办单位', trigger: 'blur' }],
meetName: [{ required: true, message: '请填写会议名称', trigger: 'blur' }],
meetTime: [{ required: true, message: '请选择会议时间', trigger: 'blur' }],
payStandard: [{ required: true, message: '请填写会费标准', trigger: 'blur' }],
payReality: [{ required: true, message: '请填写实际发生', trigger: 'blur' }],
costOutlay: [{ required: true, message: '请选择费用列支', trigger: 'blur' }],
},
formShowData: {
id: '',
unit: '',
@@ -425,7 +435,7 @@ export default {
position: inherit!important;
}
.el-form-item {
margin-bottom: 10px;
margin-bottom: 20px;
}
.el-divider--horizontal {
@@ -112,34 +112,41 @@
:title="drawerTitle"
:visible.sync="drawerTable">
<div style="margin: 10px 50px 10px 20px;height: inherit">
<el-form label-width="120px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="协会名称-标委会">
<el-form label-width="150px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="协会名称-标委会" prop="scName">
<el-select v-model="formShowData.scName" type="text" placeholder="请填写">
<el-option label="1" value="one"></el-option>
<el-option label="2" value="two"></el-option>
</el-select>
</el-form-item>
<el-form-item label="协会名称-分委会">
<el-form-item label="协会名称-分委会" prop="sscName">
<el-input v-model="formShowData.sscName" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="协会名称-工作组">
<el-form-item label="协会名称-工作组" prop="wgName">
<el-input v-model="formShowData.wgName" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="会费标准">
<el-form-item label="会费标准" prop="payStandard">
<el-input v-model="formShowData.payStandard" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="实际发生">
<el-form-item label="实际发生" prop="payReality">
<el-input v-model="formShowData.payReality" placeholder="请选择">
</el-input>
</el-form-item>
<el-form-item label="费用列支">
<el-form-item label="费用列支" prop="costOutlay">
<el-input v-model="formShowData.costOutlay" placeholder="请选择">
</el-input>
</el-form-item>
<el-form-item label="每年缴费情况">
<el-input v-model="formShowData.annualPayment" type="text" placeholder="请填写"></el-input>
<el-form-item label="每年缴费情况" prop="annualPayment">
<el-select v-model="formShowData.annualPayment" size="small" placeholder="请选择缴费情况">
<el-option
v-for="item in payOptions"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
@@ -190,7 +197,15 @@ export default {
drawerTable: false,
// 提交按钮loading
submitLoading: false,
formRules: {},
formRules: {
scName: [{ required: true, message: '请填写协会名称-标委会', trigger: 'blur' }],
sscName: [{ required: true, message: '请填写协会名称-分委会', trigger: 'blur' }],
wgName: [{ required: true, message: '请填写协会名称-工作组', trigger: 'blur' }],
payStandard: [{ required: true, message: '请填写会费标准', trigger: 'blur' }],
payReality: [{ required: true, message: '请填写实际发生', trigger: 'blur' }],
costOutlay: [{ required: true, message: '请填写费用列支', trigger: 'blur' }],
annualPayment: [{ required: true, message: '请选择每年缴费情况', trigger: 'blur' }],
},
// 新增、编辑数组
formShowData: {
id: '',
@@ -400,7 +415,7 @@ export default {
position: inherit!important;
}
.el-form-item {
margin-bottom: 10px;
margin-bottom: 20px;
}
.el-divider--horizontal {
@@ -7,18 +7,18 @@
<el-input v-model="formQuery.type" size="small" placeholder="根据标准类型搜索"></el-input>
</el-form-item>
<el-form-item label="标准代号">
<el-input v-model="formQuery.num" size="small" placeholder="根据标准代号搜索"></el-input>
<el-input v-model="formQuery.number" size="small" placeholder="根据标准代号搜索"></el-input>
</el-form-item>
<el-form-item label="标准名称">
<el-input v-model="formQuery.name" size="small" placeholder="根据标准名称搜索"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" onclick="">查询</el-button>
<el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button>
</el-form-item>
<el-divider/>
<div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button>
<el-button type="primary" size="small" @click="dataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -56,7 +56,7 @@
</el-table-column>
<el-table-column
align="center"
prop="num"
prop="number"
label="标准代号">
</el-table-column>
@@ -67,7 +67,7 @@
</el-table-column>
<el-table-column
align="center"
prop="translateType"
prop="translation"
label="翻译类型">
</el-table-column>
<el-table-column
@@ -82,7 +82,7 @@
</el-table-column>
<el-table-column
align="center"
prop="completeTime"
prop="time"
label="翻译完成时间">
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
@@ -124,14 +124,14 @@
</el-select>
</el-form-item>
<el-form-item label="标准代号">
<el-input v-model="formShowData.num" type="text" placeholder="请填写"></el-input>
<el-input v-model="formShowData.number" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="标准名称">
<el-input v-model="formShowData.name" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="翻译类型">
<el-input v-model="formShowData.translateType" type="text" placeholder="请填写">
<el-input v-model="formShowData.translation" type="text" placeholder="请填写">
</el-input>
</el-form-item>
@@ -144,14 +144,14 @@
</el-input>
</el-form-item>
<el-form-item label="翻译完成时间">
<el-input v-model="formShowData.completeTime" placeholder="请填写">
<el-input v-model="formShowData.time" placeholder="请填写">
</el-input>
</el-form-item>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button>
<el-button size="small" @click="drawerTable = false">取消</el-button>
<el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div>
</el-drawer>
@@ -193,6 +193,7 @@
</template>
<script>
import { fyQuery, fyDetail, fyEdit, fyAdd, fyDel } from '@/api/statisticsApi'
export default {
name: "children",
data() {
@@ -200,7 +201,7 @@ export default {
loading: false,
formQuery: {
type: '',
num: '',
number: '',
name: '',
current: 1,
page: 1,
@@ -210,17 +211,19 @@ export default {
tableData: [],
multipleSelection: [],
formShowData: {
id: '',
type: '',
num: '',
number: '',
name: '',
translateType: '',
translation: '',
pages: '',
cost: '',
completeTime: ''
time: ''
},
drawerTable: false,
drawerTitle: '',
formRules: {},
submitLoading: false,
}
},
@@ -229,19 +232,102 @@ export default {
},
methods: {
getTableData() {
fyQuery(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
//新增方法
dataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
fyAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
fyEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
},
//删除方法
deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
fyDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
},
// 查询按钮
queryData() {
this.getTableData()
},
//清空
resetForm() {
this.formQuery = {}
this.getTableData()
},
// 列表更多按钮
handleCommand(command) {
switch (command[1]) {
@@ -249,13 +335,51 @@ export default {
this.editRowOne(command[0]);
break;
case "删除":
this.deleteRowOne("delOne", command[0].id);
this.deleteRowOne(command[0].id);
break;
}
},
editRowOne() {
editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
type: item.type,
number: item.number,
name: item.name,
translation: item.translation,
pages: item.pages,
cost: item.cost,
time: item.time,
}
this.drawerTable = true
},
deleteRowOne() {
deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
fyDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
/** 分页 */
pageChange(page) {