| | |
| | | <main> |
| | | <div class="mainHeader"> |
| | | <div class="add"> |
| | | <el-button type="primary" icon="el-icon-plus">新增任务</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" @click="addTask()">新增任务</el-button> |
| | | </div> |
| | | <div class="date-search"> |
| | | <span>按天查询:</span> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="mainContent"> |
| | | <!-- @selection-change="handleSelectionChange" --> |
| | | <!-- 数据渲染 --> |
| | | <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" |
| | | :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}" |
| | | :header-cell-style="{background:'#06122c','font-weight':'650','line-height':'45px'}" |
| | | :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" width="55"> |
| | | </el-table-column> |
| | | <el-table-column label="任务编号" prop="applicationName" min-width="10"> |
| | | <el-table-column prop="number" label="任务编号" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="标题" min-width="10"> |
| | | <el-table-column prop="title" label="标题" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="websiteUrl" label="类型" min-width="10"> |
| | | <el-table-column prop="type" label="类型" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="级别" min-width="10"> |
| | | <el-table-column prop="level" label="级别" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="街道" min-width="10"> |
| | | <el-table-column prop="streetId" label="街道" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="社区" min-width="10"> |
| | | <el-table-column prop="communityId" label="社区" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="开始时间" min-width="10"> |
| | | <el-table-column prop="startTime" label="开始时间" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="结束时间" min-width="10"> |
| | | <el-table-column prop="endTime" label="结束时间" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="任务描述" min-width="10"> |
| | | <el-table-column prop="description" label="任务描述" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="applicationType" label="状态" min-width="10"> |
| | | <el-table-column prop="status" label="状态" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="10"> |
| | | <template slot-scope="scope"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 分页 --> |
| | | <!-- <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum" |
| | | :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev" |
| | | @next-click="handleNext"> |
| | | </el-pagination> |
| | | </div> --> |
| | | </div> |
| | | </main> |
| | | <footer> |
| | | <!-- 创建弹窗 --> |
| | | <el-dialog :visible.sync="dialogCreate" title="新增第三方接口" width="45%" v-if="dialogCreate" |
| | | <el-dialog :visible.sync="dialogCreate" title="新增任务" width="45%" v-if="dialogCreate" |
| | | :before-close="handleClose"> |
| | | <createInterface /> |
| | | </el-dialog> |
| | |
| | | updateFlag: false, |
| | | userInfo: '', |
| | | date:'', |
| | | // totalNum: 200, |
| | | // pageSize: 10, |
| | | // currentPage: 1, |
| | | totalNum: 200, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getUserList(); |
| | | async created() { |
| | | const arr = await this.getUserList(); |
| | | this.tableData = arr.records; |
| | | this.totalNum = arr.total; |
| | | }, |
| | | methods: { |
| | | addTask() { |
| | | this.dialogCreate = true; |
| | | }, |
| | | // 获取接口列表 |
| | | getUserList() { |
| | | // const that = this; |
| | | // // const { currentPage, pageSize, search } = this; |
| | | // this.dialogCreate = false; |
| | | // this.$axios.get("/sccg/task/list").then(res => { |
| | | // const { code, data } = res; |
| | | // if (code == 200) { |
| | | // this.tableData = data; |
| | | // } |
| | | // }) |
| | | |
| | | // let arr = []; |
| | | // const { currentPage, pageSize,context,messageStatus,messageKind } = this; |
| | | // await this.$axios({ |
| | | // method: 'post', |
| | | // url: '/sccg/task/list', |
| | | // data: { |
| | | // body: "", |
| | | // channelCode: messageKind === '00' ?'':messageKind, |
| | | // createUser: '', |
| | | // current: currentPage, |
| | | // head: context, |
| | | // messageType: "", |
| | | // pageSize: pageSize, |
| | | // randomCode: "", |
| | | // remark: "", |
| | | // sendTime: "", |
| | | // status: messageStatus === 2 ? '':messageStatus, |
| | | // targetFrom: "", |
| | | // targetTo: "" |
| | | // } |
| | | // }) |
| | | // .then(res => { |
| | | // this.tableData = res.data; |
| | | // }) |
| | | // return arr; |
| | | async getUserList() { |
| | | let arr = []; |
| | | const { currentPage, pageSize,context,messageStatus,messageKind } = this; |
| | | await this.$axios({ |
| | | method: 'post', |
| | | url: '/sccg/task/list', |
| | | data: { |
| | | body: "", |
| | | channelCode: "", |
| | | createUser: '', |
| | | current: currentPage, |
| | | head: context, |
| | | messageType: "", |
| | | pageSize: pageSize, |
| | | randomCode: "", |
| | | remark: "", |
| | | sendTime: "", |
| | | status:"", |
| | | targetFrom: "", |
| | | targetTo: "" |
| | | } |
| | | }) |
| | | .then(res => { |
| | | arr = res.data; |
| | | }) |
| | | return arr; |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | if ((rowIndex + 1) % 2 === 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 打开新增界面 |
| | | handleAdd() { |
| | |
| | | }, |
| | | // 删除第三方接口 |
| | | handleDelete({ id }) { |
| | | console.log(id); |
| | | this.$axios.delete('sccg/system/portal/thirdApp/delete', { |
| | | params: { |
| | | id |
| | | } |
| | | }).then(res => { |
| | | console.log(res); |
| | | }) |
| | | } |
| | | // // 当前页改变触发事件 |
| | | // changeCurrentPage(page) { |
| | | // this.currentPage = page; |
| | | // this.getUserList(); |
| | | // }, |
| | | // // 上一页点击事件 |
| | | // handlePrev(page) { |
| | | // this.currentPage = page; |
| | | // this.getUserList(); |
| | | // }, |
| | | // // 下一页点击事件 |
| | | // handleNext(page) { |
| | | // this.currentPage = page; |
| | | // this.getUserList(); |
| | | // }, |
| | | } |
| | | } |
| | | </script> |
| | | <!-- sccg/system/portal/thirdApp/search --> |
| | | <style lang="scss" scoped> |
| | | .otherInterface { |
| | | header { |
| | |
| | | display: flex; |
| | | line-height: 60px; |
| | | color: #4b9bb7; |
| | | background-color: #09152f; |
| | | // background-color: #09152f; |
| | | display: flex; |
| | | .add,.search,.btn{ |
| | | flex:1; |
| | |
| | | height: 35px; |
| | | margin-left: 10px; |
| | | |
| | | &::v-deep .el-input__inner { |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | font-size: 12px; |
| | | } |
| | | // &::v-deep .el-input__inner { |
| | | // background-color: #09152f; |
| | | // border: 1px solid #17324c; |
| | | // font-size: 12px; |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | margin-top: 20px; |
| | | |
| | | .el-table { |
| | | color: #4b9bb7; |
| | | // color: #4b9bb7; |
| | | |
| | | &::v-deep .el-table__empty-block { |
| | | background-color: #06122c; |