Browse Source

共享范围

luckysheet_xiaowang
是小王呀\24601 6 months ago
parent
commit
ea45f5cef2
  1. 14
      src/views/modules/base/smartExcel/cpts/data-sharing.vue
  2. 23
      src/views/modules/base/smartExcel/cpts/picture-add.vue

14
src/views/modules/base/smartExcel/cpts/data-sharing.vue

@ -3,7 +3,7 @@
<el-table :data="tableData" border class="m-table-item" :height="tableHeight" v-if="pageType=='list'"> <el-table :data="tableData" border class="m-table-item" :height="tableHeight" v-if="pageType=='list'">
<el-table-column prop="taskTitle" label="文件名称" min-width="140" align="center" <el-table-column prop="name" label="文件名称" min-width="140" align="center"
:show-overflow-tooltip="true" > :show-overflow-tooltip="true" >
<template slot-scope="scope"> <template slot-scope="scope">
<img style="width: 25px; height: 25px;margin-right: 20px;" <img style="width: 25px; height: 25px;margin-right: 20px;"
@ -12,11 +12,11 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="totalNum" label="数据提供单位" align="center" :show-overflow-tooltip="true"> <el-table-column prop="orgName" label="数据提供单位" align="center" :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column prop="redDot" align="center" label="下载次数" :show-overflow-tooltip="true"> <el-table-column prop="size" align="center" label="下载次数" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="onClickRecord">{{ scope.row.agencyName }}</el-button> <el-button type="text" @click="onClickRecord">{{ scope.row.size }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createByName" align="center" label="创建人" :show-overflow-tooltip="true"> <el-table-column prop="createByName" align="center" label="创建人" :show-overflow-tooltip="true">
@ -54,7 +54,9 @@ data() {
return { return {
infoObj:{}, infoObj:{},
pageType:"list", pageType:"list",
formData:{}, formData:{
name:"",
},
showdownloadRecord:false, showdownloadRecord:false,
pageNo: 1, pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20, pageSize: window.localStorage.getItem("pageSize") || 20,
@ -93,7 +95,7 @@ methods: {
this.getTableData(); this.getTableData();
}, },
async getTableData() { async getTableData() {
const url = "/actual/base/communityOneTablePublish/page"; const url = "/actual/base/sharedData/page";
const { pageSize, pageNo, formData } = this; const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestGet(url, { const { data, code, msg } = await requestGet(url, {
pageSize, pageSize,

23
src/views/modules/base/smartExcel/cpts/picture-add.vue

@ -21,8 +21,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label-width="150px" label="共享范围" prop="agencyIdArray"> <el-form-item label-width="150px" label="共享范围" prop="agencyIdArray">
<el-cascader class="cell-width-1" ref="myCascader" :clearable="false" filterable @change="handleCascaderChange" <el-cascader class="cell-width-1" ref="myCascader" :clearable="false" filterable @change="handleCascaderChange()"
:filter-method="filter" :options="orgOptions" :filter-method="filter" v-model.trim="agencyIdArray" :options="orgOptions"
:props="orgOptionProps" :show-all-levels="false" :props="orgOptionProps" :show-all-levels="false"
collapse-tags collapse-tags
> >
@ -65,13 +65,13 @@
data() { data() {
return { return {
orgOptionProps: { orgOptionProps: {
emitPath:false, emitPath: false,
multiple: true, multiple: true,
value: 'orgId', value: 'orgId',
label: 'orgName', label: 'orgName',
children: 'subOrgList', children: 'subOrgList',
checkStrictly: true, checkStrictly: true,
expandTrigger:'click' expandTrigger: 'click'
}, },
orgOptions: [], orgOptions: [],
fileList:[], fileList:[],
@ -120,19 +120,26 @@
}, },
methods: { methods: {
handleCascaderChange(selectedValues) { handleCascaderChange() {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
console.log(selectedValues,obj,this.agencyIdArray,"Sdjksdflkj"); console.log(this.agencyIdArray,"Sdjksdflkj");
if(obj.subOrgList){
this.findNodeByValue(obj.subOrgList)
}
// //
// this.agencyIdArray = Array.from(allSelected); //
},
async findNodeByValue(option, value) {
obj.subOrgList.forEach(value => { obj.subOrgList.forEach(value => {
console.log(value,"dsfjkhfsdl"); console.log(value, "dsfjkhfsdl");
this.agencyIdArray.push(value.orgId) this.agencyIdArray.push(value.orgId)
console.log(this.agencyIdArray, "Sdjksdflkj");
// const node = this.findNodeByValue(this.orgOptions, value); // const node = this.findNodeByValue(this.orgOptions, value);
// if (node && node.children) { // if (node && node.children) {
// findChildren([node]); // findChildren([node]);
// } // }
}); });
// this.agencyIdArray = Array.from(allSelected); //
}, },
filter(node, keyword) { filter(node, keyword) {
return node.data.agencyName.includes(keyword) return node.data.agencyName.includes(keyword)

Loading…
Cancel
Save