|
@@ -1,28 +1,14 @@
|
|
|
<template>
|
|
|
- <div class="ghzc ResourceShare">
|
|
|
+ <div class="ghzc ResourceShare sharedLocation">
|
|
|
<div class="innerContainer" v-drag>
|
|
|
<custom-form ref="formRef" :model="model" :config="formConfig">
|
|
|
- <template #time>
|
|
|
- <el-date-picker
|
|
|
- v-model="model.sj"
|
|
|
- type="daterange"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- range-separator="~"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- class="datepicker"
|
|
|
- size="mini"
|
|
|
- @change="changedate"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
- </template>
|
|
|
<template #type>
|
|
|
- <el-select v-model="model.placeCode" placeholder="申请状态">
|
|
|
+ <el-select v-model="model.type" placeholder="申请状态">
|
|
|
<el-option
|
|
|
- v-for="item in optionList"
|
|
|
- :key="item.code"
|
|
|
- :label="item.name"
|
|
|
- :value="item.code"
|
|
|
+ v-for="item in servicetype"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -40,17 +26,28 @@
|
|
|
class="tablePage"
|
|
|
:cloumn="cloumn"
|
|
|
:table="table"
|
|
|
+ :indexed="false"
|
|
|
:showTotal="false"
|
|
|
ref="tableDialogRef"
|
|
|
@currentChange="searchFun"
|
|
|
+ :treeProps="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
>
|
|
|
<template #type="{ row }">
|
|
|
- <el-checkbox v-model="row.checked" @change="changeShare(row)">
|
|
|
+ {{ sertypeMap[row.type] || "-" }}
|
|
|
+ </template>
|
|
|
+ <template #shared="{ row }">
|
|
|
+ <el-checkbox
|
|
|
+ v-if="row.url"
|
|
|
+ v-model="row.checked"
|
|
|
+ @change="changeShare(row)"
|
|
|
+ >
|
|
|
共享
|
|
|
</el-checkbox>
|
|
|
</template>
|
|
|
<template #action="{ row }">
|
|
|
- <span class="usable" @click="fieldset(row)">共享字段设置</span>
|
|
|
+ <span class="usable" v-if="row.url" @click="fieldset(row)"
|
|
|
+ >共享字段设置</span
|
|
|
+ >
|
|
|
</template>
|
|
|
</tablePage>
|
|
|
</div>
|
|
@@ -64,8 +61,9 @@ import tablePage from "@/components/mapView/tablePage.vue";
|
|
|
import customForm from "@/components/mapView/custom-form.vue";
|
|
|
import fieldSet from "./components/fieldSetModal.vue";
|
|
|
import { FormConfig, TableHeader } from "./config";
|
|
|
-import { Getfiledslist, listZyml } from "@/api/shared.js";
|
|
|
+import { listZyml, shareZyml } from "@/api/shared.js";
|
|
|
import { handleTree } from "@/utils/ruoyi.js";
|
|
|
+import { Getservicetype } from "../myApplication/config";
|
|
|
export default {
|
|
|
components: {
|
|
|
tablePage,
|
|
@@ -75,98 +73,48 @@ export default {
|
|
|
props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- queryParams: {
|
|
|
- name: null,
|
|
|
- type: null,
|
|
|
- state: null,
|
|
|
- year: null,
|
|
|
- },
|
|
|
model: {
|
|
|
- id: "23fa916114494640b71988d9858474c3",
|
|
|
- regionCode: "", //地区编码
|
|
|
- placeCode: "", //所属小区
|
|
|
startTime: "",
|
|
|
endTime: "",
|
|
|
sj: ["", ""],
|
|
|
+ type: "",
|
|
|
+ state: null,
|
|
|
+ year: null,
|
|
|
},
|
|
|
formConfig: FormConfig,
|
|
|
cloumn: TableHeader,
|
|
|
+ servicetype: [],
|
|
|
+ sertypeMap: {},
|
|
|
table: { data: [], total: 0 },
|
|
|
- table: {
|
|
|
- data: [
|
|
|
- { JGMC: "ssmdmm", type: 0, typeN: "正在审核", checked: false },
|
|
|
- {
|
|
|
- JGMC: "ssmdmm",
|
|
|
- type: 1,
|
|
|
- time: "2024/9/3",
|
|
|
- typeN: "审核通过",
|
|
|
- url: "snsd",
|
|
|
- checked: true,
|
|
|
- list: [
|
|
|
- { time: "2024/9/3", jg: "申请通过" },
|
|
|
- { time: "2024/8/13", jg: "申请通过" },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- JGMC: "ssmdmm",
|
|
|
- type: 2,
|
|
|
- typeN: "审核不通过",
|
|
|
- list: [
|
|
|
- { time: "2024/9/3", jg: "申请通过" },
|
|
|
- { time: "2024/8/13", jg: "申请通过" },
|
|
|
- ],
|
|
|
- },
|
|
|
- { JGMC: "ssmdmm", type: 3, typeN: "已撤回" },
|
|
|
- ],
|
|
|
- total: 0,
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
searchFun(page) {
|
|
|
- this.getList(page);
|
|
|
+ this.getTableData(page);
|
|
|
},
|
|
|
/** 查询数据资源目录列表 */
|
|
|
- getList() {
|
|
|
- this.loading = true;
|
|
|
- listZyml(this.queryParams).then((response) => {
|
|
|
- // this.zymlList = handleTree(response.data, "bsm", "pbsm");
|
|
|
- // this.loading = false;
|
|
|
- this.table = {
|
|
|
- data: handleTree(response.data, "bsm", "pbsm"),
|
|
|
- };
|
|
|
- console.log(this.zymlList);
|
|
|
- });
|
|
|
- },
|
|
|
- getTreeselect() {
|
|
|
- listZyml().then((response) => {
|
|
|
- this.zymlOptions = [];
|
|
|
- const data = { bsm: 0, name: "根节点", children: [] };
|
|
|
- data.children = handleTree(response.data, "bsm", "pbsm");
|
|
|
- this.zymlOptions.push(data);
|
|
|
- });
|
|
|
- },
|
|
|
async getTableData(page = { pageIndex: 1, size: 10 }) {
|
|
|
- this.model.pageNum = page.pageIndex;
|
|
|
- this.model.pageSize = page.size;
|
|
|
+ // this.model.pageNum = page.pageIndex;
|
|
|
+ // this.model.pageSize = page.size;
|
|
|
this.model.startTime = this.model.sj[0];
|
|
|
this.model.endTime = this.model.sj[1];
|
|
|
- let data = await Getfiledslist(this.model);
|
|
|
- // this.active_dableData = data.data;
|
|
|
+ let res = await listZyml(this.model);
|
|
|
+
|
|
|
this.table = {
|
|
|
- data: data.rows,
|
|
|
- total: data.total,
|
|
|
+ data: handleTree(res.data, "bsm", "pbsm"),
|
|
|
+ total: 0,
|
|
|
};
|
|
|
},
|
|
|
reset() {
|
|
|
this.model = {
|
|
|
- zymlBy: "",
|
|
|
- state: "",
|
|
|
startTime: "",
|
|
|
endTime: "",
|
|
|
sj: ["", ""],
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ type: "",
|
|
|
+ state: null,
|
|
|
+ year: null,
|
|
|
+ // pageNum: 1,
|
|
|
+ // pageSize: 10,
|
|
|
};
|
|
|
this.searchFun();
|
|
|
},
|
|
@@ -174,14 +122,24 @@ export default {
|
|
|
fieldset(row) {
|
|
|
this.$refs.fieldSetModal.Init(row);
|
|
|
},
|
|
|
- changeShare(row) {},
|
|
|
+ changeShare(row) {
|
|
|
+ shareZyml({ id: row.bsm }).then((res) => {
|
|
|
+ this.$message.success("共享状态切换成功!");
|
|
|
+ this.searchFun();
|
|
|
+ });
|
|
|
+ },
|
|
|
closeMdel() {
|
|
|
this.searchFun();
|
|
|
},
|
|
|
},
|
|
|
computed: {},
|
|
|
watch: {},
|
|
|
- mounted() {
|
|
|
+ async mounted() {
|
|
|
+ this.servicetype = await Getservicetype();
|
|
|
+ this.servicetype.forEach((ty) => {
|
|
|
+ this.sertypeMap[ty.dictValue] = ty.dictLabel;
|
|
|
+ });
|
|
|
+ console.log("--s-s--s", this.sertypeMap);
|
|
|
this.searchFun();
|
|
|
},
|
|
|
};
|
|
@@ -194,4 +152,10 @@ export default {
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
@import "../../cockpit/datePicker.scss";
|
|
|
+.sharedLocation {
|
|
|
+ .el-table {
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: hidden;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|