Commit 17d99974 by Lyan

后台bug修改

parent 46bf04e0
......@@ -148,113 +148,113 @@
<script>
import { piclevelList } from '@/utils'
import Ueditor from "../temps/ueditor";
import Ueditor from '../temps/ueditor'
export default {
components: {
Ueditor,
Ueditor
},
props: ['classidList'],
data() {
data () {
return {
loading: false,
showInfo: false,
visible: false,
defaultProps: {
children: "children",
label: "label",
children: 'children',
label: 'label'
},
dataForm: {
id: 0,
title: "",
titleOld: "",
keyword: "",
brief: "",
author: "",
source: "",
levels: "",
directpath: "",
pic: "",
content: "",
showtime: "",
classid: "",
title: '',
titleOld: '',
keyword: '',
brief: '',
author: '',
source: '',
levels: '',
directpath: '',
pic: '',
content: '',
showtime: '',
classid: ''
},
dataRule: {
title: [{ required: true, message: "不能为空", trigger: "blur" }],
titleOld: [{ required: true, message: "不能为空", trigger: "blur" }],
keyword: [{ required: true, message: "不能为空", trigger: "blur" }],
brief: [{ required: true, message: "不能为空", trigger: "blur" }],
author: [{ required: true, message: "不能为空", trigger: "blur" }],
source: [{ required: true, message: "不能为空", trigger: "blur" }],
levels: [{ required: true, message: "不能为空", trigger: "blur" }],
directpath: [{ required: true, message: "不能为空", trigger: "blur" }],
pic: [{ required: true, message: "不能为空", trigger: "blur" }],
title: [{ required: true, message: '不能为空', trigger: 'blur' }],
titleOld: [{ required: true, message: '不能为空', trigger: 'blur' }],
keyword: [{ required: true, message: '不能为空', trigger: 'blur' }],
brief: [{ required: true, message: '不能为空', trigger: 'blur' }],
author: [{ required: true, message: '不能为空', trigger: 'blur' }],
source: [{ required: true, message: '不能为空', trigger: 'blur' }],
levels: [{ required: true, message: '不能为空', trigger: 'blur' }],
directpath: [{ required: true, message: '不能为空', trigger: 'blur' }],
pic: [{ required: true, message: '不能为空', trigger: 'blur' }],
// content: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
classid: [{ required: true, message: "不能为空", trigger: "blur" }],
showtime: [{ required: true, message: "不能为空", trigger: "blur" }],
classid: [{ required: true, message: '不能为空', trigger: 'blur' }],
showtime: [{ required: true, message: '不能为空', trigger: 'blur' }]
},
imgUrl: new FormData(),
imgUrlStr: "",
imgUrlStr: '',
dialogVisible: false,
ueditor: {
value: "",
config: {},
value: '',
config: {}
},
piclevelList,
id: [],
classidList: [],
title: "",
className: "",
cclassName: "",
};
title: '',
className: '',
cclassName: ''
}
},
mounted() {
console.log(this.classidList);
mounted () {
console.log(this.classidList)
},
methods: {
getSelectName(list, id) {
getSelectName (list, id) {
let arr = list.filter((item) => {
return item.id === id;
});
return arr[0].name;
return item.id === id
})
return arr[0].name
},
init(id, showInfo) {
console.log(id, 'id');
this.dataForm.id = id || 0;
this.visible = true;
this.showInfo = showInfo;
init (id, showInfo) {
console.log(id, 'id')
this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => {
this.clearInp();
this.clearInp()
if (this.dataForm.id) {
this.loading = true;
this.loading = true
this.$http({
url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`),
method: "get",
params: this.$http.adornParams(),
method: 'get',
params: this.$http.adornParams()
}).then(({ data }) => {
this.loading = false;
this.loading = false
if (data && data.code === 0) {
this.dataForm = data.news;
this.imgUrlStr = data.news.pic;
this.dialogVisible = true;
this.ueditor.value = this.dataForm.content;
this.dataForm = data.news
this.imgUrlStr = data.news.pic
this.dialogVisible = true
this.ueditor.value = this.dataForm.content
}
});
})
}
});
})
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.loading = true;
this.loading = true
this.$http({
url: this.$http.adornUrl(
`/office/news/${!this.dataForm.id ? "save" : "update"}`
`/office/news/${!this.dataForm.id ? 'save' : 'update'}`
),
method: "post",
method: 'post',
data: this.$http.adornData({
id: this.dataForm.id || undefined,
title: this.dataForm.title,
......@@ -268,79 +268,79 @@ export default {
pic: this.dataForm.pic,
content: this.dataForm.content,
classid: this.dataForm.classid,
showtime: this.dataForm.showtime,
}),
showtime: this.dataForm.showtime
})
}).then(({ data }) => {
this.loading = false;
this.loading = false
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg);
this.$message.error(data.msg)
}
});
})
}
});
})
},
// 上传之前校验
beforeAvatarUpload(file) {
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < 2;
beforeAvatarUpload (file) {
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
if (!isJPG) {
if (!isPNG) {
this.$message.error("上传图片只能是 JPG, PNG 格式!");
this.$message.error('上传图片只能是 JPG, PNG 格式!')
}
}
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
this.$message.error('上传头像图片大小不能超过 2MB!')
}
if (file) {
var windowURL = window.URL || window.webkitURL;
this.imgUrlStr = windowURL.createObjectURL(file);
this.dialogVisible = true;
this.imgUrl.append("file", file);
var windowURL = window.URL || window.webkitURL
this.imgUrlStr = windowURL.createObjectURL(file)
this.dialogVisible = true
this.imgUrl.append('file', file)
}
},
Upload() {
Upload () {
this.$http({
url: this.$http.adornUrl("/office/file/uploadFile"),
method: "post",
url: this.$http.adornUrl('/office/file/uploadFile'),
method: 'post',
data: this.imgUrl,
headers: {
"Content-Type": "multipart/form-data",
},
'Content-Type': 'multipart/form-data'
}
})
.then((res) => {
console.log(res);
this.dataForm.pic = res.data.data;
console.log(res)
this.dataForm.pic = res.data.data
})
.catch((err) => {
console.log(err);
});
console.log(err)
})
},
clearInp() {
this.$refs["dataForm"].resetFields();
this.imgUrlStr = "";
this.dialogVisible = false;
this.ueditor.value = "";
clearInp () {
this.$refs['dataForm'].resetFields()
this.imgUrlStr = ''
this.dialogVisible = false
this.ueditor.value = ''
},
// 更新父子组件内容
editorReady(instance) {
instance.setContent(this.dataForm.content);
instance.addListener("contentChange", () => {
this.dataForm.content = instance.getContent();
});
},
},
};
editorReady (instance) {
instance.setContent(this.dataForm.content)
instance.addListener('contentChange', () => {
this.dataForm.content = instance.getContent()
})
}
}
}
</script>
<style scoped>
/* .form-list{
......
......@@ -142,7 +142,7 @@
value: '',
config: {}
},
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
piclevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
classidList: [],
cclassidList: [],
......
......@@ -138,7 +138,7 @@
classnum: '',
title: '',
brief: '',
levels: 0,
levels: '',
directpath: '',
picIndexPath: '',
colorBackground: '',
......@@ -173,7 +173,7 @@
imgUrl: new FormData(),
imgUrlStr: '',
dialogVisible: false,
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
colorBackgroundList: [
{
label: '蓝色'
......
......@@ -191,7 +191,7 @@
value: '',
config: {}
},
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
piclevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
classidList: [],
cclassidList: [],
......
......@@ -177,7 +177,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
clanguageList: ['中文'],
id: [],
title: ''
......
......@@ -161,7 +161,7 @@
value: '',
config: {}
},
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
piclevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
newtmList: [
{
......
......@@ -17,10 +17,10 @@
<el-form-item label='级别' prop='levels'>
<el-select v-model="dataForm.levels" placeholder="请输入级别" clearable>
<el-option
v-for="item in levelList"
:key="item"
:label="item"
:value="item">
v-for="item in piclevelList"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
......@@ -144,172 +144,173 @@
</template>
<script>
import AddOrUpdate from './news-add-or-update'
export default {
components: {
AddOrUpdate
},
data () {
return {
addOrUpdateVisible: false,
dataForm: {
title: '',
levels: null,
status: '',
classnum: '',
inputdate: ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
statusList: [
{
value: '0',
label: '待审核'
},
{
value: '-1',
label: '失败'
},
{
value: '1',
label: '成功'
}
],
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
releaseDate: []
}
},
activated () {
this.getDataList()
},
methods: {
import { piclevelList } from '@/utils'
import AddOrUpdate from './news-add-or-update'
export default {
components: {
AddOrUpdate
},
data () {
return {
addOrUpdateVisible: false,
dataForm: {
title: '',
levels: null,
status: '',
classnum: '',
inputdate: ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
statusList: [
{
value: '0',
label: '待审核'
},
{
value: '-1',
label: '失败'
},
{
value: '1',
label: '成功'
}
],
piclevelList,
releaseDate: []
}
},
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/office/newtopic/list'),
method: 'post',
data: this.$http.adornParams({
'page': this.pageIndex + '',
'limit': this.pageSize + '',
'title': this.dataForm.title,
'status': this.dataForm.status,
'levels': this.dataForm.levels,
'inputDataStart': this.releaseDate === null ? '' : this.releaseDate[0],
'inputDataEnd': this.releaseDate === null ? '' : this.releaseDate[1]
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/office/newtopic/list'),
method: 'post',
data: this.$http.adornParams({
'page': this.pageIndex + '',
'limit': this.pageSize + '',
'title': this.dataForm.title,
'status': this.dataForm.status,
'levels': this.dataForm.levels,
'inputDataStart': this.releaseDate === null ? '' : this.releaseDate[0],
'inputDataEnd': this.releaseDate === null ? '' : this.releaseDate[1]
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle (val) {
this.dataListSelections = val
},
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle (id, showInfo) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, showInfo)
})
},
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/viewsub?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
addOrUpdateHandle (id, showInfo) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, showInfo)
})
},
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/viewsub?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.classid
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/newtopic/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
},
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.classid
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/newtopic/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
},
// 审核
checkHandle (id, status) {
let str = ''
if (status === 1) {
str = '成功'
} else {
str = '失败'
}
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/newtopic/verify'),
method: 'post',
data: this.$http.adornData({
'id': id,
'status': status
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
}
}
}
checkHandle (id, status) {
let str = ''
if (status === 1) {
str = '成功'
} else {
str = '失败'
}
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/newtopic/verify'),
method: 'post',
data: this.$http.adornData({
'id': id,
'status': status
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
}
}
}
</script>
......@@ -106,7 +106,7 @@ export default {
jumppath: '',
showtime: ''
},
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
piclevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
pictureTypeList: [
{
value: '1',
......
......@@ -161,7 +161,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
typeList: [
{
......
......@@ -153,7 +153,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
typeList: [],
title: ''
......
......@@ -154,7 +154,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
classidList: [],
cclassidList: [],
......
......@@ -153,7 +153,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
title: ''
}
......
......@@ -154,7 +154,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
classidList: [],
cclassidList: [],
......
......@@ -154,7 +154,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
classidList: [],
cclassidList: [],
......
......@@ -162,7 +162,7 @@
value: '',
config: {}
},
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
typeList: [
{
......
......@@ -96,7 +96,7 @@
fileUrl: new FormData(),
fileUrlStr: '',
dialogVisible: false,
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
levelList: [1, 2, 3, 4, 5, 6, 7, 8, 9],
typeList: [
{
value: 1,
......
......@@ -7,10 +7,10 @@
<el-form-item label='级别' prop='levels' >
<el-select v-model="dataForm.levels" placeholder="请输入级别" clearable>
<el-option
v-for="item in levelList"
:key="item"
:label="item"
:value="item">
v-for="item in piclevelList"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
......@@ -107,158 +107,159 @@
</template>
<script>
import AddOrUpdate from './doc-add-or-update'
export default {
components: {
AddOrUpdate
},
data () {
return {
addOrUpdateVisible: false,
dataForm: {
'title': '',
'category': '',
'levels': ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
typeList: [
{
value: '1',
label: '表格下载'
},
{
value: '2',
label: '分支机构培训计划'
}
],
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}
},
activated () {
this.getDataList()
},
methods: {
import { piclevelList } from '@/utils'
import AddOrUpdate from './doc-add-or-update'
export default {
components: {
AddOrUpdate
},
data () {
return {
addOrUpdateVisible: false,
dataForm: {
'title': '',
'category': '',
'levels': ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
typeList: [
{
value: '1',
label: '表格下载'
},
{
value: '2',
label: '分支机构培训计划'
}
],
piclevelList
}
},
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/office/doc/list'),
method: 'post',
data: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'title': this.dataForm.title,
'levels': this.dataForm.levels,
'type': this.dataForm.type
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/office/doc/list'),
method: 'post',
data: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'title': this.dataForm.title,
'levels': this.dataForm.levels,
'type': this.dataForm.type
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle (val) {
this.dataListSelections = val
},
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle (id, showInfo) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, showInfo)
})
},
addOrUpdateHandle (id, showInfo) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, showInfo)
})
},
// 删除
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/doc/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
},
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/doc/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
},
// 审核
checkHandle (id, status) {
let str = ''
if (status === 1) {
str = '成功'
} else {
str = '失败'
}
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/doc/verify'),
method: 'post',
data: this.$http.adornData({
'id': id,
'status': status
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
},
downFile (file) {
window.open(file, '_blank')
}
}
}
checkHandle (id, status) {
let str = ''
if (status === 1) {
str = '成功'
} else {
str = '失败'
}
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/doc/verify'),
method: 'post',
data: this.$http.adornData({
'id': id,
'status': status
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
},
downFile (file) {
window.open(file, '_blank')
}
}
}
</script>
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