flat: 123
This commit is contained in:
@@ -58,6 +58,9 @@
|
||||
<!--自定义列-->
|
||||
<template slot="worktypes" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" :content="row.worktypes" placement="top">
|
||||
<div slot="content">
|
||||
<div v-for="(item, index) in clipStr(row.worktypes)" :key="index"><div>{{item}}</div></div>
|
||||
</div>
|
||||
<div>{{ row.worktypes | ellipsis }}</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@@ -192,7 +195,10 @@
|
||||
@current-change="workCurrentChange"
|
||||
>
|
||||
<template slot="missionDesc" slot-scope="{ row }">
|
||||
<el-tooltip class="item" effect="dark" :content="row.missionDesc" placement="top-start">
|
||||
<el-tooltip class="item" effect="dark" placement="top-start">
|
||||
<div slot="content">
|
||||
<div v-for="(item, index) in clipStr(row.missionDesc)" :key="index"><div>{{item}}</div></div>
|
||||
</div>
|
||||
<span>{{ row.missionDesc.length > 50 ? row.missionDesc.substring(0, 50) : row.missionDesc}}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@@ -218,6 +224,43 @@
|
||||
@size-change="policySizeChange"
|
||||
@current-change="policyCurrentChange"
|
||||
>
|
||||
<template slot="policyContent" slot-scope="{ row }">
|
||||
<el-tooltip class="item" effect="dark" placement="top-start">
|
||||
<div slot="content">
|
||||
<div v-for="(item, index) in clipStr(row.policyContent)" :key="index"><div>{{item}}</div></div>
|
||||
</div>
|
||||
<span>{{ row.policyContent.length > 50 ? row.policyContent.substring(0, 50) : row.policyContent}}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template slot="labelName" slot-scope="{ row }">
|
||||
<el-tooltip class="item" effect="dark" placement="top-start">
|
||||
<div slot="content">
|
||||
<div v-for="(item, index) in clipStr(row.labelName)" :key="index"><div>{{item}}</div></div>
|
||||
</div>
|
||||
<span>{{ row.labelName.length > 50 ? row.labelName.substring(0, 50) : row.labelName}}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template slot="labelNameForm" slot-scope="{row}">
|
||||
<div>
|
||||
<el-tag style="margin: 4px 10px" v-for="(item, index) in row.labelName.split(',')" :key="index">{{ item }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="policyContentForm" slot-scope="{row}">
|
||||
<div>
|
||||
{{row.policyContent}}
|
||||
</div>
|
||||
</template>
|
||||
<template slot="guidelineContentForm" slot-scope="{row}">
|
||||
<div>
|
||||
{{row.guidelineContent}}
|
||||
</div>
|
||||
</template>
|
||||
<template slot="policyContentForm" slot-scope="{row}">
|
||||
<div>
|
||||
{{row.policyContent}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</avue-crud>
|
||||
</el-drawer>
|
||||
<el-drawer
|
||||
@@ -273,6 +316,7 @@ import ied from "@/views/util/import-error-dialog";
|
||||
import { excelAccept } from "@/common/accept";
|
||||
import missionView from "../../mission/Table/missionView.vue";
|
||||
import workView from "../../works/Table/missionView.vue"
|
||||
import {serviceType} from "@/common/dic";
|
||||
const page = {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
@@ -558,15 +602,133 @@ export default {
|
||||
indexLabel: "序号",
|
||||
refreshBtn: false,
|
||||
height: '100',
|
||||
viewBtn:true,
|
||||
dialogType: "drawer",
|
||||
column: [{
|
||||
label: '政策名称',
|
||||
prop: 'name'
|
||||
}, {
|
||||
label: '政策概述',
|
||||
prop: 'policyContent'
|
||||
}, {
|
||||
label: '政策标签',
|
||||
prop: 'labelName'
|
||||
},
|
||||
{
|
||||
label: "政策级别",
|
||||
prop: "level",
|
||||
span: 12,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "政策文号",
|
||||
prop: "number",
|
||||
span: 12,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "发文机构",
|
||||
prop: "issuingAuthority",
|
||||
span: 12,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "分组",
|
||||
prop: "groupId",
|
||||
type: "tree",
|
||||
hide: true,
|
||||
span: 12,
|
||||
display: true,
|
||||
placeholder: "请选择 分组",
|
||||
},
|
||||
{
|
||||
label: "有效性",
|
||||
prop: "status",
|
||||
type: "tree",
|
||||
span: 12,
|
||||
hide: true,
|
||||
display: true,
|
||||
dicData: [{ name: "有效", value: 1 }, { name: "无效", value: 0 }],
|
||||
props: {
|
||||
label: "name",
|
||||
value: "value",
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "服务类型",
|
||||
prop: "stype",
|
||||
type: "tree",
|
||||
span: 12,
|
||||
display: true,
|
||||
hide: true,
|
||||
dicData: serviceType,
|
||||
props: {
|
||||
label: "label",
|
||||
value: "value",
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择服务类型",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
placeholder: "请选择 服务类型",
|
||||
},
|
||||
{
|
||||
label: "发文字号",
|
||||
prop: "issuingNumber",
|
||||
hide: true,
|
||||
span: 12,
|
||||
// row: true,
|
||||
maxlength: 50,
|
||||
showWordLimit: true,
|
||||
},
|
||||
{
|
||||
label: "类别",
|
||||
prop: "category",
|
||||
span: 12,
|
||||
hide: true,
|
||||
maxlength: 50,
|
||||
showWordLimit: true,
|
||||
},
|
||||
{
|
||||
label: "标签",
|
||||
prop: "labelName",
|
||||
hide: false,
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: "政策文件名",
|
||||
prop: "policyFileName",
|
||||
hide: true,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: '政策内容',
|
||||
prop: 'policyContent',
|
||||
slot: true,
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: "指南文件名",
|
||||
prop: "guidelineFileName",
|
||||
hide: true,
|
||||
span: 24,
|
||||
maxlength: 50,
|
||||
showWordLimit: true,
|
||||
},
|
||||
{
|
||||
label: "指南内容",
|
||||
prop: "guidelineContent",
|
||||
hide: true,
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remarks",
|
||||
type: "textarea",
|
||||
hide: true,
|
||||
span: 24,
|
||||
maxlength: 100,
|
||||
showWordLimit: true,
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -637,13 +799,13 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
selectedWorkTypes: {
|
||||
selectLabelNameTypes: {
|
||||
get() {
|
||||
if (!this.obj.serveLabels) {
|
||||
if (!this.obj.labelName) {
|
||||
return [];
|
||||
}
|
||||
const result = [];
|
||||
const wt = this.obj.serveLabels.split(",");
|
||||
const wt = this.obj.labelName ? this.obj.labelName.split(",") : [];
|
||||
wt.forEach((item) => {
|
||||
result.push({ name: item });
|
||||
});
|
||||
@@ -654,7 +816,7 @@ export default {
|
||||
val.forEach((item) => {
|
||||
arr.push(item.name);
|
||||
});
|
||||
this.obj.serveLabels = arr.join(",");
|
||||
this.obj.labelName = arr.join(",");
|
||||
},
|
||||
},
|
||||
worktypeData() {
|
||||
@@ -680,6 +842,20 @@ export default {
|
||||
this.getLabelList();
|
||||
},
|
||||
methods: {
|
||||
toPolicyDetail(row) {
|
||||
console.log(row)
|
||||
console.log()
|
||||
},
|
||||
clipStr(str) {
|
||||
const clip = []
|
||||
if(str && str.length > 50) {
|
||||
for (let i = 0; i < Math.ceil(str.length / 50); i++) {
|
||||
clip.push(str.slice(i * 50,i * 50 + 50))
|
||||
}
|
||||
return clip
|
||||
}
|
||||
return [str]
|
||||
},
|
||||
getLabelList() {
|
||||
getLabelList().then( (res) => {
|
||||
const arr = res.data.data.flatMap(obj => obj.child.map(item => item.concatName));
|
||||
|
||||
Reference in New Issue
Block a user