Commit 94812605 by 莫晓莉

策略增删改查

parent 1eb11b8b
import request from '@/utils/request'
// 分页获取策略配置列表
export function getKettleRepositoryList(data) {
return request({
url: 'kettle/quartz/getKettleQuartzPageList',
data,
method: 'post'
})
}
// 新增策略配置
export function insert(data) {
return request({
url: 'kettle/quartz/insert',
data,
method: 'post'
})
}
//更新策略配置
export function update(data) {
return request({
url: 'kettle/quartz/update',
data,
method: 'post'
})
}
//删除策略配置
export function deleteStrategy(data) {
return request({
url: 'kettle/quartz/delete?id='+data,
method: 'post'
})
}
import request from '@/utils/request'
// 分页获取作业列表
export function getKettleJobList(data) {
return request({
url: 'kettle/job/getKettleJobList',
data,
method: 'post'
})
}
//添加作业
export function insert(data) {
return request({
url: 'kettle/job/insert',
data,
method: 'post'
})
}
//更新数据库资源库
export function update(data) {
return request({
url: 'kettle/repository/update',
data,
method: 'post'
})
}
//删除数据库资源库
export function deleteList(data) {
return request({
url: 'kettle/repository/delete?id='+data,
method: 'post'
})
}
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
@click="showAll()" @click="showAll()"
></i> ></i>
</div> </div>
<div v-show="jobShow" class="card-body">
<el-button class="btn-brush" icon="el-icon-plus"  @click="closeModal" >新增数据库资源库</el-button> <el-button class="btn-brush" icon="el-icon-plus"  @click="closeModal" >新增数据库资源库</el-button>
<div> <div>
<el-table <el-table
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
/> />
</div> </div>
</div> </div>
</div>
</el-card> </el-card>
<!-- 新增和编辑弹窗start --> <!-- 新增和编辑弹窗start -->
...@@ -184,7 +185,7 @@ export default { ...@@ -184,7 +185,7 @@ export default {
page: 1, page: 1,
size: 10, size: 10,
}, },
loading: false, loading: true,
headers: {}, // 头部信息 headers: {}, // 头部信息
centerDialogVisible: false, centerDialogVisible: false,
form: { form: {
...@@ -231,17 +232,17 @@ export default { ...@@ -231,17 +232,17 @@ export default {
{required:true,message:'请输入资源库数据库登录密码',trigger:'blur'} {required:true,message:'请输入资源库数据库登录密码',trigger:'blur'}
], ],
}, },
options: [{ // options: [{
code: '选项1', // code: '选项1',
}, { // }, {
code: '选项2', // code: '选项2',
}, { // }, {
code: '选项3', // code: '选项3',
}, { // }, {
code: '选项4', // code: '选项4',
}, { // }, {
code: '选项5', // code: '选项5',
}], // }],
// value: '', // value: '',
dialogMsgAdd:'添加数据库资源库', dialogMsgAdd:'添加数据库资源库',
dialogMsgEdit:'编辑数据库资源库', dialogMsgEdit:'编辑数据库资源库',
...@@ -264,6 +265,10 @@ export default { ...@@ -264,6 +265,10 @@ export default {
console.log('分页获取数据库资源库列表',res); console.log('分页获取数据库资源库列表',res);
this.tableData = res.data.rows; this.tableData = res.data.rows;
this.pageInfo.total = res.data.total; this.pageInfo.total = res.data.total;
//关闭加载样式
setTimeout(() => {
this.loading = false;
}, 500);
}); });
}, },
showAll(){ showAll(){
...@@ -346,7 +351,7 @@ export default { ...@@ -346,7 +351,7 @@ export default {
// 删除 // 删除
deleteList(row) { deleteList(row) {
var params={id:row.id}; var params={id:row.id};
this.$confirm('确认删除商品, 是否继续?', '提示', { this.$confirm('确认删除该条数据, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -445,4 +450,11 @@ export default { ...@@ -445,4 +450,11 @@ export default {
color: #c4c4c4; color: #c4c4c4;
margin-right: 5px; margin-right: 5px;
} }
.el-card__body{
padding:0 !important;
/* padding: 15px 20px 20px 20px; */
}
.card-body{
padding: 15px 20px 20px 20px;
}
</style> </style>
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
></i> ></i>
</div> </div>
<div v-show="jobShow" class="card-body">
<el-button class="btn-brush" icon="el-icon-plus" <el-button class="btn-brush" icon="el-icon-plus"
 @click="addModalOne">新增策略</el-button  @click="closeModal">新增策略</el-button>
>
<div>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="tableData" :data="tableData"
...@@ -25,23 +25,8 @@ ...@@ -25,23 +25,8 @@
:header-cell-style="{ color: '#606266' }" :header-cell-style="{ color: '#606266' }"
> >
<el-table-column prop="id" label="策略编号" align="center" /> <el-table-column prop="id" label="策略编号" align="center" />
<el-table-column label="策略描述" align="center"> <el-table-column prop="description" label="策略描述" align="center"/>
<!-- <template slot-scope="scope"> <el-table-column prop="cron" label="策略Cron" align="center" />
<img
:src="scope.row.coverImageUrl"
alt=""
style="width: 80px; height: 80px"
/>
</template> -->
每天凌晨3点执行
</el-table-column>
<el-table-column prop="doctorName" label="策略Cron" align="center" />
<!-- <el-table-column label="资源库更新时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime | interceptionDate }}</span>
</template>
</el-table-column> -->
<el-table-column prop label="操作" width="200" align="center"> <el-table-column prop label="操作" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -55,14 +40,14 @@ ...@@ -55,14 +40,14 @@
size="mini" size="mini"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
@click="delJobVacancyFun(scope.row)" @click="deleteStrategy(scope.row)"
>删除</el-button >删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页start -->
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
...@@ -74,6 +59,7 @@ ...@@ -74,6 +59,7 @@
@current-change="pageChange" @current-change="pageChange"
/> />
</div> </div>
<!-- 分页end -->
</div> </div>
</el-card> </el-card>
...@@ -81,27 +67,30 @@ ...@@ -81,27 +67,30 @@
<!-- 1、新增资源库作业start --> <!-- 1、新增资源库作业start -->
<el-dialog <el-dialog
:title="curId?dialogMsgEdit:dialogMsgAdd" :title="curId?dialogMsgEdit:dialogMsgAdd"
:visible.sync="DialogVisibleOne" :visible="DialogVisibleOne"
:before-close="closeModal"
width="60%" width="60%"
center center
top="2%"> top="2%">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12" :offset="5"> <el-col :span="12" :offset="5">
<el-form ref="form" :model="form" label-width="auto"> <el-form ref="formName" :rules="rules" :model="form" label-width="auto">
<el-form-item label="策略描述:"> <el-form-item prop="description" label="策略描述:">
<el-input placeholder="请输入策略描述,例如每天凌晨一点执行" v-model="form.name" show-password class="input-length"></el-input> <el-input placeholder="请输入策略描述,例如每天凌晨一点执行" v-model="form.description" class="input-length"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="策略Cron:"> <el-form-item prop="cron" label="策略Cron:">
<el-input placeholder="请输入策略Cron" v-model="form.name" show-password class="input-length"></el-input> <el-input placeholder="请输入策略Cron" v-model="form.cron" class="input-length"></el-input>
<span>生成cron表达式(生成后填入上面的框中)</span> <!-- <a href="https://cron.qqe2.com/"> -->
<span @click="See()" style="color: #337ab7;">生成cron表达式(生成后填入上面的框中)</span>
<!-- </a> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="btn-brush" type="success" icon="el-icon-check" @click="DialogVisibleOne = true">保存</el-button> <el-button class="btn-brush" type="success" icon="el-icon-check" @click.native="curId ? update(): submitForm()" >保存</el-button>
<el-button class="btn-brush" type="success" icon="el-icon-plus" @click="DialogVisibleOne = false">取消</el-button> <el-button class="btn-brush" type="success" icon="el-icon-plus" @click="closeModal()">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!--1、 新增资源库作业end --> <!--1、 新增资源库作业end -->
...@@ -112,26 +101,12 @@ ...@@ -112,26 +101,12 @@
<script> <script>
import { import {
getNativeArticlePageList, getKettleRepositoryList,
insert,
update, update,
create, deleteStrategy
} from "@/api/communication/announcement"; } from "@/api/sys/strategy";
import { getDoctorList } from "@/api/hospitalapi/doctor";
import { getToken } from "@/utils/auth";
// import { quillEditor } from "vue-quill-editor";
// import "quill/dist/quill.core.css";
// import "quill/dist/quill.snow.css";
// import "quill/dist/quill.bubble.css";
export default { export default {
// components: {
// quillEditor,
// },
filters: {
interceptionDate: function (value) {
if (!value) return;
return value.substr(0, 10);
},
},
data() { data() {
return { return {
tableData: [], tableData: [],
...@@ -139,65 +114,171 @@ export default { ...@@ -139,65 +114,171 @@ export default {
page: 1, page: 1,
size: 10, size: 10,
}, },
loading: false, loading: true,
headers: {}, // 头部信息 jobShow: true, //作业监控记录
jobShow: false, //作业监控记录
DialogVisibleOne: false,//新增资源库作业弹窗 DialogVisibleOne: false,//新增资源库作业弹窗
form: {}, form: {
options: [{ description:'',
value: '选项1', cron:''
label: '黄金糕' },
}, { // options: [{
value: '选项2', // value: '选项1',
label: '双皮奶' // label: '黄金糕'
}, { // }, {
value: '选项3', // value: '选项2',
label: '蚵仔煎' // label: '双皮奶'
}, { // }, {
value: '选项4', // value: '选项3',
label: '龙须面' // label: '蚵仔煎'
}, { // }, {
value: '选项5', // value: '选项4',
label: '北京烤鸭' // label: '龙须面'
}], // }, {
// value: '选项5',
// label: '北京烤鸭'
// }],
value: '', value: '',
dialogMsgAdd:'添加用户', dialogMsgAdd:'添加用户',
dialogMsgEdit:'编辑用户', dialogMsgEdit:'编辑用户',
curId: null, curId: null,
rules:{
description:[
{required:true,message:'请输入策略描述',trigger:'blur'}
],
cron:[
{required:true,message:'请输入策略Cron',trigger:'blur'}
],
},
}; };
}, },
created() { created() {
this.getNativeArticlePageListFun(); this.getKettleRepositoryList();
this.setHeaders();
}, },
methods: { methods: {
// 新增 showAll(){
addModalOne() { this.jobShow=!this.jobShow;
this.DialogVisibleOne=true;   
    },
//编辑
editModal(id) {
this.curId=1;
      console.log('编辑时候id不为为null');
this.DialogVisibleOne=true    
    },
setHeaders() {
this.headers = {
contentType: "application/x-www-form-urlencoded",
Authorization: getToken(),
};
}, },
//分页获取策略配置列表
getNativeArticlePageListFun() { getKettleRepositoryList() {
getNativeArticlePageList({ ...this.pageInfo, status: 1 }).then((res) => { getKettleRepositoryList({ ...this.pageInfo}).then((res) => {
console.log(res); console.log('分页获取策略配置列表:',res);
this.tableData = res.data.rows; this.tableData = res.data.rows;
this.pageInfo.total = res.data.total; this.pageInfo.total = res.data.total;
//关闭加载样式
setTimeout(() => {
this.loading = false;
}, 500);
}); });
}, },
// 提交新增数据
submitForm(){
this.$refs['formName'].validate((valid) => {
if (valid) {
insert(this.form).then(res=>{
console.log('提交新增数据:',res);
if (res.success) {
this.$message.success('新增成功!');
this.closeModal();//关闭弹窗
this.getKettleRepositoryList();//刷新列表
}else {
this.$message.error(res.errMsg)
}
})
} else {
console.log('error submit!!');
return false;
}
});
},
// 模态框操作
closeModal() {
console.log('打开弹窗------------------',this.DialogVisibleOne);
this.DialogVisibleOne = !this.DialogVisibleOne;
this.row = {};
this.form = {};
this.curId=null;
this.$refs['formName'].resetFields();//对该表单项进行重置,将其值重置为初始值并移除校验结果
},
//生成cron表达式(生成后填入上面的框中)
See(){
window.open('https://cron.qqe2.com/')
},
//编辑数据库资源库
editModal(row) {
this.curId=row.id;
      console.log('编辑时候id不为为null');
this.form = JSON.parse(JSON.stringify(row)) // 克隆
this.DialogVisibleOne=true;    
    },
// 编辑数据
update(){
this.$refs['formName'].validate((valid) => {
if (valid) {
update(this.form).then(res=>{
console.log('提交编辑数据:',res);
if (res.success) {
this.$message.success('编辑成功!');
this.centerDialogVisible=false;//关闭弹窗
this.form={};
this.curId=null;
this.closeModal();//关闭弹窗
this.getKettleRepositoryList();//刷新列表
}else {
this.$message.error(res.errMsg)
}
})
} else {
console.log('error submit!!');
return false;
}
});
},
// 删除
deleteStrategy(row) {
var params={id:row.id};
this.$confirm('确认删除该条数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteStrategy(row.id).then((res) => {
if (res.success) {
this.$message.success('删除成功')
this.getKettleRepositoryList();
} else {
this.$message.error(res.errMsg)
}
})
})
},
// 新增
// addModalOne() {
// this.DialogVisibleOne=true;   
//     },
//编辑
// editModal(id) {
// this.curId=1;
//       console.log('编辑时候id不为为null');
// this.DialogVisibleOne=true    
//     },
// getNativeArticlePageListFun() {
// getNativeArticlePageList({ ...this.pageInfo, status: 1 }).then((res) => {
// console.log(res);
// this.tableData = res.data.rows;
// this.pageInfo.total = res.data.total;
// });
// },
// 显示数量切换 // 显示数量切换
sizeChange(e) { sizeChange(e) {
this.pageInfo.size = e; this.pageInfo.size = e;
...@@ -206,7 +287,7 @@ export default { ...@@ -206,7 +287,7 @@ export default {
pageChange(e) { pageChange(e) {
this.pageInfo.page = e; this.pageInfo.page = e;
this.getNativeArticlePageListFun(); this.getKettleRepositoryList();
}, },
// 编辑 // 编辑
...@@ -223,27 +304,27 @@ export default { ...@@ -223,27 +304,27 @@ export default {
// }); // });
// }, // },
// 删除 // 删除
delJobVacancyFun(val) { // delJobVacancyFun(val) {
this.article = val; // this.article = val;
let param = { // let param = {
...this.article, // ...this.article,
status: 3, // status: 3,
}; // };
update(param).then((res) => { // update(param).then((res) => {
if (res.success) { // if (res.success) {
this.$message.success("删除成功"); // this.$message.success("删除成功");
this.getNativeArticlePageListFun(); // this.getNativeArticlePageListFun();
} else { // } else {
this.$message.error(res.errMsg); // this.$message.error(res.errMsg);
} // }
}); // });
}, // },
// 添加活动 // 添加活动
    addTask() { //     addTask() {
      console.log('传递添加活动写死传递1:') //       console.log('传递添加活动写死传递1:')
      this.$router.push({ path: '/oracle/add', query: { id: '1' }}) //       this.$router.push({ path: '/oracle/add', query: { id: '1' }})
    }, //     },
    // 编辑活动     // 编辑活动
//     goPage(id) { //     goPage(id) {
//       console.log('传递编辑活动di:', id) //       console.log('传递编辑活动di:', id)
...@@ -270,18 +351,7 @@ export default { ...@@ -270,18 +351,7 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
} }
/* .el-card__header {
padding: 15px 20px;
border-bottom: 1px solid #e6ebf5;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 14px;
border-style: solid solid none;
border-width: 4px 0px 0;
} */
.el-card__body{
padding: 15px 20px 20px 20px;
}
.btn-icon { .btn-icon {
float: right; float: right;
padding: 3px 0; padding: 3px 0;
...@@ -296,4 +366,10 @@ export default { ...@@ -296,4 +366,10 @@ export default {
.input-length{ .input-length{
width: 500px; width: 500px;
} }
.el-card__body{
padding:0 !important;
}
.card-body{
padding: 15px 20px 20px 20px;
}
</style> </style>
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
></i> ></i>
</div> </div>
<div v-show="!jobShow" class="card-body">
<div> <div>
<el-button class="btn-brush" icon="el-icon-plus" <el-button class="btn-brush" icon="el-icon-plus"
 @click="addModalOne">新增资源库作业</el-button>  @click="addModalOne">新增资源库作业</el-button>
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
<el-button class="btn-brush right" icon="el-icon-plus" <el-button class="btn-brush right" icon="el-icon-plus"
 @click="addTask">刷新列表</el-button>  @click="addTask">刷新列表</el-button>
</div> </div>
<div>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="tableData" :data="tableData"
...@@ -32,20 +33,23 @@ ...@@ -32,20 +33,23 @@
:header-cell-style="{ color: '#606266' }" :header-cell-style="{ color: '#606266' }"
> >
<el-table-column prop="id" label="作业编号" width="100" align="center" /> <el-table-column prop="id" label="作业编号" width="100" align="center" />
<el-table-column label="作业类型" width="100" align="center"> <el-table-column prop="type" label="作业类型" width="100" align="center">
文件 <template slot-scope="scope">
{{ jobTypeList[scope.row.type] }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="doctorName" label="作业名称" align="center" /> <el-table-column prop="name" label="作业名称" align="center" />
<el-table-column prop="username" label="作业策略" align="center" /> <el-table-column prop="customerQuarz" label="作业策略" align="center" />
<el-table-column label="作业更新时间" align="center" width="180"> <el-table-column label="作业更新时间" align="center" width="180">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime | interceptionDate }}</span> {{ scope.row.updateTime | dateFormat }}
</template> --> </template>
2020-11-29 14:07:38
</el-table-column> </el-table-column>
<el-table-column label="作业状态" width="100" align="center" > <el-table-column prop="status" label="作业状态" width="100" align="center" >
已停止 <template slot-scope="scope">
{{ jobStatusList[scope.row.status] }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop label="操作" align="center"> <el-table-column prop label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -74,7 +78,7 @@ ...@@ -74,7 +78,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页start -->
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
...@@ -86,6 +90,7 @@ ...@@ -86,6 +90,7 @@
@current-change="pageChange" @current-change="pageChange"
/> />
</div> </div>
<!-- 分页end -->
</div> </div>
</el-card> </el-card>
...@@ -333,18 +338,27 @@ ...@@ -333,18 +338,27 @@
<script> <script>
import { import {
getNativeArticlePageList, getKettleJobList,
update,
create, } from "@/api/task/homework";
} from "@/api/communication/announcement"; // import { getDoctorList } from "@/api/hospitalapi/doctor";
import { getDoctorList } from "@/api/hospitalapi/doctor"; // import { getToken } from "@/utils/auth";
import { getToken } from "@/utils/auth";
export default { export default {
filters: { filters: {
interceptionDate: function (value) { dateFormat (val) {
if (!value) return; if (val == null || val == '') {
return value.substr(0, 10); return ''
}, } else {
let d = new Date(val) // val 为表格内取到的后台时间
let month = d.getMonth() + 1 < 10 ? '0' + (d.getMonth() + 1) : d.getMonth() + 1
let day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
let hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours()
let min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes()
let sec = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds()
let times = d.getFullYear() + '-' + month + '-' + day + ' ' + hours + ':' + min + ':' + sec
return times
}
}
}, },
data() { data() {
return { return {
...@@ -353,38 +367,60 @@ export default { ...@@ -353,38 +367,60 @@ export default {
page: 1, page: 1,
size: 10, size: 10,
}, },
loading: false, loading: true,
headers: {}, // 头部信息 headers: {}, // 头部信息
jobShow: false, //作业监控记录 jobShow: false, //作业监控记录
DialogVisibleOne: false,//新增资源库作业弹窗 DialogVisibleOne: false,//新增资源库作业弹窗
DialogVisibleTwo: false,//新增资源库作业弹窗 DialogVisibleTwo: false,//新增资源库作业弹窗
DialogVisibleThree: false, //编辑资源库作业弹窗 DialogVisibleThree: false, //编辑资源库作业弹窗
form: {}, form: {},
options: [{ // options: [{
value: '选项1', // value: '选项1',
label: '黄金糕' // label: '黄金糕'
}, { // }, {
value: '选项2', // value: '选项2',
label: '双皮奶' // label: '双皮奶'
}, { // }, {
value: '选项3', // value: '选项3',
label: '蚵仔煎' // label: '蚵仔煎'
}, { // }, {
value: '选项4', // value: '选项4',
label: '龙须面' // label: '龙须面'
}, { // }, {
value: '选项5', // value: '选项5',
label: '北京烤鸭' // label: '北京烤鸭'
}], // }],
jobStatusList:['','正在运行', '已停止'],
jobTypeList:['','数据库资源库','上传的文件']
}; };
}, },
created() { created() {
this.getNativeArticlePageListFun(); this.getKettleJobList();//分页获取作业列表
this.setHeaders(); // this.setHeaders();
}, },
methods: { methods: {
showAll(){
this.jobShow=!this.jobShow;
},
//分页获取作业列表
getKettleJobList() {
getKettleJobList({ ...this.pageInfo}).then((res) => {
console.log('分页获取作业列表:',res);
this.tableData = res.data.rows;
this.pageInfo.total = res.data.total;
//关闭加载样式
setTimeout(() => {
this.loading = false;
}, 500);
});
},
// 新增资源库作业弹窗 // 新增资源库作业弹窗
addModalOne() { addModalOne() {
this.DialogVisibleOne=true;    this.DialogVisibleOne=true;   
...@@ -399,20 +435,20 @@ export default { ...@@ -399,20 +435,20 @@ export default {
    },     },
setHeaders() { // setHeaders() {
this.headers = { // this.headers = {
contentType: "application/x-www-form-urlencoded", // contentType: "application/x-www-form-urlencoded",
Authorization: getToken(), // Authorization: getToken(),
}; // };
}, // },
getNativeArticlePageListFun() { // getNativeArticlePageListFun() {
getNativeArticlePageList({ ...this.pageInfo, status: 1 }).then((res) => { // getNativeArticlePageList({ ...this.pageInfo, status: 1 }).then((res) => {
console.log(res); // console.log(res);
this.tableData = res.data.rows; // this.tableData = res.data.rows;
this.pageInfo.total = res.data.total; // this.pageInfo.total = res.data.total;
}); // });
}, // },
// 显示数量切换 // 显示数量切换
sizeChange(e) { sizeChange(e) {
...@@ -439,27 +475,27 @@ export default { ...@@ -439,27 +475,27 @@ export default {
// }); // });
// }, // },
// 删除 // 删除
delJobVacancyFun(val) { // delJobVacancyFun(val) {
this.article = val; // this.article = val;
let param = { // let param = {
...this.article, // ...this.article,
status: 3, // status: 3,
}; // };
update(param).then((res) => { // update(param).then((res) => {
if (res.success) { // if (res.success) {
this.$message.success("删除成功"); // this.$message.success("删除成功");
this.getNativeArticlePageListFun(); // this.getNativeArticlePageListFun();
} else { // } else {
this.$message.error(res.errMsg); // this.$message.error(res.errMsg);
} // }
}); // });
}, // },
// 添加活动 // 添加活动
    addTask() { //     addTask() {
      console.log('传递添加活动写死传递1:') //       console.log('传递添加活动写死传递1:')
      this.$router.push({ path: '/oracle/add', query: { id: '1' }}) //       this.$router.push({ path: '/oracle/add', query: { id: '1' }})
    }, //     },
    // 编辑活动     // 编辑活动
//     goPage(id) { //     goPage(id) {
//       console.log('传递编辑活动di:', id) //       console.log('传递编辑活动di:', id)
...@@ -512,4 +548,11 @@ export default { ...@@ -512,4 +548,11 @@ export default {
.input-length{ .input-length{
width: 500px; width: 500px;
} }
.el-card__body{
padding:0 !important;
/* padding: 15px 20px 20px 20px; */
}
.card-body{
padding: 15px 20px 20px 20px;
}
</style> </style>
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