同步模型及导入模型、日志列表等联调

dev_2022-03-03
yujialong 3 years ago
parent 06fbe7d4c7
commit 2c6fe60b1d
  1. 15
      src/setting.js
  2. 23
      src/utils/api.js
  3. 14
      src/views/serve/addModel.vue
  4. 172
      src/views/serve/backstage/model.vue
  5. 89
      src/views/serve/backstage/modelType.vue
  6. 5
      src/views/serve/backstage/sourceType.vue
  7. 44
      src/views/system/addLog.vue
  8. 11
      src/views/system/index.vue
  9. 34
      src/views/system/log.vue
  10. 39
      src/views/system/manageLog.vue

@ -36,6 +36,21 @@ const Setting = {
platformId: 3, // 平台标识,1职站,2数据平台,3中台 platformId: 3, // 平台标识,1职站,2数据平台,3中台
jumpPath, // 判分点系统跳转路径前缀 jumpPath, // 判分点系统跳转路径前缀
host, // 请求路径前缀 host, // 请求路径前缀
// 平台列表
platformList: [
{
id: 1,
name: '职站'
},
{
id: 2,
name: '数据平台'
},
{
id: 3,
name: '中台'
}
]
}; };
export default Setting; export default Setting;

@ -1,9 +1,8 @@
import Setting from "@/setting"; import Setting from "@/setting";
let host = Setting.host; const host = Setting.host;
// let uploadURL = "http://www.huorantech.cn:9000"; const host1 = 'http://192.168.31.137:9000'
// let uploadURL = "http://124.71.12.62:9000"; const uploadURL = "http://39.108.250.202:9000";
let uploadURL = "http://39.108.250.202:9000";
export default { export default {
@ -104,6 +103,12 @@ export default {
saveReferenceCategory: `${host}/nakadai/model/reference/saveReferenceCategory`, saveReferenceCategory: `${host}/nakadai/model/reference/saveReferenceCategory`,
updateModelClass: `${host}/nakadai/model/reference/updateModelClass`, updateModelClass: `${host}/nakadai/model/reference/updateModelClass`,
delModelInfoBySystemId: `${host}/nakadai/model/reference/demo/delModelInfoBySystemId`,
deleteReferenceDemo: `${host}/nakadai/model/reference/demo/deleteReferenceDemo`,
referenceFindById: `${host}/nakadai/model/reference/demo/findById`,
saveReferenceDemo: `${host}/nakadai/model/reference/demo/saveReferenceDemo`,
referenceDemoList: `${host}/nakadai/model/reference/demo/referenceDemoList`,
deleteSourceModelCategory: `${host}/nakadai/model/category/deleteSourceModelCategory`, deleteSourceModelCategory: `${host}/nakadai/model/category/deleteSourceModelCategory`,
categorySave: `${host}/nakadai/model/category/save`, categorySave: `${host}/nakadai/model/category/save`,
sourceModelClassification: `${host}/nakadai/model/category/sourceModelClassification`, sourceModelClassification: `${host}/nakadai/model/category/sourceModelClassification`,
@ -200,5 +205,13 @@ export default {
// 关键词 // 关键词
addKeyword: `${host}/data/keyword/addKeyword`, addKeyword: `${host}/data/keyword/addKeyword`,
deleteKeyword: `${host}/data/keyword/deleteKeyword`, deleteKeyword: `${host}/data/keyword/deleteKeyword`,
getKeywordByCategoryId: `${host}/data/keyword/getKeywordByCategoryId` getKeywordByCategoryId: `${host}/data/keyword/getKeywordByCategoryId`,
// 日志管理
logAdd: `${host1}/nakadai/log/add`,
logDel: `${host1}/nakadai/log/delete`,
logGet: `${host1}/nakadai/log/get`,
logManagementList: `${host1}/nakadai/log/logManagementList`,
platformLogList: `${host1}/nakadai/log/platformLogList`,
listUpdate: `${host1}/nakadai/log/update`,
}; };

@ -40,7 +40,8 @@ export default {
categoryId : Number(this.$route.query.categoryId), categoryId : Number(this.$route.query.categoryId),
id : Number(this.$route.query.id), id : Number(this.$route.query.id),
postStatus : Number(this.$route.query.postStatus), postStatus : Number(this.$route.query.postStatus),
isDetail : Boolean(this.$route.query.show), isDetail : Boolean(this.$route.query.show), //
isModel : Boolean(this.$route.query.model), //
form: { form: {
modelName: '', modelName: '',
modelDemo: '' modelDemo: ''
@ -54,12 +55,23 @@ export default {
methods: { methods: {
// //
getData() { getData() {
//
if (this.isModel) {
this.$post(`${this.api.referenceFindById}?id=${this.id}`).then(res => {
const { data } = res
this.form.modelName = data.modelName
this.form.modelDemo = data.modelDemo
this.codeKey++
}).catch(res => {})
} else {
//
this.$post(`${this.api.modelFindById}?id=${this.id}`).then(res => { this.$post(`${this.api.modelFindById}?id=${this.id}`).then(res => {
const { data } = res const { data } = res
this.form.modelName = data.modelName this.form.modelName = data.modelName
this.form.modelDemo = data.modelDemo this.form.modelDemo = data.modelDemo
this.codeKey++ this.codeKey++
}).catch(res => {}) }).catch(res => {})
}
}, },
// //
submit(postStatus){ submit(postStatus){

@ -1,7 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="side"> <div class="side">
<org ref="org"></org> <org ref="tree" @initData="initData"></org>
</div> </div>
<div class="right"> <div class="right">
@ -21,12 +21,16 @@
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column> <el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column prop="userName" label="模型名称" align="center"></el-table-column> <el-table-column prop="modelName" label="模型名称" align="center"></el-table-column>
<el-table-column prop="account" label="导入时间" align="center"></el-table-column> <el-table-column prop="createTime" label="导入时间" align="center"></el-table-column>
<el-table-column prop="workNumber" label="状态" align="center"></el-table-column> <el-table-column label="状态" align="center">
<template slot-scope="scope">
{{ scope.row.isOpen ? '禁用' : '启用' }}
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center"> <el-table-column label="操作" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showTeacher(scope.row)">查看</el-button> <el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="del(scope.row)">移除</el-button> <el-button type="text" @click="del(scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -39,13 +43,14 @@
<el-dialog title="请选择需要导入的模型" :visible.sync="modelVisible" width="500px" class="dialog" :close-on-click-modal="false"> <el-dialog title="请选择需要导入的模型" :visible.sync="modelVisible" width="500px" class="dialog" :close-on-click-modal="false">
<el-tree <el-tree
:data="modelData" :data="modelData"
ref="tree" ref="model"
default-expand-all default-expand-all
show-checkbox show-checkbox
:check-strictly="true" :check-strictly="true"
node-key="id"> node-key="id"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
</el-tree> </el-tree>
<span slot="footer" class="dialog-footer" v-if="!isDetail"> <span slot="footer" class="dialog-footer">
<el-button @click="modelVisible = false"> </el-button> <el-button @click="modelVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit"> </el-button>
</span> </span>
@ -57,6 +62,7 @@ import org from "./modelType"
export default { export default {
data() { data() {
return { return {
systemId: this.$route.query.systemId,
listData: [], listData: [],
keyword: '', keyword: '',
page: 1, page: 1,
@ -64,56 +70,7 @@ export default {
total: 0, total: 0,
multipleSelection: [], multipleSelection: [],
modelVisible: false, modelVisible: false,
modelData: [ modelData: []
{
id: 1,
label: '品牌一',
children: [
{
id: 4,
label: '华东区域',
children: [
{
id: 9,
label: '上海'
},
{
id: 10,
label: '昆山'
}
]
}
]
},
{
id: 2,
label: '品牌二',
children: [
{
id: 5,
label: '华东区域'
},
{
id: 6,
label: '华南区域'
}
]
},
{
id: 3,
label: '品牌三',
children: [
{
id: 7,
label: '华北区域'
},
{
id: 8,
label: '华南区域'
}
]
}
]
}; };
}, },
components: { components: {
@ -130,17 +87,15 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
getData() { getData() {
let data = { this.$post(this.api.referenceDemoList, {
keyWord: this.keyword, modelName: this.keyword,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
staffArchitectureId: this.staffArchitectureId, categoryId: this.$refs.tree.$refs.tree.getCurrentKey()
gradeId: this.gradeId }).then(res => {
}; this.listData = res.data.records
this.$post(this.api.staffList, data).then(res => { this.total = res.data.total
this.listData = res.page.records; }).catch(res => {})
this.total = res.page.total;
}).catch(res => {});
}, },
initData() { initData() {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
@ -150,21 +105,55 @@ export default {
// //
add() { add() {
this.modelVisible = true this.modelVisible = true
//
this.$post(this.api.sourceModelClassification).then(res => {
const { data } = res
const promises = []
const addType = list => {
list.map(e => {
// promise
promises.push(new Promise((resolve,reject) => {
this.$post(this.api.sysModelDemoList, {
pageNum: 1,
pageSize: 10000,
categoryId: e.id
}).then(res => {
const { records } = res.data
records.map(n => {
n.categoryName = n.modelName
})
e.children = [...e.children, ...records]
// console.log(11, e)
resolve()
}).catch(res => {
reject()
})
}))
e.children && e.children.length && addType(e.children)
})
}
addType(data)
// debugger
console.log(data, promises)
Promise.all(promises).then(_ => {
this.modelData = data
}).catch(res => {})
}).catch(res => {})
}, },
// //
show(row) { show(row) {
this.modelVisible = true this.$router.push(`/addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&show=1&model=1`)
}, },
// //
del(row) { del(row) {
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(`${this.api.delStaff}?accountIds=${row.accountId}`).then(res => { this.$post(this.api.deleteReferenceDemo, [row.id]).then(res => {
this.$message.success("删除成功"); this.$message.success("删除成功")
this.getData(); this.getData()
}).catch(res => {}); }).catch(res => {})
}).catch(() => {}); }).catch(() => {})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
@ -175,20 +164,15 @@ export default {
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
let ids = this.multipleSelection.map(item => { let ids = this.multipleSelection.map(e => e.id)
return item.accountId; this.$post(this.api.deleteReferenceDemo, ids).then(res => {
}); this.$refs.table.clearSelection()
this.$post(`${this.api.delStaff}?accountIds=${ids.toString()}`).then(res => { this.$message.success("删除成功")
this.multipleSelection = []; this.getData()
this.$refs.table.clearSelection(); }).catch(res => {})
this.$message.success("删除成功"); }).catch(() => {})
this.getData();
}).catch(res => {
});
}).catch(() => {
});
} else { } else {
this.$message.error("请先选择模型 !"); this.$message.error("请先选择模型 !")
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
@ -197,7 +181,21 @@ export default {
}, },
// //
submit() { submit() {
const data = []
const systemId = this.systemId
const list = this.$refs.model.getCheckedNodes()
const categoryId = this.$refs.tree.$refs.tree.getCurrentKey() //
list.map(e => {
data.push({
systemId,
categoryId,
copyId: e.id
})
})
this.$post(this.api.saveReferenceDemo, data).then(res => {
this.modelVisible = false
this.initData()
}).catch(res => {})
} }
} }
}; };

@ -99,7 +99,96 @@ export default {
}, },
// //
syncModel() { syncModel() {
this.$confirm('同步后当前的组织架构将会被删除,是否继续?', '提示', {
type: 'warning'
}).then(() => {
//
this.$post(`${this.api.delModelInfoBySystemId}?systemId=${this.systemId}`).then(res => {
//
this.$post(this.api.saveReferenceCategory, {
categoryName: '全部',
systemId: this.systemId,
level: 0,
parentId: 0
}).then(res => {
this.addData(res.referenceCategoryId)
}).catch(res => {})
})
}).catch(() => {})
},
//
async addData(id) {
//
this.$post(this.api.sourceModelClassification).then((res) => {
const { data } = res
const systemId = this.systemId
const promises = []
//
const addType = (list, refId) => {
list.map(e => {
// promise
promises.push(new Promise(async (resolve, reject) => {
//
await this.$post(this.api.saveReferenceCategory, {
id: '',
categoryName: e.categoryName,
systemId,
level: e.level,
parentId: refId || id
}).then(async res => {
const referenceCategoryId = res.referenceCategoryId // idparentId
//
promises.push(new Promise((resolve1, reject1) => {
this.$post(this.api.sysModelDemoList, {
pageNum: 1,
pageSize: 10000,
categoryId: e.id
}).then(res => {
let { records } = res.data
records = records.filter(e => e.postStatus && !e.isOpen) //
if (records.length) {
const modelData = []
//
records.map(e => {
modelData.push({
systemId,
categoryId: referenceCategoryId,
copyId: e.id
})
})
//
this.$post(this.api.saveReferenceDemo, modelData).then(res => {
resolve()
resolve1()
}).catch(res => {
reject()
reject1()
})
} else {
resolve()
}
e.children = [...e.children, ...records]
}).catch(res => {
reject()
})
}))
//
this.$nextTick(() => {
e.children && e.children.length && addType(e.children, res.referenceCategoryId)
})
}).catch(res => {
reject()
})
}))
})
}
addType(data[0].children, id)
Promise.all(promises).then(_ => {
setTimeout(this.getType, 500)
})
}).catch(res => {})
}, },
// //
addType(node, data) { addType(node, data) {

@ -1,9 +1,6 @@
<template> <template>
<div> <div>
<div> <div>
<div style="text-align: right">
<el-button type="text" @click="addType(0)">添加</el-button>
</div>
<org-tree <org-tree
:data="orgList" :data="orgList"
default-expand-all default-expand-all
@ -18,6 +15,7 @@
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span> <span style="display: inline-block; margin-right: 20px">{{ node.label }}</span>
<span> <span>
<el-button <el-button
v-if="node.level > 1"
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
@click="editType(data)"> @click="editType(data)">
@ -28,6 +26,7 @@
@click="addType(node, data)"> @click="addType(node, data)">
</el-button> </el-button>
<el-button <el-button
v-if="node.level > 1"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="delType(data)"> @click="delType(data)">

@ -8,8 +8,8 @@
<span class="per_school" v-text="id ? '编辑更新日志' : '新增更新日志'"></span> <span class="per_school" v-text="id ? '编辑更新日志' : '新增更新日志'"></span>
</div> </div>
<div v-if="!isDetail"> <div v-if="!isDetail">
<el-button type="primary" round v-preventReClick @click="submit(1)">发布</el-button> <el-button type="primary" round v-preventReClick @click="submit(0)">发布</el-button>
<el-button v-if="!postStatus" type="primary" round v-preventReClick @click="submit(0)">草稿</el-button> <el-button v-if="!postStatus" type="primary" round v-preventReClick @click="submit(1)">草稿</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -17,7 +17,7 @@
<el-card shadow="hover"> <el-card shadow="hover">
<el-form ref="form" label-width="120px" :disabled="isDetail"> <el-form ref="form" label-width="120px" :disabled="isDetail">
<el-form-item label="版本标题"> <el-form-item label="版本标题">
<el-input placeholder="请输入版本标题" v-model="form.modelName" maxlength="30" style="width: 400px"></el-input> <el-input placeholder="请输入版本标题" v-model="form.versionName" maxlength="30" style="width: 400px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="封面图片"> <el-form-item label="封面图片">
<el-upload <el-upload
@ -33,7 +33,7 @@
:headers="headers" :headers="headers"
name="file" name="file"
> >
<img v-if="coverUrl" :src="coverUrl" class="avatar"> <img v-if="form.coverUrl" :src="form.coverUrl" class="avatar">
<div class="uploader-default" v-else> <div class="uploader-default" v-else>
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<p>上传封面</p> <p>上传封面</p>
@ -75,10 +75,10 @@
export default { export default {
data() { data() {
return { return {
categoryId : this.$route.query.categoryId, id : this.$route.query.id,
form: { form: {
modelName: '', versionName: '',
modelDemo: '', coverUrl: '',
content: [{}] content: [{}]
} }
}; };
@ -89,11 +89,10 @@ export default {
methods: { methods: {
// //
getData() { getData() {
this.$post(`${this.api.modelFindById}?id=${this.id}`).then(res => { this.$get(`${this.api.logGet}?logId=${this.id}`).then(res => {
const { data } = res const { log } = res
this.form.modelName = data.modelName this.form.versionName = log.versionName
this.form.modelDemo = data.modelDemo this.form.coverUrl = log.coverUrl
this.codeKey++
}).catch(res => {}) }).catch(res => {})
}, },
// //
@ -105,25 +104,24 @@ export default {
}, },
// //
submit(postStatus){ submit(draft){
const { modelName, modelDemo } = this.form const { versionName, coverUrl } = this.form
const id = this.id const id = this.id
if (!modelName) return this.$message.error('请输入模型名称') if (!versionName) return this.$message.error('请输入版本标题')
if (!modelDemo) return this.$message.error('请输入模型代码') if (!coverUrl) return this.$message.error('请输入更新内容')
const data = { const data = {
categoryId: this.categoryId, versionName,
modelName, coverUrl,
modelDemo, draft
postStatus
} }
if (id) { if (id) {
data.id = id data.logId = id
this.$post(this.api.updateSysModelDemo, data).then(res => { this.$post(this.api.listUpdate, data).then(res => {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.$router.back() this.$router.back()
}).catch(res => {}) }).catch(res => {})
} else { } else {
this.$post(this.api.saveSysModelDemo, data).then(res => { this.$post(this.api.logAdd, data).then(res => {
this.$message.success('新增成功') this.$message.success('新增成功')
this.$router.back() this.$router.back()
}).catch(res => {}) }).catch(res => {})

@ -20,7 +20,7 @@ import log from "./log";
export default { export default {
data() { data() {
return { return {
active: "staff", active: this.$route.query.type || 'staff',
tabs: { tabs: {
staff: "后台账号", staff: "后台账号",
role: "角色权限", role: "角色权限",
@ -43,7 +43,14 @@ export default {
}, },
methods: { methods: {
tabChange(index) { tabChange(index) {
this.active = index; this.active = index
this.$router.push({
path: 'system',
query: {
...this.$route.query,
type: index
}
})
}, },
initTabs() { initTabs() {
let tab1 = this.auth("员工管理"); let tab1 = this.auth("员工管理");

@ -11,11 +11,19 @@
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="平台名称" align="center" min-width="250" show-overflow-tooltip></el-table-column> <el-table-column prop="roleName" label="平台名称" align="center" min-width="250" show-overflow-tooltip>
<el-table-column prop="roleName" label="最新版本名称" align="center"></el-table-column> <template slot-scope="scope">
<el-table-column prop="roleName" label="最新版本状态" align="center"></el-table-column> {{ platformList.find(e => e.id === scope.row.platformId).name }}
<el-table-column prop="roleName" label="最近编辑" align="center"></el-table-column> </template>
<el-table-column prop="roleName" label="版本数" align="center"></el-table-column> </el-table-column>
<el-table-column prop="versionName" label="最新版本名称" align="center"></el-table-column>
<el-table-column prop="roleName" label="最新版本状态" align="center">
<template slot-scope="scope">
{{ scope.row.draft ? '草稿箱' : '已发布' }}
</template>
</el-table-column>
<el-table-column prop="updateTime" label="最近编辑" align="center"></el-table-column>
<el-table-column prop="versionNum" label="版本数" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toManage(scope.row)">管理</el-button> <el-button type="text" @click="toManage(scope.row)">管理</el-button>
@ -29,12 +37,13 @@
</template> </template>
<script> <script>
import Setting from '@/setting'
export default { export default {
data() { data() {
return { return {
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
isDetail: false, platformList: Setting.platformList,
form: { form: {
id: "", id: "",
roleName: "", roleName: "",
@ -57,21 +66,20 @@ export default {
} }
}, },
mounted() { mounted() {
// this.getData(); this.getData()
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=1`).then(res => { this.$get(`${this.api.logManagementList}?search=${this.keyword}`).then(res => {
this.listData = res.rolePage.records; this.listData = res.logManagementListVo
this.total = res.rolePage.total; }).catch(res => {})
}).catch(res => {});
}, },
currentChange(val) { currentChange(val) {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
toManage() { toManage(row) {
this.$router.push(`/manageLog`) this.$router.push(`/manageLog?platformId=${row.platformId}`)
} }
} }
}; };

@ -5,7 +5,7 @@
<h6>日志更新</h6> <h6>日志更新</h6>
<div class="filter"> <div class="filter">
<label>版本查询</label> <label>版本查询</label>
<el-select v-model="value" size="small" placeholder="请选择版本"> <el-select v-model="versionName" size="small" placeholder="请选择版本">
<el-option <el-option
v-for="item in vers" v-for="item in vers"
:key="item.value" :key="item.value"
@ -20,14 +20,14 @@
</div> </div>
</div> </div>
<el-timeline class="timeline"> <el-timeline class="timeline">
<el-timeline-item placement="top"> <el-timeline-item placement="top" v-for="(item, i) in listData" :key="i">
<p class="sign">2022-03-05</p> <p class="sign">{{ item.updateTime }}</p>
<div class="ver"> <div class="ver">
<div> <div>
职站V1.0 {{ platformList.find(e => e.id === item.platformId).name + item.versionName }}
<span class="action"> <span class="action">
<i class="el-icon-edit-outline"></i> <i class="el-icon-edit-outline" @click="edit(item)"></i>
<i class="el-icon-delete" @click="del"></i> <i class="el-icon-delete" @click="del(item)"></i>
</span> </span>
</div> </div>
<el-switch v-model="frontShow" :active-value="0" :inactive-value="1"></el-switch> <el-switch v-model="frontShow" :active-value="0" :inactive-value="1"></el-switch>
@ -44,35 +44,42 @@
</template> </template>
<script> <script>
import Setting from '@/setting'
export default { export default {
data() { data() {
return { return {
vers: [] platformId: this.$route.query.platformId,
platformList: Setting.platformList,
versionName: '',
vers: [],
listData: []
}; };
}, },
mounted() { mounted() {
// this.getData(); this.getData()
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=1`).then(res => { this.$get(`${this.api.platformLogList}?platformId=${this.platformId}&versionName=${this.versionName}`).then(res => {
this.listData = res.rolePage.records; this.listData = res.logList
this.total = res.rolePage.total; }).catch(res => {})
}).catch(res => {});
}, },
// //
add() { add() {
this.$router.push(`/addLog`) this.$router.push(`/addLog`)
}, },
//
edit(item) {
this.$router.push(`/addLog?id=${item.logId}`)
},
// //
del(item) { del(item) {
this.$confirm("确定要删除分类吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(`${this.api.deleteModelClass}?categoryId=${item.id}`).then(res => { this.$post(`${this.api.logDel}?logId=${item.logId}`).then(res => {
this.$message.success("删除成功") this.$message.success("删除成功")
this.$emit("getData") this.getData()
this.getType()
}).catch(res => {}) }).catch(res => {})
}).catch(() => {}) }).catch(() => {})
} }

Loading…
Cancel
Save