zx 3 years ago
parent c18f14567a
commit bbf00eb1e8

@ -37,6 +37,13 @@
<el-table :data="tableData.data" size="default" border
:header-cell-style="{background: '#EEE'}">
<el-table-column prop="title" label="标题" width="180"></el-table-column>
<el-table-column prop="sortWeight" label="排序" >
<template #default="scope">
<el-input v-model="sortValue" @blur="editCancel" @change="handlerChangeSort(value)" style="width: 120px" v-if="isEditing && scope.row.id == editId"></el-input>
<span v-else>{{scope.row.sortWeight}}</span>
<el-icon @click="handlerSortEdit(scope.row)"><Edit /></el-icon>
</template>
</el-table-column>
<el-table-column prop="fileUrl" label="文件" width="600">
<template #default="scope">
<el-link :href="$ImgUrl(scope.row.fileUrl)" target="_blank">
@ -70,10 +77,13 @@
<uploadFile @change="handlerCoverUpload" :config="{ limit: 10, accept: '.jpg, .jpeg, .png, .gif, .mp4, .ogv, .ogg'}">
<el-button>点击上传</el-button>
</uploadFile>
<el-link :href="$ImgUrl(setForm.fileUrl)" target="_blank">
{{setForm.fileUrl}}
</el-link>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="editVisible = false;setForm.title = ''">取消</el-button>
<el-button @click="editVisible = false;setForm.title = '';setForm.fileUrl = ''">取消</el-button>
<el-button @click="editConfirm" type="primary">确定</el-button>
</template>
</el-dialog>
@ -140,6 +150,11 @@ export default defineComponent({
},
handlerEdit(value) {
this.activeId = value
this.proxy.$post("/teachingRefe/detail", {id: value}).then(res => {
const data = res.data;
this.setForm.title = data.title;
this.setForm.fileUrl = data.fileUrl;
}).catch(() => {});
this.editVisible = true;
},
editConfirm() {
@ -181,7 +196,25 @@ export default defineComponent({
},
handlerCoverUpload(data) {
this.setForm.fileUrl = data.fileUrl
}
},
//
editCancel() {
this.isEditing = false;
},
handlerSortEdit(value) {
this.editId = value.id;
this.isEditing = true;
},
handlerChangeSort(value) {
let obj = {id: this.editId,sortWeight: this.sortValue*1}
this.proxy.$post("/teachingRefe/updSort", obj).then(res => {
this.getData();
this.isEditing = false;
this.editId = undefined;
this.sortValue = undefined;
this.$message.success(res.data)
}).catch(() => {});
},
}
})
</script>

