2022.8.18 log

master
271556543@qq.com 4 years ago
parent 05b6a4784e
commit 39a0859339

@ -0,0 +1,9 @@
import request from "@/utils/request";
export function index(data){
return request({
method:'post',
url:'/api/admin/operate-log/index',
data
})
}

@ -777,43 +777,10 @@ export default {
} }
}) })
}, },
//
submit(){
addContrant({
type:this.form.type,
is_plan:this.form.isBudget ? 1 : 0,
purchase_type_id:this.form.methods,
purchase_way_id:this.form.modality,
money_way_id:`${this.form.fundingChannels.toString()}`,
plan_price:this.form.price,
name:this.form.name,
contract_plan_links:this.form.plan.map(item=>{
return item.value
})
}).then(res=>{
this.isShowAdd = false
Message({
type:'success',
message:'操作成功'
})
this.$refs['addContract'].reset()
this.$refs['planTable'].clearSelection()
this.getContracts()
})
},
//
deleteContract(id){
delContract({id}).then(res=>{
Message({
type:'success',
message:'操作成功'
})
this.getContracts()
})
},
}, },
mounted() { mounted() {
this.window.width = screen.availWidth * 0.95 this.window.width = screen.availWidth * 0.95
this.window.height = screen.availHeight * 0.95 this.window.height = screen.availHeight * 0.95
this.window.top = (window.screen.height - 30 - this.window.height)/2 this.window.top = (window.screen.height - 30 - this.window.height)/2

@ -16,22 +16,30 @@
<el-table-column prop="type" width="100" label="类型" align="center" :formatter="typeFormatter"/> <el-table-column prop="type" width="100" label="类型" align="center" :formatter="typeFormatter"/>
<el-table-column prop="content" label="内容" align="left" /> <el-table-column prop="content" label="内容" align="left" />
<el-table-column prop="created_at" width="200" label="下发时间" align="center" :formatter="timeFormatter"/> <el-table-column prop="created_at" width="200" label="下发时间" align="center" :formatter="timeFormatter"/>
<el-table-column fixed="right" width="100" label="状态" align="center" prop="read_count"> <el-table-column width="100" label="状态" align="center" prop="read_count">
<template slot-scope="{row, $index}"> <template slot-scope="{row, $index}">
<el-link v-if="row.read_count" type="success" :underline="false"></el-link> <el-link v-if="row.read_count" type="success" :underline="false"></el-link>
<Button v-else type="error" size="small" style="margin-left: 10px;" ghost @click="readIt(row, $index)">未读</Button> <Button v-else type="error" size="small" style="margin-left: 10px;" ghost @click="readIt(row, $index)">未读</Button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="90" header-align="center" label="操作" align="center">
<template slot-scope="{row, $index}">
<Button type="primary" size="small" style="margin-left: 10px;" ghost @click="toContract(row)"></Button>
</template>
</el-table-column>
</el-table> </el-table>
<div style="display: flex;justify-content: flex-end;"> <div style="display: flex;justify-content: flex-end;">
<Page :total="total" show-elevator @on-change="pageChange"/> <Page :total="total" show-elevator @on-change="pageChange"/>
</div> </div>
</div> </div>
<detailContract ref="detailContract"></detailContract>
</div> </div>
</template> </template>
<script> <script>
import detailContract from "@/views/contract/components/detailContract"
import LxHeader from '@/components/LxHeader/index.vue' import LxHeader from '@/components/LxHeader/index.vue'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { adminDepartmentList } from '../../api/system/department.js' import { adminDepartmentList } from '../../api/system/department.js'
@ -42,7 +50,7 @@ import {Message} from "element-ui";
export default { export default {
name: 'Manage', name: 'Manage',
components: { components: {
LxHeader, Pagination LxHeader, Pagination,detailContract
}, },
data() { data() {
return { return {
@ -75,6 +83,11 @@ export default {
}).catch(error => {}) }).catch(error => {})
}, },
methods: { methods: {
toContract(row){
this.$refs['detailContract'].getDetail(row.contract_id)
this.$refs['detailContract'].isShowDetail = true
},
pageChange(e){ pageChange(e){
this.pageIndex = e this.pageIndex = e
this.getNotices() this.getNotices()

@ -12,6 +12,16 @@
</div> </div>
</slot> </slot>
</LxHeader> </LxHeader>
</div> <div ref="lxHeader">
<LxHeader icon="md-apps" text="部门管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="edit()" style="margin-left: 10px">新增部门</Button>
</div>
</slot>
</LxHeader>
</div> </div>
<div class="table-tree"> <div class="table-tree">
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%;margin-bottom: 20px;" <el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%;margin-bottom: 20px;"

@ -0,0 +1,75 @@
<template>
<div style="padding: 0 20px;">
<div ref="lxHeader">
<lx-header icon="md-apps" text="系统日志" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
</slot>
</lx-header>
</div>
<xy-table :list="list" :table-item="table">
<template v-slot:btns><div></div></template>
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" show-elevator @on-change="pageChange"/>
</div>
</div>
</template>
<script>
import {index} from "@/api/system/log"
export default {
data() {
return {
select:{
pageIndex:1,
pageSize:10,
},
table:[
{
prop:'name',
label:'内容'
},
{
prop:'admin.name',
label:'操作人'
},
{
prop:'department.name',
label:'部门'
},
{
prop:'created_at',
label:'日期'
}
],
list:[],
total:0,
}
},
methods: {
async getLog(){
const res = await index({
page:this.select.pageIndex,
page_size:this.select.pageSize
})
this.list = res.data
this.total = res.total
},
pageChange(e){
this.select.pageIndex = e
this.getLog()
}
},
mounted() {
this.getLog()
}
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save