@ -104,9 +104,13 @@ export default defineComponent({
getData() {
let obj = Object.assign({pageNum: this.pagination.current,pageSize: this.pagination.pageSize})
this.proxy.$post("/task/customerNoteList", obj).then(res => {
if(res.code == 200) {
const data = res.data
this.tableData.data = data.records;
this.pagination.total = data.total
} else {
this.$message.error(res.msg)
}
}).catch(() => {});
},
confirm() {

@ -127,11 +127,15 @@ export default defineComponent({
}).catch(() => {});
},
getData() {
let obj = Object.assign(this.form,{pageNum: this.pagination.current,pageSize: this.pagination.pageSize})
let obj = Object.assign(this.form,{pageNum: this.pagination.current, pageSize: this.pagination.pageSize})
this.proxy.$post("/task/list", obj).then(res => {
if(res.code == 200) {
const data = res.data
this.tableData.data = data.records;
this.pagination.total = data.total
} else {
this.$message.error(res.msg)
}
}).catch(() => {});
},
confirm() {

@ -1,6 +1,16 @@
<template>
<div class="main-content">
<h3>title</h3>
<h3 class="top-title" style="margin-top: 32px">传播数据</h3>
<div class="top-number">
<div class="top-number-item">
<div class="title-style">总播放数</div>
<div class="number-style">100000</div>
</div>
</div>
<div class="bottom-list">
<h3 class="top-title">传播数据</h3>
</div>
</div>
</template>
@ -12,20 +22,26 @@ export default defineComponent({
const activeId = reactive({
value: 0
});
const transformData = reactive({
taskTitle: '',
});
const transformList = ref([]);
const { proxy } = getCurrentInstance();
return {
proxy,
transformData,transformList,
activeId
}
},
mounted() {
this.getApi();
// this.getApi();
},
methods: {
getApi() {
if(this.$route.params.id) {
this.proxy.$post("/task/detail", {id: this.$route.params.id}).then(res => {
this.proxy.$post("/task/taskEffect", {id: this.$route.params.id}).then(res => {
const data = res.data;
console.log(data)
}).catch(() => {});
}
},
@ -46,4 +62,30 @@ export default defineComponent({
text-align: center;
border: 1px solid;
}
.top-title {
color: black;
font-weight: 600;
font-size: 14px;
line-height: 16px;
}
.top-number {
padding: 16px 0px 16px 0px;
display: flex;
justify-content: flex-start;
.title-style {
font-weight: 600;
font-size: 14px;
line-height: 16px;
}
.number-style {
color: black;
font-weight: 900;
font-size: 32px;
line-height: 28px;
margin-top: 6px
}
}
.bottom-list {
padding: 16px 0px 16px 0px
}
</style>

@ -54,9 +54,12 @@
<template #header>
<span style="font-size: 16px;font-weight: bold">角色权限</span>
</template>
<el-tree ref="tree" node-key="id" :data="treeData" :props="defaultProps" show-checkbox @check="checkChange"></el-tree>
<el-tree ref="tree" node-key="name" default-expand-all
:data="treeData" :props="defaultProps" :default-checked-keys="checkedName"
show-checkbox @check="checkChange()">
</el-tree>
<template #footer>
<el-button type="primary" @click="drawerVisible = false" size="default">确定</el-button>
<el-button type="primary" @click="authorChangeComfirm" size="default">确定</el-button>
</template>
</el-drawer>
<el-dialog v-model="editVisible" width="30%" title="编辑角色">
@ -99,18 +102,19 @@ export default defineComponent({
const drawerVisible = ref(false);
const { proxy } = getCurrentInstance();
const defaultProps = {
children: 'children',
label: 'label',
disabled: 'disabled'
children: 'operationVoList',
label: 'name',
};
const treeData = ref([]);
const checkedName = ref([]);
const checkedId = ref([]);
return {
form,setForm,proxy,
tableData,activeId,
pagination,
statusFormatter,
visible,editVisible,drawerVisible,
defaultProps, treeData,
defaultProps, treeData,checkedName,checkedId
}
},
mounted() {
@ -168,15 +172,41 @@ export default defineComponent({
}).catch(() => {});
},
handlerAuthor(value) {
this.proxy.$post("/userRole/list", {roleId: value}).then(res => {
this.activeId = value;
this.proxy.$post("/userJurisdiction/findByRoleId", {roleId: value}).then(res => {
const data = res.data
this.treeData = data.rows;
this.treeData = data;
const arr = [];
this.treeData.forEach(ele => {
ele.operationVoList.forEach(e => {
arr.push(e.name)
})
});
this.checkedName = arr;
this.drawerVisible = true
}).catch(() => {});
},
checkChange() {
let selectedKeys = this.$refs.tree.getCheckedKeys()
console.log(selectedKeys)
let selectedKeys = this.$refs.tree.getCheckedNodes()
let arr = []
selectedKeys.forEach(ele => {
if(!ele.operationVoList) {
arr.push(ele.id)
}
});
console.log(arr)
this.checkedId = arr;
},
authorChangeComfirm() {
let obj = {roleId: this.activeId,jurisdictionIds: this.checkedId}
this.proxy.$post("/userJurisdiction/operationRoleJurisdiction", obj).then(res => {
if(res.code == 200) {
this.$message.success('修改成功');
this.drawerVisible = false;
} else {
this.$message.error(res.msg);
}
}).catch(() => {});
},
//
singleDel(id) {

Loading…
Cancel
Save