Merge branch 'master' into feature-creative-center
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<span :class="tab.link === currentPath ? 'click' : 'click2'">{{ index+1 }}</span>
|
||||
<span>{{ tab.title }}</span>
|
||||
<span v-if="index!=3"
|
||||
style="color:#C4C0C0;margin:0 10px">--------</span>
|
||||
style="width:54px;margin:0 10px;border-top: 1px dashed #C4C0C0;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right"
|
||||
@@ -32,7 +32,7 @@
|
||||
@click="openPublishModal">
|
||||
<template #icon>
|
||||
<i class="iconfont icon-Path"
|
||||
style="font-size: 18px; margin-right: 6px"></i>
|
||||
style="font-size: 15px; margin-right: 6px"></i>
|
||||
</template>
|
||||
发布
|
||||
</a-button>
|
||||
@@ -53,7 +53,7 @@
|
||||
分享
|
||||
</a-button>
|
||||
<a-button type="primary"
|
||||
class="download-btn share-button custom-button"
|
||||
class="download-btn share-button"
|
||||
@click.stop="toDownload"
|
||||
v-if="showDownload">
|
||||
<template #icon>
|
||||
@@ -71,12 +71,12 @@
|
||||
@click.stop="clickEntrance">
|
||||
<template #icon>
|
||||
<i class="iconfont icon-fenxiang"
|
||||
style="font-size: 18px; margin-right: 6px"></i>
|
||||
style="font-size: 15px; margin-right: 6px"></i>
|
||||
</template>
|
||||
分享
|
||||
</a-button>
|
||||
<a-button type="primary"
|
||||
class="download-btn share-button custom-button"
|
||||
class="download-btn share-button"
|
||||
@click.stop="toDownload"
|
||||
v-if="showDownload">
|
||||
<template #icon>
|
||||
@@ -380,12 +380,13 @@ onMounted(() => {
|
||||
font-weight: 500;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
.click {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
line-height: 16px;
|
||||
border-radius: 8px;
|
||||
background-color: #70b936;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
.click2 {
|
||||
width: 16px;
|
||||
@@ -412,8 +413,7 @@ onMounted(() => {
|
||||
color: #70b936;
|
||||
}
|
||||
.publish-btn {
|
||||
margin-left: 32px;
|
||||
width: 88px;
|
||||
margin-left: 20px;
|
||||
height: 36px;
|
||||
line-height: 18px;
|
||||
border-radius: 6px;
|
||||
@@ -426,7 +426,7 @@ onMounted(() => {
|
||||
border-radius: 6px;
|
||||
}
|
||||
.share-button {
|
||||
margin-left: 12px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.head-portrait {
|
||||
width: 32px;
|
||||
@@ -569,12 +569,13 @@ onMounted(() => {
|
||||
margin-right: 8px;
|
||||
}
|
||||
.click2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 18px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
border-radius: 9px;
|
||||
background-color: #f5f5f5;
|
||||
text-align: center;
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1057,7 +1057,7 @@ export default defineComponent({
|
||||
top: 70px;
|
||||
right: 24px;
|
||||
margin: 0;
|
||||
z-index: 2;
|
||||
z-index: 999;
|
||||
}
|
||||
.select_info {
|
||||
display: flex;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="menu-bar">
|
||||
<div class="menu-bar" v-click-outside="clickOutside">
|
||||
<div class="menu-bar-item" v-for="(item, i) in menus" :key="i">
|
||||
<div class="menu-bar-no-child">
|
||||
<!-- <img
|
||||
@@ -41,12 +41,14 @@
|
||||
v-for="(child, childIndex) in item.children"
|
||||
:key="childIndex"
|
||||
>
|
||||
<div class="menu-bar-item-parent">
|
||||
<div
|
||||
class="menu-bar-item-main"
|
||||
:style="{
|
||||
background: child.check ? 'rgba(112, 185, 54, 0.1)' : '#ffffff',
|
||||
color: child.check ? '#70b936' : '#000000',
|
||||
height: '51px',
|
||||
height: '32px',
|
||||
margin: '10px 0',
|
||||
borderRadius: '0',
|
||||
}"
|
||||
@click="childCheck(child, i)"
|
||||
@@ -60,6 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -97,7 +100,7 @@ export default {
|
||||
});
|
||||
return first;
|
||||
});
|
||||
const { parentCheck, childCheck } = domHandle(menus, context);
|
||||
const { parentCheck, childCheck, clickOutside } = domHandle(menus, context);
|
||||
watch(
|
||||
() => route.path,
|
||||
() => {
|
||||
@@ -130,7 +133,7 @@ export default {
|
||||
$checkDom.style.height = item.unfold
|
||||
? `${$checkDom.scrollHeight}px`
|
||||
: 0;
|
||||
$checkDom.style.borderRadius = item.unfold || 0
|
||||
$checkDom.style.borderRadius = item.unfold || 0;
|
||||
return;
|
||||
}
|
||||
if (item.check) return;
|
||||
@@ -148,9 +151,22 @@ export default {
|
||||
index.value = i;
|
||||
menusStatusToFalsefather(menus);
|
||||
};
|
||||
const clickOutside = () => {
|
||||
menus.forEach((x) => {
|
||||
if (x.children && x.unfold) {
|
||||
x.unfold = false;
|
||||
const menuChild$ = document.querySelectorAll(".menu-bar-has-child");
|
||||
for (let index = 0; index < menuChild$.length; index++) {
|
||||
const element = menuChild$[index];
|
||||
element.style.height = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
return {
|
||||
parentCheck,
|
||||
childCheck,
|
||||
clickOutside,
|
||||
};
|
||||
}
|
||||
return {
|
||||
@@ -158,6 +174,7 @@ export default {
|
||||
index,
|
||||
parentCheck,
|
||||
childCheck,
|
||||
clickOutside,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -185,14 +202,19 @@ function menusStatusToFalsefather(menus) {
|
||||
.menu-bar {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
height: 48px;
|
||||
font-size: 13px;
|
||||
z-index: 99999;
|
||||
&-item {
|
||||
position: relative;
|
||||
width: 220px;
|
||||
z-index: 99;
|
||||
background: rgba(245, 245, 245, 0.6);
|
||||
&-child {
|
||||
background-color: #ffffff;
|
||||
.menu-bar-item-main-text{
|
||||
width: 68px;
|
||||
}
|
||||
}
|
||||
&-img {
|
||||
width: 10px;
|
||||
@@ -204,7 +226,7 @@ function menusStatusToFalsefather(menus) {
|
||||
}
|
||||
&-main {
|
||||
width: 220px;
|
||||
height: 50px;
|
||||
height: 48px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -215,7 +237,7 @@ function menusStatusToFalsefather(menus) {
|
||||
&-active {
|
||||
color: $yili-default-color;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
&-icon {
|
||||
opacity: 0.9;
|
||||
@@ -275,4 +297,24 @@ function menusStatusToFalsefather(menus) {
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
.menu-bar-item-child {
|
||||
height: 50px;
|
||||
display: block;
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* background: #ffffff; */
|
||||
z-index: 999;
|
||||
}
|
||||
.menu-bar-item-parent {
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: #ffffff;
|
||||
opacity: 1;
|
||||
z-index: 100;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -160,7 +160,6 @@ export default {
|
||||
signaturePad.value.penColor = '#fafafa';
|
||||
signaturePad.value.velocityFilterWeight =
|
||||
signaturePad.value.velocityFilterWeight + 0.1;
|
||||
pressure;
|
||||
} else {
|
||||
signaturePad.value.minWidth = 2;
|
||||
signaturePad.value.maxWidth = 2;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3121635 */
|
||||
src: url('iconfont.woff2?t=1664348711504') format('woff2'),
|
||||
url('iconfont.woff?t=1664348711504') format('woff'),
|
||||
url('iconfont.ttf?t=1664348711504') format('truetype');
|
||||
src: url('iconfont.woff2?t=1665669694860') format('woff2'),
|
||||
url('iconfont.woff?t=1665669694860') format('woff'),
|
||||
url('iconfont.ttf?t=1665669694860') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@@ -13,6 +13,178 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-wanchenghuishouzongliang:before {
|
||||
content: "\e7d0";
|
||||
}
|
||||
|
||||
.icon-jinrihuishouliang:before {
|
||||
content: "\e7d1";
|
||||
}
|
||||
|
||||
.icon-fenxiang1:before {
|
||||
content: "\e7cd";
|
||||
}
|
||||
|
||||
.icon-xiazaizhongxin:before {
|
||||
content: "\e7ce";
|
||||
}
|
||||
|
||||
.icon-tianjiashaixuantiaojian:before {
|
||||
content: "\e7cf";
|
||||
}
|
||||
|
||||
.icon-bianjizhanghumingcheng:before {
|
||||
content: "\e64f";
|
||||
}
|
||||
|
||||
.icon-wanchengdatishuju:before {
|
||||
content: "\e649";
|
||||
}
|
||||
|
||||
.icon-chudahuishoushuai:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
|
||||
.icon-chakanshujuku:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
|
||||
.icon-zhaihongbao:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
|
||||
.icon-wanchengtiaochashuju:before {
|
||||
content: "\e64d";
|
||||
}
|
||||
|
||||
.icon-wendati:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
|
||||
.icon-gerenzhongxin:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.icon-zhanghu:before {
|
||||
content: "\e647";
|
||||
}
|
||||
|
||||
.icon-buxihuan:before {
|
||||
content: "\e7cc";
|
||||
}
|
||||
|
||||
.icon-xihuan:before {
|
||||
content: "\e7cb";
|
||||
}
|
||||
|
||||
.icon-liebiao:before {
|
||||
content: "\e7ca";
|
||||
}
|
||||
|
||||
.icon-fenzu:before {
|
||||
content: "\e7c9";
|
||||
}
|
||||
|
||||
.icon-XMkanban:before {
|
||||
content: "\e7c8";
|
||||
}
|
||||
|
||||
.icon-bianji:before {
|
||||
content: "\e7c5";
|
||||
}
|
||||
|
||||
.icon-fabu2:before {
|
||||
content: "\e7c6";
|
||||
}
|
||||
|
||||
.icon-shuju:before {
|
||||
content: "\e7c7";
|
||||
}
|
||||
|
||||
.icon-Word:before {
|
||||
content: "\e7c2";
|
||||
}
|
||||
|
||||
.icon-Excel:before {
|
||||
content: "\e7c3";
|
||||
}
|
||||
|
||||
.icon-PDF:before {
|
||||
content: "\e7c4";
|
||||
}
|
||||
|
||||
.icon-kapian:before {
|
||||
content: "\e7bf";
|
||||
}
|
||||
|
||||
.icon-wenjuan:before {
|
||||
content: "\e7c0";
|
||||
}
|
||||
|
||||
.icon-chuangzuozhongxin:before {
|
||||
content: "\e7c1";
|
||||
}
|
||||
|
||||
.icon-a-zu141:before {
|
||||
content: "\e7bc";
|
||||
}
|
||||
|
||||
.icon-a-rongqi5:before {
|
||||
content: "\e7bd";
|
||||
}
|
||||
|
||||
.icon-a-zu582:before {
|
||||
content: "\e7be";
|
||||
}
|
||||
|
||||
.icon-wodexiangmu1:before {
|
||||
content: "\e7b7";
|
||||
}
|
||||
|
||||
.icon-gailan1:before {
|
||||
content: "\e7ba";
|
||||
}
|
||||
|
||||
.icon-jiejuefangan1:before {
|
||||
content: "\e7b8";
|
||||
}
|
||||
|
||||
.icon-yangbenku1:before {
|
||||
content: "\e7b9";
|
||||
}
|
||||
|
||||
.icon-dongcha:before {
|
||||
content: "\e7bb";
|
||||
}
|
||||
|
||||
.icon-fuzhi2:before {
|
||||
content: "\e7b4";
|
||||
}
|
||||
|
||||
.icon-tubiao:before {
|
||||
content: "\e7b5";
|
||||
}
|
||||
|
||||
.icon-xiangqing:before {
|
||||
content: "\e7b6";
|
||||
}
|
||||
|
||||
.icon-fafanghongbaozonge:before {
|
||||
content: "\e7b0";
|
||||
}
|
||||
|
||||
.icon-guanjianci:before {
|
||||
content: "\e7b1";
|
||||
}
|
||||
|
||||
.icon-a-jijizhongxingxinxi:before {
|
||||
content: "\e7b2";
|
||||
}
|
||||
|
||||
.icon-xiaojixinxi:before {
|
||||
content: "\e7b3";
|
||||
}
|
||||
|
||||
.icon-yuanshishuju:before {
|
||||
content: "\e7af";
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,307 @@
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "调研猩球前台icon",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "32292800",
|
||||
"name": "完成回收总量",
|
||||
"font_class": "wanchenghuishouzongliang",
|
||||
"unicode": "e7d0",
|
||||
"unicode_decimal": 59344
|
||||
},
|
||||
{
|
||||
"icon_id": "32292801",
|
||||
"name": "今日回收量",
|
||||
"font_class": "jinrihuishouliang",
|
||||
"unicode": "e7d1",
|
||||
"unicode_decimal": 59345
|
||||
},
|
||||
{
|
||||
"icon_id": "32190838",
|
||||
"name": "分享",
|
||||
"font_class": "fenxiang1",
|
||||
"unicode": "e7cd",
|
||||
"unicode_decimal": 59341
|
||||
},
|
||||
{
|
||||
"icon_id": "32190840",
|
||||
"name": "下载中心",
|
||||
"font_class": "xiazaizhongxin",
|
||||
"unicode": "e7ce",
|
||||
"unicode_decimal": 59342
|
||||
},
|
||||
{
|
||||
"icon_id": "32190868",
|
||||
"name": "添加筛选条件",
|
||||
"font_class": "tianjiashaixuantiaojian",
|
||||
"unicode": "e7cf",
|
||||
"unicode_decimal": 59343
|
||||
},
|
||||
{
|
||||
"icon_id": "32207317",
|
||||
"name": "编辑账户名称",
|
||||
"font_class": "bianjizhanghumingcheng",
|
||||
"unicode": "e64f",
|
||||
"unicode_decimal": 58959
|
||||
},
|
||||
{
|
||||
"icon_id": "32182295",
|
||||
"name": "完成答题数据",
|
||||
"font_class": "wanchengdatishuju",
|
||||
"unicode": "e649",
|
||||
"unicode_decimal": 58953
|
||||
},
|
||||
{
|
||||
"icon_id": "32182296",
|
||||
"name": "触达回收率",
|
||||
"font_class": "chudahuishoushuai",
|
||||
"unicode": "e64a",
|
||||
"unicode_decimal": 58954
|
||||
},
|
||||
{
|
||||
"icon_id": "32182297",
|
||||
"name": "查看数据库",
|
||||
"font_class": "chakanshujuku",
|
||||
"unicode": "e64b",
|
||||
"unicode_decimal": 58955
|
||||
},
|
||||
{
|
||||
"icon_id": "32182298",
|
||||
"name": "摘红包",
|
||||
"font_class": "zhaihongbao",
|
||||
"unicode": "e64c",
|
||||
"unicode_decimal": 58956
|
||||
},
|
||||
{
|
||||
"icon_id": "32182299",
|
||||
"name": "完成调查数据",
|
||||
"font_class": "wanchengtiaochashuju",
|
||||
"unicode": "e64d",
|
||||
"unicode_decimal": 58957
|
||||
},
|
||||
{
|
||||
"icon_id": "32182300",
|
||||
"name": "问答题",
|
||||
"font_class": "wendati",
|
||||
"unicode": "e64e",
|
||||
"unicode_decimal": 58958
|
||||
},
|
||||
{
|
||||
"icon_id": "32182217",
|
||||
"name": "个人中心",
|
||||
"font_class": "gerenzhongxin",
|
||||
"unicode": "e646",
|
||||
"unicode_decimal": 58950
|
||||
},
|
||||
{
|
||||
"icon_id": "32182218",
|
||||
"name": "账户",
|
||||
"font_class": "zhanghu",
|
||||
"unicode": "e647",
|
||||
"unicode_decimal": 58951
|
||||
},
|
||||
{
|
||||
"icon_id": "32173884",
|
||||
"name": "不喜欢",
|
||||
"font_class": "buxihuan",
|
||||
"unicode": "e7cc",
|
||||
"unicode_decimal": 59340
|
||||
},
|
||||
{
|
||||
"icon_id": "32173813",
|
||||
"name": "喜欢",
|
||||
"font_class": "xihuan",
|
||||
"unicode": "e7cb",
|
||||
"unicode_decimal": 59339
|
||||
},
|
||||
{
|
||||
"icon_id": "32162768",
|
||||
"name": "列表",
|
||||
"font_class": "liebiao",
|
||||
"unicode": "e7ca",
|
||||
"unicode_decimal": 59338
|
||||
},
|
||||
{
|
||||
"icon_id": "32161269",
|
||||
"name": "分组",
|
||||
"font_class": "fenzu",
|
||||
"unicode": "e7c9",
|
||||
"unicode_decimal": 59337
|
||||
},
|
||||
{
|
||||
"icon_id": "32161174",
|
||||
"name": "XM看板",
|
||||
"font_class": "XMkanban",
|
||||
"unicode": "e7c8",
|
||||
"unicode_decimal": 59336
|
||||
},
|
||||
{
|
||||
"icon_id": "32142320",
|
||||
"name": "编辑",
|
||||
"font_class": "bianji",
|
||||
"unicode": "e7c5",
|
||||
"unicode_decimal": 59333
|
||||
},
|
||||
{
|
||||
"icon_id": "32142321",
|
||||
"name": "发布",
|
||||
"font_class": "fabu2",
|
||||
"unicode": "e7c6",
|
||||
"unicode_decimal": 59334
|
||||
},
|
||||
{
|
||||
"icon_id": "32142323",
|
||||
"name": "数据",
|
||||
"font_class": "shuju",
|
||||
"unicode": "e7c7",
|
||||
"unicode_decimal": 59335
|
||||
},
|
||||
{
|
||||
"icon_id": "32142298",
|
||||
"name": "Word",
|
||||
"font_class": "Word",
|
||||
"unicode": "e7c2",
|
||||
"unicode_decimal": 59330
|
||||
},
|
||||
{
|
||||
"icon_id": "32142299",
|
||||
"name": "Excel",
|
||||
"font_class": "Excel",
|
||||
"unicode": "e7c3",
|
||||
"unicode_decimal": 59331
|
||||
},
|
||||
{
|
||||
"icon_id": "32142300",
|
||||
"name": "PDF",
|
||||
"font_class": "PDF",
|
||||
"unicode": "e7c4",
|
||||
"unicode_decimal": 59332
|
||||
},
|
||||
{
|
||||
"icon_id": "32135082",
|
||||
"name": "卡片",
|
||||
"font_class": "kapian",
|
||||
"unicode": "e7bf",
|
||||
"unicode_decimal": 59327
|
||||
},
|
||||
{
|
||||
"icon_id": "32135095",
|
||||
"name": "问卷",
|
||||
"font_class": "wenjuan",
|
||||
"unicode": "e7c0",
|
||||
"unicode_decimal": 59328
|
||||
},
|
||||
{
|
||||
"icon_id": "32135112",
|
||||
"name": "创作中心",
|
||||
"font_class": "chuangzuozhongxin",
|
||||
"unicode": "e7c1",
|
||||
"unicode_decimal": 59329
|
||||
},
|
||||
{
|
||||
"icon_id": "32126738",
|
||||
"name": "组 141",
|
||||
"font_class": "a-zu141",
|
||||
"unicode": "e7bc",
|
||||
"unicode_decimal": 59324
|
||||
},
|
||||
{
|
||||
"icon_id": "32126740",
|
||||
"name": "容器 5",
|
||||
"font_class": "a-rongqi5",
|
||||
"unicode": "e7bd",
|
||||
"unicode_decimal": 59325
|
||||
},
|
||||
{
|
||||
"icon_id": "32126741",
|
||||
"name": "组 582",
|
||||
"font_class": "a-zu582",
|
||||
"unicode": "e7be",
|
||||
"unicode_decimal": 59326
|
||||
},
|
||||
{
|
||||
"icon_id": "32101908",
|
||||
"name": "我的项目",
|
||||
"font_class": "wodexiangmu1",
|
||||
"unicode": "e7b7",
|
||||
"unicode_decimal": 59319
|
||||
},
|
||||
{
|
||||
"icon_id": "32101909",
|
||||
"name": "概览",
|
||||
"font_class": "gailan1",
|
||||
"unicode": "e7ba",
|
||||
"unicode_decimal": 59322
|
||||
},
|
||||
{
|
||||
"icon_id": "32100794",
|
||||
"name": "解决方案",
|
||||
"font_class": "jiejuefangan1",
|
||||
"unicode": "e7b8",
|
||||
"unicode_decimal": 59320
|
||||
},
|
||||
{
|
||||
"icon_id": "32100795",
|
||||
"name": "样本库",
|
||||
"font_class": "yangbenku1",
|
||||
"unicode": "e7b9",
|
||||
"unicode_decimal": 59321
|
||||
},
|
||||
{
|
||||
"icon_id": "32100821",
|
||||
"name": "洞察",
|
||||
"font_class": "dongcha",
|
||||
"unicode": "e7bb",
|
||||
"unicode_decimal": 59323
|
||||
},
|
||||
{
|
||||
"icon_id": "32100549",
|
||||
"name": "复制",
|
||||
"font_class": "fuzhi2",
|
||||
"unicode": "e7b4",
|
||||
"unicode_decimal": 59316
|
||||
},
|
||||
{
|
||||
"icon_id": "32100550",
|
||||
"name": "图表",
|
||||
"font_class": "tubiao",
|
||||
"unicode": "e7b5",
|
||||
"unicode_decimal": 59317
|
||||
},
|
||||
{
|
||||
"icon_id": "32100556",
|
||||
"name": "详情",
|
||||
"font_class": "xiangqing",
|
||||
"unicode": "e7b6",
|
||||
"unicode_decimal": 59318
|
||||
},
|
||||
{
|
||||
"icon_id": "32100398",
|
||||
"name": "发放红包总额",
|
||||
"font_class": "fafanghongbaozonge",
|
||||
"unicode": "e7b0",
|
||||
"unicode_decimal": 59312
|
||||
},
|
||||
{
|
||||
"icon_id": "32100399",
|
||||
"name": "关键词",
|
||||
"font_class": "guanjianci",
|
||||
"unicode": "e7b1",
|
||||
"unicode_decimal": 59313
|
||||
},
|
||||
{
|
||||
"icon_id": "32100400",
|
||||
"name": "积极&中性信息",
|
||||
"font_class": "a-jijizhongxingxinxi",
|
||||
"unicode": "e7b2",
|
||||
"unicode_decimal": 59314
|
||||
},
|
||||
{
|
||||
"icon_id": "32100401",
|
||||
"name": "消极信息",
|
||||
"font_class": "xiaojixinxi",
|
||||
"unicode": "e7b3",
|
||||
"unicode_decimal": 59315
|
||||
},
|
||||
{
|
||||
"icon_id": "32086268",
|
||||
"name": "原始数据",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,25 +7,28 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 下载中心 -->
|
||||
<DownloadCenter :isView="true" v-model:visible="downloadVisible" v-if="downloadVisible" @getCloseDown="getCloseDown"></DownloadCenter>
|
||||
<DownloadCenter
|
||||
:isView="true"
|
||||
v-model:visible="downloadVisible"
|
||||
v-if="downloadVisible"
|
||||
@getCloseDown="getCloseDown"
|
||||
></DownloadCenter>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, h, computed } from 'vue'
|
||||
import { useStore } from 'vuex';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { ref, watch, h, computed } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { Modal } from "ant-design-vue";
|
||||
import AnswerApi from "@/views/Answer/api";
|
||||
import { downloadFile } from "@/views/DataAnalyse/composables/downloadFile";
|
||||
import { getSurveyInfo } from "@/api/publish";
|
||||
import { addDownloadCenter } from "@/api/download.js";
|
||||
import DownloadCenter from "@/views/DownloadCenter/index.vue"
|
||||
import DownloadCenter from "@/views/DownloadCenter/index.vue";
|
||||
|
||||
const emit = defineEmits(['success', 'failed'])
|
||||
const emit = defineEmits(["success", "failed"]);
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
@@ -33,16 +36,16 @@ const props = defineProps({
|
||||
},
|
||||
sn: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: "",
|
||||
},
|
||||
type: {
|
||||
type: [String, Number],
|
||||
default: undefined
|
||||
}
|
||||
default: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
const route = useRoute()
|
||||
const store = useStore()
|
||||
const route = useRoute();
|
||||
const store = useStore();
|
||||
const shown = ref(false);
|
||||
|
||||
const showModal = async () => {
|
||||
@@ -51,25 +54,33 @@ const showModal = async () => {
|
||||
const router = useRouter();
|
||||
const downloadVisible = ref(false);
|
||||
const download = async () => {
|
||||
const arr = []
|
||||
const keys = {}
|
||||
const selectedList = checkedList.value.map(name =>keys[name] = 1)
|
||||
arr.push(...selectedList)
|
||||
const arr = [];
|
||||
const keys = {};
|
||||
const selectedList = checkedList.value.map((name) => (keys[name] = 1));
|
||||
arr.push(...selectedList);
|
||||
// arr.push(['type', props.type])
|
||||
arr.push(['download_type', '5'])
|
||||
arr.push(["download_type", "5"]);
|
||||
// const params = new URLSearchParams(arr)
|
||||
const params = {download_type: '5',...keys}
|
||||
// const params = {download_type: '5',...keys}
|
||||
const params = {
|
||||
download_type: "5",
|
||||
is_title: keys.is_title || 0,
|
||||
is_in: keys.is_in || 0,
|
||||
is_number: keys.is_number || 0,
|
||||
is_if: keys.is_if || 0,
|
||||
is_logic: keys.is_logic || 0,
|
||||
};
|
||||
// 下载中心
|
||||
addDownloadCenter(props.sn,params).then(res=>{
|
||||
store.dispatch('downloadCenter/changeCenterUrl',route.path)
|
||||
downloadVisible.value = true
|
||||
addDownloadCenter(props.sn, params).then((res) => {
|
||||
store.dispatch("downloadCenter/changeCenterUrl", route.path);
|
||||
downloadVisible.value = true;
|
||||
// store.dispatch('downloadCenter/changeCenterShow',true)
|
||||
shown.value = false;
|
||||
// router.push({
|
||||
// path: "/downloadCenter",
|
||||
// query: { path:'planet',sn:props.sn },
|
||||
// });
|
||||
})
|
||||
});
|
||||
// const pendingModal = Modal.info({
|
||||
// title: () => '导出任务进行中',
|
||||
// okText: '取消',
|
||||
@@ -110,28 +121,28 @@ const download = async () => {
|
||||
// errorModal.destroy()
|
||||
// })
|
||||
// })
|
||||
}
|
||||
};
|
||||
const handleOk = () => {
|
||||
download()
|
||||
download();
|
||||
};
|
||||
|
||||
const checkedList = ref(['is_title', 'is_in', 'is_number', 'is_if', 'is_logic'])
|
||||
const checkedList = ref(["is_title", "is_in", "is_number", "is_if", "is_logic"]);
|
||||
const options = ref([
|
||||
{ label: '标题', value: 'is_title' },
|
||||
{ label: '介绍语', value: 'is_in' },
|
||||
{ label: '题号', value: 'is_number' },
|
||||
{ label: '限定条件', value: 'is_if' },
|
||||
{ label: '逻辑', value: 'is_logic' },
|
||||
])
|
||||
{ label: "标题", value: "is_title" },
|
||||
{ label: "介绍语", value: "is_in" },
|
||||
{ label: "题号", value: "is_number" },
|
||||
{ label: "限定条件", value: "is_if" },
|
||||
{ label: "逻辑", value: "is_logic" },
|
||||
]);
|
||||
const getCloseDown = () => {
|
||||
downloadVisible.value = false
|
||||
}
|
||||
downloadVisible.value = false;
|
||||
};
|
||||
watch(
|
||||
() => props.visible,
|
||||
(val) => {
|
||||
shown.value = val;
|
||||
if (val === true) {
|
||||
checkedList.value = ['is_title', 'is_in', 'is_number', 'is_if', 'is_logic']
|
||||
checkedList.value = ["is_title", "is_in", "is_number", "is_if", "is_logic"];
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -142,7 +153,6 @@ watch(
|
||||
watch(shown, (val) => {
|
||||
emit("update:visible", val);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="question" v-for="question in questionsData.questions" :key="question.id">
|
||||
<div class="question-title">
|
||||
<div class="title-left">
|
||||
<div class="title">{{ question.title }}</div>
|
||||
<!-- <div class="title">{{ question.title }}</div> -->
|
||||
<div class="stem" v-html="question.stem" />
|
||||
</div>
|
||||
<Remark
|
||||
@@ -99,7 +99,9 @@
|
||||
<!-- 签名题 -->
|
||||
<div v-else-if="question.question_type === 22"></div>
|
||||
<!-- 知情同意书 -->
|
||||
<div v-else-if="question.question_type === 23"></div>
|
||||
<div v-else-if="question.question_type === 23">
|
||||
<div v-html="question.row?.[0]" />
|
||||
</div>
|
||||
<!-- 热区题 -->
|
||||
<div v-else-if="question.question_type === 25 || question.question_type === 26">
|
||||
<div class="heat" v-html="question.row?.[0]" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="action-part">
|
||||
<div class="image-upload"></div>
|
||||
<div class="btn-wrapper">
|
||||
<Button type="link" size="small" style="color: #8C8C8C" @click="handleCancel">取消</Button>
|
||||
<Button type="link" size="small" style="color: #8c8c8c" @click="handleCancel">取消</Button>
|
||||
<Divider type="vertical" />
|
||||
<Button type="link" size="small" @click="handleCommit">发送</Button>
|
||||
</div>
|
||||
@@ -12,56 +12,66 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { defineComponent, ref, computed } from "vue";
|
||||
import { defineComponent, ref, computed, watch } from "vue";
|
||||
import { Textarea, Button, Divider } from "ant-design-vue";
|
||||
|
||||
export default defineComponent({
|
||||
props: ['content'],
|
||||
emits: ['update:content', 'cancel:content'],
|
||||
props: ["content"],
|
||||
emits: ["update:content", "cancel:content"],
|
||||
components: { Textarea, Button, Divider },
|
||||
setup(props, { emit }) {
|
||||
const loading = ref(false);
|
||||
const text = computed({
|
||||
get() {
|
||||
return props.content
|
||||
return props.content;
|
||||
},
|
||||
set(newValue) {
|
||||
emit('update:content', newValue)
|
||||
emit("update:content", newValue);
|
||||
},
|
||||
});
|
||||
|
||||
// 监听答案
|
||||
watch(text, (newVal) => {
|
||||
if (!newVal && loading.value) {
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
* 清空内容
|
||||
*/
|
||||
function handleCancel() {
|
||||
text.value = ''
|
||||
emit('cancel:content')
|
||||
text.value = "";
|
||||
emit("cancel:content");
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交内容
|
||||
*/
|
||||
function handleCommit() {
|
||||
emit('commit:message', text.value)
|
||||
if (loading.value) return;
|
||||
if (text.value) loading.value = true;
|
||||
emit("commit:message", text.value);
|
||||
}
|
||||
|
||||
return {
|
||||
text,
|
||||
loading,
|
||||
handleCancel,
|
||||
handleCommit,
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.comment-textarea {
|
||||
height: auto;
|
||||
border-right: 6px;
|
||||
background: #F6F6F6;
|
||||
background: #f6f6f6;
|
||||
:deep(.ant-input) {
|
||||
background: #F6F6F6;
|
||||
background: #f6f6f6;
|
||||
border: none;
|
||||
outline: none;
|
||||
&:focus {
|
||||
@@ -77,5 +87,4 @@ export default defineComponent({
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
<slider-num-rate
|
||||
rateType="slider"
|
||||
:param="{
|
||||
interval: config.score_interval,
|
||||
max: config.max,
|
||||
min: config.min,
|
||||
interval: config.score_interval*1,
|
||||
max: config.max*1,
|
||||
min: config.min*1,
|
||||
}"
|
||||
:value="value"
|
||||
:disabled="disabled"
|
||||
@@ -93,7 +93,7 @@ export default defineComponent({
|
||||
setup(props, context) {
|
||||
// 打分回调
|
||||
function changeValue(value) {
|
||||
if(props.disabled)return
|
||||
if (props.disabled) return;
|
||||
context.emit("update:value", value);
|
||||
context.emit("change", value);
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
</div>
|
||||
<div class="option">
|
||||
<span v-if="config.location === 1" class="label left answer-color">{{
|
||||
config.show_label
|
||||
config.show_label || "总和"
|
||||
}}</span>
|
||||
<a-input-number type="number" :value="sum" disabled />
|
||||
<span v-if="config.location === 0" class="label right answer-color">{{
|
||||
config.show_label
|
||||
config.show_label || "总和"
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -464,11 +464,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
.footer {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
padding: 20px 0;
|
||||
margin-top: 48px;
|
||||
|
||||
:deep(.previous) {
|
||||
border: 1px solid $yili-default-color;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<!-- 标题 -->
|
||||
<div class="q-title">
|
||||
<div class="left">
|
||||
<div class="">
|
||||
<div v-html="title" class="answer-color"></div>
|
||||
<!-- 问题提示 -->
|
||||
<a-tooltip v-if="config.is_placeholder">
|
||||
@@ -69,8 +69,8 @@
|
||||
<a-radio value="b" />
|
||||
</div>
|
||||
<div class="td option scrollbar">
|
||||
<img v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<div v-else v-html="option.option" />
|
||||
<a-image v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<rich-text v-else :nodes="option.option" isPreview />
|
||||
</div>
|
||||
<div class="td">
|
||||
<a-radio value="w" />
|
||||
@@ -85,8 +85,8 @@
|
||||
<a-radio value="w" />
|
||||
</div>
|
||||
<div class="td option scrollbar">
|
||||
<img v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<div v-else v-html="option.option" />
|
||||
<a-image v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<rich-text v-else :nodes="option.option" isPreview />
|
||||
</div>
|
||||
<div class="td">
|
||||
<a-radio value="b" />
|
||||
@@ -104,8 +104,8 @@
|
||||
<a-radio value="w" />
|
||||
</div>
|
||||
<div class="td option scrollbar">
|
||||
<img v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<div v-else v-html="option.option" />
|
||||
<a-image v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<rich-text v-else :nodes="option.option" isPreview />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -120,8 +120,8 @@
|
||||
<a-radio value="b" />
|
||||
</div>
|
||||
<div class="td option scrollbar">
|
||||
<img v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<div v-else v-html="option.option" />
|
||||
<a-image v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<rich-text v-else :nodes="option.option" isPreview />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -130,8 +130,8 @@
|
||||
:class="index % 2 === 0 ? '' : 'bg-gray answer-background10'"
|
||||
>
|
||||
<div class="td option scrollbar">
|
||||
<img v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<div v-else v-html="option.option" />
|
||||
<a-image v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<rich-text v-else :nodes="option.option" isPreview />
|
||||
</div>
|
||||
<div class="td">
|
||||
<a-radio value="b" />
|
||||
@@ -146,8 +146,8 @@
|
||||
:class="index % 2 === 0 ? '' : 'bg-gray answer-background10'"
|
||||
>
|
||||
<div class="td option scrollbar">
|
||||
<img v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<div v-else v-html="option.option" />
|
||||
<a-image v-if="option.option_config.option_type === 2" :src="option.option" />
|
||||
<rich-text v-else :nodes="option.option" isPreview />
|
||||
</div>
|
||||
<div class="td">
|
||||
<a-radio value="w" />
|
||||
@@ -192,9 +192,10 @@ import PfePagination from "@/components/PfePagination.vue";
|
||||
import { defineComponent, ref, watch } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import Remark from "@/views/Answer/components/Remark";
|
||||
import RichText from '@/components/RichText.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: { PfePagination, Remark },
|
||||
components: { PfePagination, Remark, RichText },
|
||||
props: {
|
||||
// 错误
|
||||
error: {
|
||||
@@ -328,10 +329,10 @@ export default defineComponent({
|
||||
// 当前页答案
|
||||
const currentOptions = allOptions.value[page.value - 1];
|
||||
if (currentOptions.findIndex((option) => option.value === "b") === -1) {
|
||||
return message.error("请选择高相关");
|
||||
return message.error(`请选择${props.config.first_text}`);
|
||||
}
|
||||
if (currentOptions.findIndex((option) => option.value === "w") === -1) {
|
||||
return message.error("请选择不相关");
|
||||
return message.error(`请选择${props.config.second_text}`);
|
||||
}
|
||||
// 最后一页
|
||||
if (page.value === pages.value) {
|
||||
@@ -366,7 +367,8 @@ export default defineComponent({
|
||||
() => props.answer,
|
||||
() => {
|
||||
context.emit("changeAnswer", {
|
||||
options: allOptions.value,
|
||||
options: options.value,
|
||||
mxdOptions: allOptions.value,
|
||||
});
|
||||
},
|
||||
{
|
||||
@@ -399,13 +401,8 @@ export default defineComponent({
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
width: 100%;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #70b936;
|
||||
color: #3461ff;
|
||||
cursor: pointer;
|
||||
margin-left: 12px;
|
||||
}
|
||||
@@ -431,15 +428,20 @@ export default defineComponent({
|
||||
|
||||
.td {
|
||||
width: 106px;
|
||||
padding: 12px 0;
|
||||
text-align: center;
|
||||
padding: 12px 10px;
|
||||
// text-align: center;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.option {
|
||||
flex: 1;
|
||||
display: block;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
:deep(img) {
|
||||
width: 87px;
|
||||
// height: 119px;
|
||||
}
|
||||
@@ -456,11 +458,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
.footer {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
padding: 20px 0;
|
||||
margin-top: 48px;
|
||||
|
||||
:deep(.previous) {
|
||||
border: 1px solid $yili-default-color;
|
||||
|
||||
@@ -33456,6 +33456,199 @@
|
||||
"is_other": 0,
|
||||
"parent_option_index": 0,
|
||||
"level": 0,
|
||||
"children": [
|
||||
{
|
||||
"option": "台湾省",
|
||||
"option_index": "3658",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3629,
|
||||
"level": 1,
|
||||
"children": [
|
||||
{
|
||||
"option": "台北市",
|
||||
"option_index": "3659",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "1_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "高雄市",
|
||||
"option_index": "3660",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "2_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "台南市",
|
||||
"option_index": "3661",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "3_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "台中市",
|
||||
"option_index": "3662",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "4_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "南投县",
|
||||
"option_index": "3663",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "5_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "基隆市",
|
||||
"option_index": "3664",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "6_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "新竹市",
|
||||
"option_index": "3665",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "7_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "嘉义市",
|
||||
"option_index": "3666",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "8_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "新北市",
|
||||
"option_index": "3667",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "9_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "宜兰县",
|
||||
"option_index": "3668",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "10_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "新竹县",
|
||||
"option_index": "3669",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "11_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "桃园市",
|
||||
"option_index": "3670",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "12_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "苗栗县",
|
||||
"option_index": "3671",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "13_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "彰化县",
|
||||
"option_index": "3672",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "14_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "嘉义县",
|
||||
"option_index": "3673",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "15_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "云林县",
|
||||
"option_index": "3674",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "16_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "屏东县",
|
||||
"option_index": "3675",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "17_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "台东县",
|
||||
"option_index": "3676",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "18_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "花莲县",
|
||||
"option_index": "3677",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "19_3_3658"
|
||||
},
|
||||
{
|
||||
"option": "澎湖县",
|
||||
"option_index": "3678",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3658,
|
||||
"level": 2,
|
||||
"option_key": "20_3_3658"
|
||||
}
|
||||
],
|
||||
"option_key": "1_2_3629"
|
||||
}
|
||||
],
|
||||
"option_key": "32_1_0"
|
||||
},
|
||||
{
|
||||
@@ -33467,166 +33660,177 @@
|
||||
"level": 0,
|
||||
"children": [
|
||||
{
|
||||
"option": "中西区",
|
||||
"option_index": "3631",
|
||||
"option": "香港特别行政区",
|
||||
"option_index": "3679",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "1_2_3630"
|
||||
"children": [
|
||||
{
|
||||
"option": "中西区",
|
||||
"option_index": "3631",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "1_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "湾仔区",
|
||||
"option_index": "3632",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "2_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "2_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "东区",
|
||||
"option_index": "3633",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "3_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "3_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "南区",
|
||||
"option_index": "3634",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "4_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "4_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "油尖旺区",
|
||||
"option_index": "3635",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "5_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "5_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "深水埗区",
|
||||
"option_index": "3636",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "6_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "6_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "九龙城区",
|
||||
"option_index": "3637",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "7_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "7_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "黄大仙区",
|
||||
"option_index": "3638",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "8_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "8_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "观塘区",
|
||||
"option_index": "3639",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "9_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "9_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "荃湾区",
|
||||
"option_index": "3640",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "10_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "10_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "屯门区",
|
||||
"option_index": "3641",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "11_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "11_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "元朗区",
|
||||
"option_index": "3642",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "12_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "12_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "北区",
|
||||
"option_index": "3643",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "13_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "13_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "大埔区",
|
||||
"option_index": "3644",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "14_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "14_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "西贡区",
|
||||
"option_index": "3645",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "15_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "15_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "沙田区",
|
||||
"option_index": "3646",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "16_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "16_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "葵青区",
|
||||
"option_index": "3647",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "17_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "17_3_3679"
|
||||
},
|
||||
{
|
||||
"option": "离岛区",
|
||||
"option_index": "3648",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3630,
|
||||
"level": 1,
|
||||
"option_key": "18_2_3630"
|
||||
"parent_option_index": 3679,
|
||||
"level": 2,
|
||||
"option_key": "18_3_3679"
|
||||
}
|
||||
],
|
||||
"option_key": "1_2_3630"
|
||||
}
|
||||
],
|
||||
"option_key": "33_1_0"
|
||||
@@ -33640,76 +33844,87 @@
|
||||
"level": 0,
|
||||
"children": [
|
||||
{
|
||||
"option": "花地玛堂区",
|
||||
"option_index": "3650",
|
||||
"option": "澳门特别行政区",
|
||||
"option_index": "3680",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "1_2_3649"
|
||||
"children": [
|
||||
{
|
||||
"option": "花地玛堂区",
|
||||
"option_index": "3650",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "1_3_3680"
|
||||
},
|
||||
{
|
||||
"option": "花王堂区",
|
||||
"option_index": "3651",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "2_2_3649"
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "2_3_3680"
|
||||
},
|
||||
{
|
||||
"option": "望德堂区",
|
||||
"option_index": "3652",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "3_2_3649"
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "3_3_3680"
|
||||
},
|
||||
{
|
||||
"option": "大堂区",
|
||||
"option_index": "3653",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "4_2_3649"
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "4_3_3680"
|
||||
},
|
||||
{
|
||||
"option": "风顺堂区",
|
||||
"option_index": "3654",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "5_2_3649"
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "5_3_3680"
|
||||
},
|
||||
{
|
||||
"option": "嘉模堂区",
|
||||
"option_index": "3655",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "6_2_3649"
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "6_3_3680"
|
||||
},
|
||||
{
|
||||
"option": "路凼填海区",
|
||||
"option_index": "3656",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "7_2_3649"
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "7_3_3680"
|
||||
},
|
||||
{
|
||||
"option": "圣方济各堂区",
|
||||
"option_index": "3657",
|
||||
"is_remove_other": 0,
|
||||
"is_other": 0,
|
||||
"parent_option_index": 3649,
|
||||
"level": 1,
|
||||
"option_key": "8_2_3649"
|
||||
"parent_option_index": 3680,
|
||||
"level": 2,
|
||||
"option_key": "8_3_3680"
|
||||
}
|
||||
],
|
||||
"option_key": "1_2_3649"
|
||||
}
|
||||
],
|
||||
"option_key": "34_1_0"
|
||||
|
||||
@@ -27,7 +27,7 @@ export default defineComponent({
|
||||
<style lang="scss" scoped>
|
||||
.sub-title {
|
||||
position: relative;
|
||||
padding-left: 8px;
|
||||
padding-left: 12px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
font-size: 16px;
|
||||
@@ -38,7 +38,7 @@ export default defineComponent({
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
top: 50%;
|
||||
top: 42%;
|
||||
display: block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
:mode="item.answerType=='select'?'multiple':'combobox'"
|
||||
:maxTagCount="maxTagCount"
|
||||
:maxTagTextLength="8"
|
||||
optionFilterProp="label"
|
||||
class="lineSelect custom-select"
|
||||
v-model:value="item.asVal"
|
||||
:options="item.answer"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ export default function useGeneratorTableColumns(columns, options = {}) {
|
||||
...value,
|
||||
key,
|
||||
dataIndex: key,
|
||||
width: includeSpecialType(value.question_type) ? 300 : 200,
|
||||
width: key === options.left_fixed_key? 100: includeSpecialType(value.question_type) ? 300 : 200,
|
||||
fixed: key === options.left_fixed_key ? 'left': null,
|
||||
align: 'center',
|
||||
slots: {customRender: key },
|
||||
@@ -39,7 +39,7 @@ export default function useGeneratorTableColumns(columns, options = {}) {
|
||||
title: '操作',
|
||||
key: 'operation',
|
||||
dataIndex: 'operation',
|
||||
width: 200,
|
||||
width: 130,
|
||||
slots: {customRender: "operation" },
|
||||
fixed: 'right',
|
||||
})
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<template #content>
|
||||
<div v-html="label"></div>
|
||||
</template>
|
||||
<div v-html="label"></div>
|
||||
<div class="drag-item" v-html="label"></div>
|
||||
</a-popover>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,14 +21,14 @@
|
||||
</div>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item>
|
||||
<a href="javascript:" @click="exportData">导出当前图表数据</a>
|
||||
<a-menu-item @click="exportData">
|
||||
<a href="javascript:">导出当前图表数据</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a href="javascript:" @click="downloadImg" v-if="hasChart">导出图片</a>
|
||||
<a-menu-item @click="downloadImg" v-if="hasChart">
|
||||
<a href="javascript:">导出图片</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a href="javascript:" @click="removeChart">删除图表</a>
|
||||
<a-menu-item @click="removeChart">
|
||||
<a href="javascript:">删除图表</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
@@ -131,6 +131,11 @@ export default defineComponent({
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
color: #70b936;
|
||||
.drag-item {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
.action {
|
||||
|
||||
@@ -99,7 +99,6 @@ const props = defineProps({
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
|
||||
const isValid = computed(() => props.data.count > 0);
|
||||
const questionIndex = computed(() => props.data.question_index);
|
||||
const chartTypeOptions = ref([]);
|
||||
|
||||
@@ -104,7 +104,7 @@ export default defineComponent({
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, provide} from 'vue'
|
||||
import { ref, computed, provide, nextTick } from 'vue'
|
||||
import { useStore } from "vuex";
|
||||
|
||||
import { getDiagramAnalysis } from "@/api/data-analyse";
|
||||
import Header from '@/views/DataAnalyse/diagram/components/Layouts/Header'
|
||||
import Main from '@/views/DataAnalyse/diagram/components/Layouts/Main'
|
||||
import Footer from '@/views/DataAnalyse/diagram/components/Layouts/Footer'
|
||||
@@ -116,7 +116,14 @@ function getDateName() {
|
||||
const surveyName = computed(() => {
|
||||
return store.state.common.surveyName;
|
||||
});
|
||||
var tabledata = ref(null)
|
||||
function exportData () {
|
||||
let params = {
|
||||
...searchParams.value,
|
||||
question_index: props.data.question_index,
|
||||
type: 1
|
||||
};
|
||||
getDiagramAnalysis(props.sn, params).then((res) => {
|
||||
let date = Date.now();
|
||||
date = date -= date % (60 * 1000);
|
||||
let imageUrl = ''
|
||||
@@ -126,13 +133,39 @@ function exportData() {
|
||||
// 图片单选 多选 文件上传 不显示table数据
|
||||
let isSpecial
|
||||
if (!is_quick.value) {
|
||||
if([13, 14, 18].includes(props.data.question_type)) {
|
||||
isSpecial = true
|
||||
if ([13, 14].includes(props.data.question_type)) {
|
||||
isSpecial = false
|
||||
res.data[0].option.map(item => {
|
||||
if (item.title.indexOf('<img') > -1) {
|
||||
item.title = item.title.slice(0, item.title.length - 2) + `width="100" ` + item.title.slice(item.title.length - 2);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
if ([18].includes(props.data.question_type)) {
|
||||
res.data[0].option.map((el) => {
|
||||
if (el.title.indexOf('img') != -1) {
|
||||
el.title = el.title.slice(5)
|
||||
} else {
|
||||
el.title = el.title.substring(0, el.title.lastIndexOf('.'))
|
||||
}
|
||||
delete el.data
|
||||
delete el.answer
|
||||
return res.data[0].option
|
||||
})
|
||||
}
|
||||
const colums = isSpecial ? [] : res.data[0].head
|
||||
const data = isSpecial ? [] : res.data[0].option
|
||||
if ([5, 9, 11, 26, 15, 16, 10, 17].includes(props.data.question_type)) {
|
||||
if (data[0].option) {
|
||||
colums[0].key = 'option_title'
|
||||
data.map((item, index) => {
|
||||
item.option.map((e, i) => {
|
||||
item[e.index] = e.number
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const colums = isSpecial ? [] :tableInstance.value.columns
|
||||
const data = isSpecial ? [] : tableInstance.value.data
|
||||
const html = generatorTable(imageUrl, colums, data, props.data);
|
||||
const title = `${props.data.title}_数据详情表_${getDateName()}`;
|
||||
exportChart(props.sn, {
|
||||
@@ -145,6 +178,7 @@ function exportData() {
|
||||
fileName: title
|
||||
}
|
||||
store.dispatch('common/fileDown', subdata)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -161,6 +195,7 @@ function fullScreen() {
|
||||
position: relative;
|
||||
height: 640px;
|
||||
padding: 24px 32px 24px 32px;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export default function (imgUrl, columns, data, propsData) {
|
||||
console.log('imgUrl, columns, data, propsData','---',imgUrl,'---', columns,'---', data,'---', propsData);
|
||||
|
||||
const str = []
|
||||
|
||||
@@ -17,7 +18,12 @@ export default function (imgUrl, columns, data, propsData) {
|
||||
data = data.map(item => {
|
||||
const arr = []
|
||||
header.forEach(head => {
|
||||
const value = item[head]
|
||||
let value
|
||||
if(item.value){
|
||||
value = item.value[head]
|
||||
}else{
|
||||
value = item[head]
|
||||
}
|
||||
arr.push(value)
|
||||
})
|
||||
return arr
|
||||
@@ -34,6 +40,7 @@ export default function (imgUrl, columns, data, propsData) {
|
||||
const thead = columns.map(item => `<th>${item.title}</th>`).join('')
|
||||
str.push(thead)
|
||||
str.push('</tr>')
|
||||
console.log('data',data);
|
||||
data.forEach(row => {
|
||||
let tbody = ['<tr>']
|
||||
for (let k of row) {
|
||||
|
||||
@@ -129,7 +129,7 @@ watch(firstValue, (key) => {
|
||||
if (key) {
|
||||
const target = deepData.value.find((item) => item.option_index === key);
|
||||
secondData.value = target.children ? target.children : [];
|
||||
if (target.children && target.children.length > 0 && !step.value.includes("second")) {
|
||||
if (target.children && target.children.length > 0 && !step.value.includes("second") && step.value.length < props.max) {
|
||||
step.value.push("second");
|
||||
}
|
||||
thirdData.value = [];
|
||||
|
||||
@@ -103,7 +103,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<div style="height: 32px">
|
||||
<CascaderSelect
|
||||
:data="university"
|
||||
:max="2"
|
||||
@onOptionIndexChange="getData"
|
||||
></CascaderSelect>
|
||||
</div>
|
||||
@@ -105,7 +106,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -116,7 +117,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label);
|
||||
const config = useChartOption(data, type, data_label, null, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<div style="height: 32px">
|
||||
<CascaderSelect
|
||||
:data="major"
|
||||
:max="1"
|
||||
@onOptionIndexChange="getData"
|
||||
></CascaderSelect>
|
||||
</div>
|
||||
@@ -97,7 +98,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label);
|
||||
const config = useChartOption(data, type, data_label, null, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label);
|
||||
const config = useChartOption(data, type, data_label, null, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div style="height: 32px">
|
||||
<CascaderSelect
|
||||
:data="cityes"
|
||||
:max="2"
|
||||
:max="1"
|
||||
@onOptionIndexChange="getData"
|
||||
></CascaderSelect>
|
||||
</div>
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<script setup>
|
||||
import { getSingleDiagramInfo } from "@api/data-analyse";
|
||||
import { defineComponent, ref, watch, inject } from "vue";
|
||||
import { defineComponent, ref, watch, inject, computed } from "vue";
|
||||
import pieChart from "@/components/chart/PieChart";
|
||||
import ChartAction from "@/views/DataAnalyse/diagram/components/ChartAction";
|
||||
import CascaderSelect from "./CascaderSelect.vue";
|
||||
@@ -96,7 +96,6 @@ const other =
|
||||
// value: 4
|
||||
// },
|
||||
}
|
||||
|
||||
function renderChart(source) {
|
||||
let data = source;
|
||||
let data_label = chart_params.value.data_label;
|
||||
@@ -106,7 +105,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label,other );
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max );
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -117,7 +116,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div style="height: 32px">
|
||||
<CascaderSelect
|
||||
:data="cityes"
|
||||
:max="3"
|
||||
:max="2"
|
||||
@onOptionIndexChange="getData"
|
||||
></CascaderSelect>
|
||||
</div>
|
||||
@@ -84,7 +84,6 @@ function getData(optionIndex) {
|
||||
tableSource.value = data.option;
|
||||
tableInstance.value.data = data.option
|
||||
source.value = data.option
|
||||
|
||||
renderChart(data.option);
|
||||
});
|
||||
}
|
||||
@@ -106,7 +105,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label,other );
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -117,7 +116,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { cloneDeep } from "lodash";
|
||||
export default function useChartOption(source, type, enableLabel = true, other = null) {
|
||||
export default function useChartOption(source, type, enableLabel = true, other = null, max) {
|
||||
let defaultOption = {
|
||||
legend: {
|
||||
type: "scroll",
|
||||
@@ -157,7 +157,7 @@ export default function useChartOption(source, type, enableLabel = true, other =
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
show: enableLabel ? true : false, //开启显示
|
||||
position: "top", //在上方显示
|
||||
},
|
||||
},
|
||||
@@ -194,6 +194,7 @@ export default function useChartOption(source, type, enableLabel = true, other =
|
||||
show: true,
|
||||
minValueSpan: 5,
|
||||
maxValueSpan: 8,
|
||||
width: 10,
|
||||
handleSize: 4,
|
||||
filterMode: 'filter',
|
||||
backgroundColor: '#fff',
|
||||
@@ -226,7 +227,7 @@ export default function useChartOption(source, type, enableLabel = true, other =
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
show: enableLabel ? true : false, //开启显示
|
||||
position: "right", //在上方显示
|
||||
},
|
||||
},
|
||||
@@ -265,7 +266,10 @@ export default function useChartOption(source, type, enableLabel = true, other =
|
||||
encode: {
|
||||
x: 'title',
|
||||
y: 'number'
|
||||
}
|
||||
},
|
||||
label: {
|
||||
show: enableLabel ? true : false,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -274,11 +278,11 @@ export default function useChartOption(source, type, enableLabel = true, other =
|
||||
const indicator = legendData.map(name => {
|
||||
return {
|
||||
name,
|
||||
max: 12
|
||||
max
|
||||
}
|
||||
})
|
||||
const seriesData = sourceData.map(item =>item.number)
|
||||
const tooltipText = sourceData.map(item =>item.title + ': ' + '\xa0' + item.number + '<br />')
|
||||
const tooltipText = sourceData.map(item =>item.title + ': ' + '\xa0' + item.number + '\xa0' + '(' + item.rate + ')' + '<br />')
|
||||
defaultOption = {
|
||||
// legend: {
|
||||
// data: legendData
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
v-infinite-scroll="load"
|
||||
:infinite-scroll-disabled="disabled"
|
||||
:infinite-scroll-distance="100"
|
||||
:style="{height:diagramList.length > 0?'':'100%'}"
|
||||
>
|
||||
<div class="search-wrapper">
|
||||
<div class="top">
|
||||
@@ -136,6 +135,7 @@ function getPermissionInfo() {
|
||||
// 搜索
|
||||
const tableSearchInfo = ref({});
|
||||
function onSearch(payload) {
|
||||
payload.type = 0
|
||||
tableSearchInfo.value = payload;
|
||||
diagramList.value = []
|
||||
current_page.value = 1
|
||||
@@ -346,6 +346,9 @@ const searchPlan = (e,isType)=>{
|
||||
}
|
||||
onMounted(async () => {
|
||||
try {
|
||||
nextTick(() => {
|
||||
newSearchRef.value.isOpen=false
|
||||
})
|
||||
await getDiagramData()
|
||||
await getSurveysHead();
|
||||
getPermissionInfo();
|
||||
|
||||
@@ -150,6 +150,7 @@ export default defineComponent({
|
||||
background-color: #ffffff;
|
||||
height: calc(100vh - 146px);
|
||||
box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.1);
|
||||
border-radius: 0px 6px 6px 6px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -35,10 +35,8 @@
|
||||
<div class="content">
|
||||
<div class="amount"
|
||||
v-if="info && info.fit">
|
||||
<div v-if="typeof info.fit === 'string'">
|
||||
{{ info.fit }}
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<div >
|
||||
<span style="font-size: 62px">{{ fitInteger }}</span>.{{ fitDecimal }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +52,7 @@
|
||||
<span class="text">分组人数占比</span>
|
||||
</div>
|
||||
<piechart ref="chart"
|
||||
height="226px"
|
||||
:data="fitChartData"></piechart>
|
||||
<div class="download-chart-data"
|
||||
@click="download('pie')">
|
||||
@@ -95,37 +94,37 @@
|
||||
:pagination="false"
|
||||
:scroll="{ y: 500, x: 800 }"
|
||||
rowKey="option_index">
|
||||
|
||||
<template v-for="(col,index) in c2"
|
||||
:key="index"
|
||||
#[col.key]="{ text}">
|
||||
#[col.key]="data">
|
||||
<div v-if="col.dataIndex === 'sort'">
|
||||
<div v-if="text.value=='1'"
|
||||
<div v-if="data.text.value=='1'"
|
||||
style="color:rgb(175,52,52)">
|
||||
{{ text.value }}</div>
|
||||
<div v-if="text.value=='2'"
|
||||
{{ data.text.value }}</div>
|
||||
<div v-if="data.text.value=='2'"
|
||||
style="color:rgb(223,160,124)">
|
||||
{{ text.value }}</div>
|
||||
<div v-if="text.value=='3'"
|
||||
{{ data.text.value }}</div>
|
||||
<div v-if="data.text.value=='3'"
|
||||
style="color:rgb(238,215,144)">
|
||||
{{ text.value }}</div>
|
||||
<div v-if="text.value!='3'&&text.value!='2'&&text.value!='1'">
|
||||
{{ text.value }}</div>
|
||||
{{ data.text.value }}</div>
|
||||
<div v-if="data.text.value!='3'&&data.text.value!='2'&&data.text.value!='1'">
|
||||
{{ data.text.value }}</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.dataIndex === 'option_title'">
|
||||
|
||||
<div class="mxd-lc-detail-table-row"
|
||||
v-if="text.type == 0 || text.type == 1"
|
||||
v-html="text.value"></div>
|
||||
<img v-if="text.type == 2"
|
||||
:src="text.value"
|
||||
v-if="data.text.type == 0 || data.text.type == 1"
|
||||
v-html="data.text.value" ></div>
|
||||
<img v-if="data.text.type == 2"
|
||||
:src="data.text.value"
|
||||
style="width: 40px; height: 40px" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="text.value >= 0"
|
||||
style="color: #52c19a">{{ text.value }}</div>
|
||||
<div v-if="data.text.value >= 0"
|
||||
style="color: #52c19a">{{ data.text.value}}</div>
|
||||
<div v-else
|
||||
style="color: #923139">{{ text.value }}</div>
|
||||
style="color: #923139">{{ data.text.value}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -142,34 +141,35 @@
|
||||
:scroll="{ y: 500, x:800 }">
|
||||
<template v-for="(col,index) in c1"
|
||||
:key="index"
|
||||
#[col.dataIndex]="{ text }">
|
||||
#[col.dataIndex]=" data ">
|
||||
<div v-if="col.dataIndex === 'sort'">
|
||||
<div v-if="text.value=='1'"
|
||||
|
||||
<div v-if="data.text.value=='1'"
|
||||
style="color:rgb(175,52,52)">
|
||||
{{ text.value }}</div>
|
||||
<div v-if="text.value=='2'"
|
||||
{{ data.text.value }}</div>
|
||||
<div v-if="data.text.value=='2'"
|
||||
style="color:rgb(223,160,124)">
|
||||
{{ text.value }}</div>
|
||||
<div v-if="text.value=='3'"
|
||||
{{ data.text.value }}</div>
|
||||
<div v-if="data.text.value=='3'"
|
||||
style="color:rgb(238,215,144)">
|
||||
{{ text.value }}</div>
|
||||
<div v-if="text.value!='3'&&text.value!='2'&&text.value!='1'">
|
||||
{{ text.value }}</div>
|
||||
{{ data.text.value }}</div>
|
||||
<div v-if="data.text.value!='3'&&data.text.value!='2'&&data.text.value!='1'">
|
||||
{{ data.text.value }}</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.dataIndex === 'option_title'">
|
||||
<div class="mxd-lc-detail-table-row"
|
||||
v-if="text.type == 0 || text.type == 1"
|
||||
v-html="text.value"></div>
|
||||
<img v-if="text.type == 2"
|
||||
:src="text.value"
|
||||
v-if="data.text.type == 0 || data.text.type == 1"
|
||||
v-html="data.text.value" ></div>
|
||||
<img v-if="data.text.type == 2"
|
||||
:src="data.text.value"
|
||||
style="width: 40px; height: 40px" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="text.value >= 0"
|
||||
style="color: #52c19a">{{ text.value }}</div>
|
||||
<div v-if="data.text.value >= 0"
|
||||
style="color: #52c19a">{{ data.text.value }}</div>
|
||||
<div v-else
|
||||
style="color: #923139">{{ text.value }}</div>
|
||||
style="color: #923139">{{ data.text.value }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -187,7 +187,7 @@ import barchart from "./barchart.vue";
|
||||
import barchart2 from "./barchart2.vue";
|
||||
import CommonApi from "@/api/common";
|
||||
import createOSS from "@/utils/aliyunOssUpLoad";
|
||||
import { uploadDocumentFile } from "@/api/data-analyse";
|
||||
// import { uploadDocumentFile } from "@/api/data-analyse";
|
||||
import { fract } from '@/utils/number'
|
||||
const props = defineProps({
|
||||
info: {
|
||||
@@ -282,19 +282,22 @@ async function download (type) {
|
||||
size: file.size
|
||||
}
|
||||
]
|
||||
uploadDocumentFile({
|
||||
url: JSON.stringify(urlData),
|
||||
parent_sn: sn,
|
||||
import_type: 6, //图表分析
|
||||
})
|
||||
// uploadDocumentFile({
|
||||
// url: JSON.stringify(urlData),
|
||||
// parent_sn: sn,
|
||||
// import_type: 6, //图表分析
|
||||
// })
|
||||
}
|
||||
|
||||
watch(() => props.info, (info) => {
|
||||
const data = JSON.parse(JSON.stringify(info.raw_data.data))
|
||||
const data = JSON.parse(JSON.stringify(info.zero_data.data))
|
||||
if (!info) return
|
||||
fitChartData.value = info.fit_chart
|
||||
if (typeof info.fit === 'string') {
|
||||
fit.value = info.fit
|
||||
const fit = info.fit + ''
|
||||
const splitIndex = fit.indexOf('.')
|
||||
fitInteger.value = fit.slice(0, splitIndex)
|
||||
fitDecimal.value = fit.slice(splitIndex + 1)
|
||||
}
|
||||
if (typeof info.fit === 'number') {
|
||||
const fit = info.fit + ''
|
||||
@@ -307,12 +310,12 @@ watch(() => props.info, (info) => {
|
||||
barData.value = barChartData;
|
||||
const _c1 = [].concat(info.raw_data.columns)
|
||||
c1.value = []
|
||||
c1.value = _c1.map((item) => {
|
||||
c1.value = _c1.map((item,index) => {
|
||||
if (item?.children) {
|
||||
item.children.map((e) => { e.dataIndex = e.key; childrenlist.push(e.key) })
|
||||
item.children.map((e,index) => { e.dataIndex = e.key;e.index =index; childrenlist.push(e.key) })
|
||||
}
|
||||
if (item?.children) {
|
||||
item.children.map((e) => { e.dataIndex = e.key; childrenlist.push(e.key) })
|
||||
item.children.map((e,index) => { e.dataIndex = e.key;e.index =index;childrenlist.push(e.key) })
|
||||
} else {
|
||||
item.slots = { customRender: item.key }
|
||||
item.dataIndex = item.key
|
||||
@@ -327,11 +330,11 @@ watch(() => props.info, (info) => {
|
||||
}
|
||||
})
|
||||
// 处理表格data数据
|
||||
debugger;
|
||||
// debugger;
|
||||
d1.value = info.raw_data.data.map((item, index) => {
|
||||
for (let i in item) {
|
||||
if (childrenlist.indexOf(i) > -1 && item[i].value == 0) {
|
||||
item[i] ="0"
|
||||
item[i] =parseFloat(0).toFixed(5)
|
||||
}
|
||||
if (childrenlist.indexOf(i) > -1 && item[i].value) {
|
||||
item[i] =item[i].value
|
||||
@@ -347,9 +350,10 @@ watch(() => props.info, (info) => {
|
||||
c2.value = []
|
||||
// 带children的key存进去
|
||||
|
||||
c2.value = _c2.map(item => {
|
||||
c2.value = _c2.map((item) => {
|
||||
if (item?.children) {
|
||||
item.children.map((e) => { e.dataIndex = e.key; childrenlist2.push(e.key) })
|
||||
item.children.map((e) => { e.dataIndex = e.key;
|
||||
childrenlist2.push(e.key) })
|
||||
} else {
|
||||
item.slots = { customRender: item.key }
|
||||
item.dataIndex = item.key
|
||||
@@ -362,11 +366,11 @@ watch(() => props.info, (info) => {
|
||||
align: 'center'
|
||||
}
|
||||
})
|
||||
debugger;
|
||||
// debugger;
|
||||
d2.value = info.zero_data.data.map((item, index) => {
|
||||
for (let i in item) {
|
||||
if (childrenlist2.indexOf(i) > -1 && item[i].value == 0) {
|
||||
item[i] ="0"
|
||||
item[i] =parseFloat(0).toFixed(5)
|
||||
}
|
||||
if (childrenlist2.indexOf(i) > -1 && item[i].value) {
|
||||
item[i] = item[i].value
|
||||
@@ -528,4 +532,7 @@ onMounted(() => {
|
||||
margin-top: 30px;
|
||||
height: 213px;
|
||||
}
|
||||
:deep(thead th[rowspan="2"]:nth-child(-n+3)){
|
||||
color:#3f85ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -27,7 +27,7 @@ export default defineComponent({
|
||||
legend: {
|
||||
orient: 'horizontal',
|
||||
left: 'center',
|
||||
top:'80%'
|
||||
top:'85%'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
|
||||
@@ -7,12 +7,30 @@
|
||||
</div>
|
||||
<a-button class="daochubtn"
|
||||
type="primary"
|
||||
v-if="info && info?.raw_data?.columns?.length >0"
|
||||
@click="handleExportXlsx(responseData.columns, responseData.data)">
|
||||
导出分析结果
|
||||
</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<a-spin tip="Loading..." v-if="loading">
|
||||
<a-alert
|
||||
message="努力加载中..."
|
||||
></a-alert>
|
||||
</a-spin>
|
||||
<div v-if=" !info">
|
||||
<div class="bgfa"></div>
|
||||
<div class="empty-data">
|
||||
|
||||
<img class="empty-img"
|
||||
:src="require('@/assets/img/publish/no-data.png')"
|
||||
alt="" />
|
||||
<div class="empty-text">由于样本量较小 暂无分析数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-tabs v-model:activeKey="activeKey"
|
||||
@change="changeTab">
|
||||
@change="changeTab" v-else>
|
||||
|
||||
<a-tab-pane v-for="item in tabList"
|
||||
:key="item.key"
|
||||
:tab="item.title">
|
||||
@@ -36,6 +54,7 @@
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -76,6 +95,7 @@ const responseData = ref({});
|
||||
const activeKey = ref("");
|
||||
const tabList = ref([]);
|
||||
const data = ref({});
|
||||
const loading =ref(true);
|
||||
const info = ref({
|
||||
fit: "",
|
||||
fit_chart: [],
|
||||
@@ -94,109 +114,137 @@ const changeTab = (key) => {
|
||||
};
|
||||
function handleExportXlsx (columns, data) {
|
||||
const workbook = XLSX.utils.book_new();
|
||||
console.log(columns)
|
||||
columns.forEach((column, ce) => {
|
||||
const sheet_title = column.title
|
||||
const source = data[column.key]
|
||||
if (sheet_title === '个人类别') {
|
||||
const { data: p_data, columns: p_columns } = source
|
||||
const rows = p_data.map(item => {
|
||||
const obj = Object.create(null)
|
||||
p_columns.forEach(element => {
|
||||
const value = item[element.key]
|
||||
obj[element.title] = value
|
||||
})
|
||||
return obj
|
||||
})
|
||||
const sheet_title = column.title;
|
||||
const source = data[column.key];
|
||||
if (sheet_title === "个人类别") {
|
||||
const { data: p_data, columns: p_columns } = source;
|
||||
const rows = p_data.map((item) => {
|
||||
const obj = Object.create(null);
|
||||
p_columns.forEach((element) => {
|
||||
const value = item[element.key];
|
||||
obj[element.title] = value;
|
||||
});
|
||||
return obj;
|
||||
});
|
||||
const worksheet = XLSX.utils.json_to_sheet(rows);
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, sheet_title);
|
||||
} else {
|
||||
const raw_data = source?.raw_data
|
||||
const zero_data = source?.zero_data
|
||||
const raw_data = source?.raw_data;
|
||||
const zero_data = source?.zero_data;
|
||||
if (raw_data && zero_data) {
|
||||
const { columns: row_columns } = raw_data
|
||||
let rows = []
|
||||
const zero_rows = raw_data.data.map(item => {
|
||||
const obj = Object.create(null)
|
||||
row_columns.forEach(element => {
|
||||
const { columns: row_columns } = raw_data;
|
||||
let rows = [];
|
||||
const zero_rows = raw_data.data.map((item) => {
|
||||
const obj = Object.create(null);
|
||||
row_columns.forEach((element) => {
|
||||
if (element.key) {
|
||||
if (item[element.key]?.value) {
|
||||
let value = String(item[element.key]?.value)
|
||||
let value = String(item[element.key]?.value);
|
||||
if (value.split('"').length > 1) {
|
||||
value = value.split('"')[value.split('"').length - 2]
|
||||
if (
|
||||
value.indexOf("<") > -1 &&
|
||||
value.indexOf(">") > -1 &&
|
||||
value.indexOf("img") == -1
|
||||
) {
|
||||
var re = new RegExp("<[^<>]+>", "g");
|
||||
var text1 = value.replace(re, "");
|
||||
value = text1;
|
||||
} else {
|
||||
const $ = cheerio.load(value)
|
||||
value = $.text()
|
||||
}
|
||||
obj[element.title] = value
|
||||
value = value.split('"')[value.split('"').length - 2];
|
||||
}
|
||||
} else {
|
||||
element.children.map(citem => {
|
||||
const $ = cheerio.load(value);
|
||||
value = $.text();
|
||||
}
|
||||
obj[`${"选项重要性(Raw)"}${element.title}`] = value;
|
||||
}
|
||||
} else {
|
||||
element.children.map((citem) => {
|
||||
if (item[citem.key]?.value) {
|
||||
let value = item[citem.key].value
|
||||
obj[`${element.title}${citem.title}`] = value
|
||||
let value = item[citem.key].value;
|
||||
obj[`${"选项重要性(Raw)"}${element.title}${citem.title}`] = value;
|
||||
} else {
|
||||
let value = item[citem.key]
|
||||
obj[`${element.title}${citem.title}`] = value
|
||||
let value = item[citem.key];
|
||||
obj[`${"选项重要性(Raw)"}${element.title}${citem.title}`] = value;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
return obj
|
||||
})
|
||||
});
|
||||
return obj;
|
||||
});
|
||||
const raw_rows = zero_data.data.map((item, e) => {
|
||||
const obj = Object.create(null)
|
||||
const obj = Object.create(null);
|
||||
if (e === 0) {
|
||||
info.value.fit_chart.map((ee, ei) => {
|
||||
obj[`${ee.name}人数占比`] = ee.value
|
||||
})
|
||||
obj['BIC贝叶斯信息准则'] = info.value.fit
|
||||
obj["BIC贝叶斯信息准则"] = column.fit;
|
||||
source.fit_chart.map((ee, ei) => {
|
||||
obj[`${ee.name}人数占比`] = ee.value;
|
||||
});
|
||||
}
|
||||
row_columns.forEach(element => {
|
||||
//循环第二次表格
|
||||
row_columns.forEach((element) => {
|
||||
if (element.key) {
|
||||
if (item[element.key]?.value) {
|
||||
let value = String(item[element.key]?.value)
|
||||
let value = String(item[element.key]?.value);
|
||||
if (value.split('"').length > 1) {
|
||||
value = value.split('"')[value.split('"').length - 2]
|
||||
console.log("value", value);
|
||||
if (
|
||||
value.indexOf("<") > -1 &&
|
||||
value.indexOf(">") > -1 &&
|
||||
value.indexOf("img") == -1
|
||||
) {
|
||||
var re = new RegExp("<[^<>]+>", "g");
|
||||
var text1 = value.replace(re, "");
|
||||
value = text1;
|
||||
} else {
|
||||
const $ = cheerio.load(value)
|
||||
value = $.text()
|
||||
}
|
||||
obj[element.title] = value
|
||||
value = value.split('"')[value.split('"').length - 2];
|
||||
}
|
||||
} else {
|
||||
element.children.map(citem => {
|
||||
const $ = cheerio.load(value);
|
||||
value = $.text();
|
||||
}
|
||||
obj[`${"选项重要性(Zero-Centered)"}${element.title}`] = value;
|
||||
}
|
||||
} else {
|
||||
element.children.map((citem) => {
|
||||
if (item[citem.key]?.value) {
|
||||
let value = item[citem.key].value
|
||||
obj[`${element.title}${citem.title}`] = value
|
||||
let value = item[citem.key].value;
|
||||
obj[`${"选项重要性(Zero-Centered)"}${element.title}${citem.title}`] = value;
|
||||
} else {
|
||||
let value = item[citem.key]
|
||||
obj[`${element.title}${citem.title}`] = value
|
||||
let value = item[citem.key];
|
||||
obj[`${"选项重要性(Zero-Centered)"}${element.title}${citem.title}`] = value;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
});
|
||||
rows = [];
|
||||
if (raw_rows.length > 0) {
|
||||
raw_rows.map((item, index) => {
|
||||
rows.push((item = Object.assign(item, zero_rows[index])));
|
||||
});
|
||||
}
|
||||
})
|
||||
return obj
|
||||
})
|
||||
rows = raw_rows.concat(zero_rows)
|
||||
const worksheet = XLSX.utils.json_to_sheet(rows);
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, sheet_title);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
XLSX.writeFile(workbook, `${props.question_data?.title}.xlsx`);
|
||||
}
|
||||
|
||||
const getData = () => {
|
||||
loading.value =true;
|
||||
getAnalyseDetail(props.sn, props.id).then((res) => {
|
||||
loading.value =false;
|
||||
responseData.value = res.data;
|
||||
const columns = res.data.columns;
|
||||
const _data = res.data.data;
|
||||
|
||||
data.value = _data;
|
||||
tabList.value = columns;
|
||||
activeKey.value = columns[0].key;
|
||||
info.value = _data[columns[0].key];
|
||||
activeKey.value = columns?.[0]?.key ?? 0;
|
||||
info.value = _data?.[columns?.[0]?.key] ?? undefined;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -282,7 +330,6 @@ watchEffect(() => {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
background: #fafafa;
|
||||
min-height: 600px;
|
||||
|
||||
.empty-img {
|
||||
@@ -291,7 +338,7 @@ watchEffect(() => {
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
color: #4f90ff;
|
||||
color: $yili-default-color;;
|
||||
}
|
||||
}
|
||||
.daochubtn {
|
||||
@@ -299,4 +346,11 @@ watchEffect(() => {
|
||||
top: 75px;
|
||||
z-index: 99999;
|
||||
}
|
||||
.bgfa{
|
||||
position:absolute;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<div class="nanoBox">
|
||||
<div class="nanoBox-title">
|
||||
<sub-title>
|
||||
<div class="sub-title">Maxdiff分析</div>
|
||||
</sub-title>
|
||||
</div>
|
||||
<div class="nanoTitleBox">
|
||||
<div
|
||||
class="nanoTitleBoxL"
|
||||
@@ -68,7 +73,7 @@
|
||||
<div
|
||||
class="edit-inner"
|
||||
v-if="editableData[record.id]"
|
||||
@mouseleave="handleSave(record.id)"
|
||||
@blur="handleSave(record.id)"
|
||||
>
|
||||
<div class="inner-input">
|
||||
<a-input
|
||||
@@ -86,7 +91,7 @@
|
||||
<div
|
||||
v-else
|
||||
style="text-align: center"
|
||||
@click.stop="handleEdit(record.status, record.id)"
|
||||
@click.stop="handleEdit(record.status, record.id, editableData)"
|
||||
>
|
||||
{{ record.title }}
|
||||
</div>
|
||||
@@ -115,8 +120,9 @@
|
||||
<template #status_str="{ text, record }">
|
||||
<div
|
||||
:class="{
|
||||
pending: record.status === 0,
|
||||
ing: record.status === 1 || record.status === 2,
|
||||
loading: record.status === 1,
|
||||
conduct: record.status === 2,
|
||||
error: record.status === 4,
|
||||
success: record.status === 3,
|
||||
}"
|
||||
>
|
||||
@@ -195,7 +201,7 @@ import {
|
||||
} from "@/api/analyse/maxdiff";
|
||||
import maxDetail from "./components/maxDetail.vue";
|
||||
import mxdLcDetail from "./components/mxdLcDetail.vue";
|
||||
|
||||
import SubTitle from "@/views/DataAnalyse/components/SubTitle.vue";
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useStore();
|
||||
@@ -257,7 +263,6 @@ const columns = [
|
||||
key: "finished_at",
|
||||
slots: { customRender: "finished_at" },
|
||||
sorter: true,
|
||||
defaultSortOrder: "descend",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
@@ -271,20 +276,16 @@ const columns = [
|
||||
const editableData = ref({});
|
||||
|
||||
function handleInput(e, id) {
|
||||
const splitValue = e.target.value.replace(/_/g, "");
|
||||
if (splitValue) {
|
||||
const splitValue = e.target.value;
|
||||
|
||||
editableData.value[id].title = splitValue;
|
||||
} else {
|
||||
editableData.value[id].title = cloneDeep(
|
||||
tableSource.value.filter((item) => item.id === id)[0].title
|
||||
);
|
||||
}
|
||||
}
|
||||
function handleLeave(record) {
|
||||
console.log("record", record);
|
||||
}
|
||||
|
||||
function handleEdit(status, key) {
|
||||
editableData.value = {};
|
||||
if (status === 3) {
|
||||
//已完成
|
||||
editableData.value[key] = cloneDeep(
|
||||
@@ -301,6 +302,16 @@ function handleSave(key) {
|
||||
delete editableData.value[key];
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(title && title.replaceAll(" ", "") && title.length < 20)) {
|
||||
editableData.value[key] = cloneDeep(
|
||||
tableSource.value.filter((item) => item.id === key)[0]
|
||||
);
|
||||
delete editableData.value[key];
|
||||
message.error("标题格式有误");
|
||||
return;
|
||||
}
|
||||
|
||||
updateTitle(
|
||||
sn,
|
||||
editableData.value[key].id,
|
||||
@@ -308,6 +319,8 @@ function handleSave(key) {
|
||||
).then(() => {
|
||||
runTableList(sn, { ...analysis_search_params.value });
|
||||
delete editableData.value[key];
|
||||
}).catch(()=>{
|
||||
delete editableData.value[key];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -354,8 +367,7 @@ const handleAnalyse = async () => {
|
||||
analysis_search_params.value.page = 1;
|
||||
await runResult(data);
|
||||
await runTableList(sn, { ...analysis_search_params.value });
|
||||
analysis_type.value = "";
|
||||
questionIndex.value = "";
|
||||
questionIndex.value = null;
|
||||
};
|
||||
|
||||
// 分页修改页码
|
||||
@@ -425,8 +437,12 @@ onMounted(() => {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
&-title {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
.tableBox {
|
||||
margin-top: 20px ;
|
||||
}
|
||||
.noData {
|
||||
height: 80%;
|
||||
@@ -466,11 +482,14 @@ onMounted(() => {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 60px;
|
||||
padding: 0 20px;
|
||||
.nanoTitleBoxL {
|
||||
color: #bfbfbf;
|
||||
display: flex;
|
||||
margin-top: 20px ;
|
||||
font-size: 14px;
|
||||
font-family: PingFang SC-常规体, PingFang SC;
|
||||
font-weight: normal;
|
||||
color: #70B936 !important;
|
||||
.operBox {
|
||||
color: #bfbfbf;
|
||||
display: flex;
|
||||
@@ -541,6 +560,49 @@ onMounted(() => {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.error {
|
||||
color: #ff3939;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.dot {
|
||||
background: #ff3939;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.conduct {
|
||||
color: #32b0f6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.dot {
|
||||
background: #32b0f6;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.loading {
|
||||
color: #8c8c8c;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.dot {
|
||||
background: #8c8c8c;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -552,4 +614,11 @@ onMounted(() => {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.sub-title{
|
||||
margin-top:20px ;
|
||||
}
|
||||
:deep(.ant-table-title){
|
||||
height: 0;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -123,6 +123,7 @@ export default {
|
||||
.link-container {
|
||||
padding: 32px 24px;
|
||||
background: #fff;
|
||||
border-radius: 0px 6px 6px 6px;
|
||||
.title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
@click="openPublishModal"
|
||||
>
|
||||
<template #icon>
|
||||
<i class="iconfont icon-Path" style="font-size: 18px; margin-right: 6px"></i>
|
||||
<i class="iconfont icon-Path" style="font-size: 15px; margin-right: 6px"></i>
|
||||
</template>
|
||||
发布
|
||||
</a-button>
|
||||
@@ -376,6 +376,8 @@ export default {
|
||||
}
|
||||
}
|
||||
.publish-btn {
|
||||
height: auto !important;
|
||||
// height: auto !important;
|
||||
height: 36px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
@click="openPublishModal"
|
||||
>
|
||||
<template #icon>
|
||||
<i class="iconfont icon-Path" style="font-size: 18px; margin-right: 6px"></i>
|
||||
<i class="iconfont icon-Path" style="font-size: 15px; margin-right: 6px"></i>
|
||||
</template>
|
||||
发布
|
||||
</a-button>
|
||||
@@ -645,8 +645,7 @@ onMounted(() => {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.publish-btn {
|
||||
width: 98px;
|
||||
height: 42px;
|
||||
height: 36px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.pulish-container {
|
||||
@@ -671,6 +670,7 @@ onMounted(() => {
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.1);
|
||||
height: calc(100% - 40px);
|
||||
border-radius: 0px 6px 6px 6px;
|
||||
.title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -10,30 +10,29 @@
|
||||
}
|
||||
"
|
||||
@end="onMouseup"
|
||||
@mousemove="onMousemove"
|
||||
@mouseup="onMouseup"
|
||||
@mouseleave="onMouselever"
|
||||
@begin="onMousedown"
|
||||
></VueSignature>
|
||||
<div
|
||||
class="vue-signature-btn"
|
||||
v-if="showBtn && !disabled"
|
||||
@mousemove="onMousemove"
|
||||
@mouseleave="onMouselever"
|
||||
v-if="!disabled"
|
||||
:class="{
|
||||
hidebtn:!showBtn
|
||||
}"
|
||||
>
|
||||
<span @click="clear">
|
||||
<span @mousedown.stop.prevent="clear" @touchstart.stop.prevent="clear">
|
||||
<i class="iconfont icon-qingkong1"></i>
|
||||
清空
|
||||
</span>
|
||||
<span class="lb" @click="back">
|
||||
<span class="lb" @mousedown.stop.prevent="back" @touchstart.stop.prevent="back">
|
||||
<i class="iconfont icon-chexiao"></i>
|
||||
撤销</span
|
||||
>
|
||||
<span class="lb" @click="pen">
|
||||
<span class="lb" @mousedown.stop.prevent="pen" @touchstart.stop.prevent="pen">
|
||||
<i class="iconfont" :class="isPen ? 'icon-huabi' : 'icon-xiangpi'"></i>
|
||||
{{ isPen ? '画笔' : '橡皮' }}
|
||||
</span>
|
||||
<span class="lb save" @click="save" :disabled="disabled">
|
||||
<span class="lb save" @mousedown.stop.prevent="save" @touchstart.stop.prevent="save" :disabled="disabled">
|
||||
<i class="iconfont icon-wancheng"></i>
|
||||
|
||||
完成并上传</span
|
||||
@@ -90,29 +89,11 @@ export default {
|
||||
// });
|
||||
|
||||
const onMousedown = (e) => {
|
||||
isMouseDown.value = true;
|
||||
showBtn.value = false;
|
||||
e.preventDefault();
|
||||
};
|
||||
const onMousemove = (e) => {
|
||||
// e.preventDefault();
|
||||
if (!isMouseDown.value) {
|
||||
showBtn.value = true;
|
||||
} else {
|
||||
showBtn.value = false;
|
||||
}
|
||||
// console.log("onMousemove", e);
|
||||
};
|
||||
const onMouseup = (e) => {
|
||||
e.preventDefault();
|
||||
if (isMouseDown.value) {
|
||||
isMouseDown.value = false;
|
||||
showBtn.value = true;
|
||||
}
|
||||
};
|
||||
const onMouselever = (e) => {
|
||||
e.preventDefault();
|
||||
showBtn.value = false;
|
||||
};
|
||||
return {
|
||||
save,
|
||||
@@ -123,9 +104,7 @@ export default {
|
||||
isPen,
|
||||
showBtn,
|
||||
onMousedown,
|
||||
onMousemove,
|
||||
onMouseup,
|
||||
onMouselever
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -137,7 +116,8 @@ export default {
|
||||
width: 302px;
|
||||
height: 152px;
|
||||
.vue-signature-btn {
|
||||
display: flex;
|
||||
// display: flex;
|
||||
display: none;
|
||||
width: 302px;
|
||||
height: 42px;
|
||||
background: linear-gradient(180deg, rgba(34, 34, 34, 0) 0%, #000000 100%);
|
||||
@@ -164,6 +144,7 @@ export default {
|
||||
}
|
||||
.lb {
|
||||
border-left: 1px solid;
|
||||
cursor:pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,4 +158,11 @@ export default {
|
||||
.noPen {
|
||||
cursor: url('/ico/noPen.ico') 18 18, crosshair;
|
||||
}
|
||||
.vue-signature:hover .vue-signature-btn{
|
||||
display:flex !important;
|
||||
}
|
||||
.hidebtn{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -18,11 +18,8 @@
|
||||
</template>
|
||||
<a-input-number
|
||||
block
|
||||
:min="3"
|
||||
:max="infoConfig.options?.[0]?.length"
|
||||
class="input-number BPTO-footer-title"
|
||||
v-model:value="infoConfig.config.concept"
|
||||
@change="conceptInput(infoConfig.config.concept)"
|
||||
@blur="onInput('concept', infoConfig.config.concept)"
|
||||
/>
|
||||
</a-tooltip>
|
||||
@@ -39,8 +36,6 @@
|
||||
</template>
|
||||
<a-input-number
|
||||
block
|
||||
:max="500"
|
||||
:min="3"
|
||||
class="input-number BPTO-footer-title"
|
||||
v-model:value="infoConfig.config.task"
|
||||
@blur="onInput('task', infoConfig.config.task)"
|
||||
@@ -64,9 +59,6 @@
|
||||
<a-input-number
|
||||
block
|
||||
class="input-number BPTO-footer-title"
|
||||
:max="10"
|
||||
:min="2"
|
||||
@change="versionInput(infoConfig.config.version)"
|
||||
v-model:value="infoConfig.config.version"
|
||||
@blur="onInput('version', infoConfig.config.version)"
|
||||
/>
|
||||
@@ -74,12 +66,13 @@
|
||||
</span>
|
||||
<div class="right-btn ml-8">
|
||||
<span>
|
||||
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="create"
|
||||
block
|
||||
:loading="loading && !infoConfig.config.design_version"
|
||||
:disabled="infoConfig.options[0].length <= infoConfig.config.concept"
|
||||
:disabled="infoConfig.config.concept * infoConfig.config.task <= (1.5 * infoConfig.options?.[0]?.length)"
|
||||
>
|
||||
<i class="iconfont icon-shengchengsheji mr-5"></i>
|
||||
生成设计</a-button
|
||||
@@ -267,7 +260,6 @@ export default {
|
||||
|
||||
if (loading.value === false) {
|
||||
loading.value = true;
|
||||
debugger;
|
||||
message.info(
|
||||
`该参数组合下建议您样本量不小于${Number.parseInt(
|
||||
500 / (infoConfig.value.config.concept * infoConfig.value.config.task)
|
||||
@@ -308,6 +300,40 @@ export default {
|
||||
return message.error("请输入正整数");
|
||||
}
|
||||
}
|
||||
if(name =='concept' || name == 'task'){
|
||||
if(!MTCheck()){
|
||||
infoConfig.value.config[name] =props.info.config[name];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(name =='concept'){
|
||||
if(infoConfig.value.config[name] < 3) {
|
||||
|
||||
infoConfig.value.config[name] = 3;
|
||||
}
|
||||
var valueConcept =(infoConfig.value?.options?.[0]?.length || 4 )-1;
|
||||
if( infoConfig.value.config[name] > valueConcept){
|
||||
infoConfig.value.config[name] =valueConcept;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(name =='task'){
|
||||
if(infoConfig.value.config[name]<3){
|
||||
infoConfig.value.config[name] =3;
|
||||
}
|
||||
if(infoConfig.value.config[name]>500){
|
||||
infoConfig.value.config[name] =560;
|
||||
}
|
||||
}
|
||||
|
||||
if(name == 'version'){
|
||||
if (value < 2 || value > 10) {
|
||||
message.error("版本数取值范围为2~10");
|
||||
return infoConfig.value.config[name] =props.info.config[name];
|
||||
}
|
||||
}
|
||||
|
||||
if (infoConfig.value.config[name]) {
|
||||
infoConfig.value.config[name] = parseInt(value);
|
||||
@@ -339,22 +365,19 @@ export default {
|
||||
}
|
||||
};
|
||||
|
||||
const versionInput = (value) => {
|
||||
if (value < 2 || value > 10) {
|
||||
return message.error("版本数取值范围为2~10");
|
||||
}
|
||||
};
|
||||
|
||||
const conceptInput = (value) => {
|
||||
const MTCheck = () => {
|
||||
// if (value < 2) {
|
||||
// return message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试");
|
||||
// }
|
||||
// if (value < infoConfig.value.options?.[0]?.length) {
|
||||
// return message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试");
|
||||
// }
|
||||
if (value * infoConfig.value.config.task < 1.5 * infoConfig.value.options?.[0]?.length) {
|
||||
return message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试");
|
||||
if (infoConfig.value.config.concept * infoConfig.value.config.task < 1.5 * infoConfig.value.options?.[0]?.length) {
|
||||
message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// onBeforeUnmount(() => {
|
||||
@@ -369,8 +392,6 @@ export default {
|
||||
create,
|
||||
loading,
|
||||
onInput,
|
||||
versionInput,
|
||||
conceptInput,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ export default class Maxdiff extends Config {
|
||||
this.design_version = is_modified === undefined ? 0 : this.design_version;
|
||||
this.version = is_modified === undefined ? 2 : this.version;
|
||||
this.task = 3 //随机任务
|
||||
this.concept = 3 //任务选项
|
||||
this.concept = 4 //任务选项
|
||||
this.is_placeholder = 0//问题提示
|
||||
this.placeholder = '' //提示内容
|
||||
this.help = ''
|
||||
|
||||
@@ -376,7 +376,7 @@ export function newQuesType (type, param) {
|
||||
const initMaxdiff = () => {
|
||||
result.options = [[]];
|
||||
|
||||
for (let index1 = 1; index1 <= 3; index1++) {
|
||||
for (let index1 = 1; index1 <= 4; index1++) {
|
||||
const maxdiff_option_config2 = new Option();
|
||||
maxdiff_option_config2.option_index = index1;
|
||||
maxdiff_option_config2.option = `<p>选项${index1}</p>`;
|
||||
@@ -385,7 +385,7 @@ export function newQuesType (type, param) {
|
||||
};
|
||||
result.options[0].push(maxdiff_option_config2);
|
||||
}
|
||||
result.last_option_index = 2;
|
||||
result.last_option_index = 4;
|
||||
}
|
||||
const init3D = () => {
|
||||
result.last_option_index = 0;
|
||||
|
||||
@@ -458,7 +458,7 @@ export default {
|
||||
th {
|
||||
padding: 16px;
|
||||
font-weight: 400;
|
||||
background: #f5f7fa;
|
||||
background: rgba(112, 185, 54, 0.3);
|
||||
min-width: 150px;
|
||||
}
|
||||
.th-main {
|
||||
@@ -469,7 +469,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.tr-active {
|
||||
background: #f5f7fa;
|
||||
background: rgba(112, 185, 54, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<a-radio :value="false" :disabled="true" />
|
||||
</div>
|
||||
</template>
|
||||
<div class="delete" v-if="optionList.length > 3">
|
||||
<div class="delete" v-if="optionList.length > 4">
|
||||
<div @click="onRemove(item)">
|
||||
<a>删除</a>
|
||||
</div>
|
||||
@@ -319,9 +319,11 @@ export default {
|
||||
};
|
||||
optionList.value.push(newOption);
|
||||
copyInfo.value.options[0] = optionList.value;
|
||||
// copyInfo.value.config.task = Number.parseInt(
|
||||
// (optionList.value.length * 3) / copyInfo.value.config.concept
|
||||
// );
|
||||
emitInfo(true);
|
||||
};
|
||||
|
||||
const onUpLoadChange = (value) => {
|
||||
console.log("onUpLoadChange", value);
|
||||
value.forEach((element) => {
|
||||
@@ -567,8 +569,6 @@ export default {
|
||||
const editChange = (index, value, isupodateV) => {
|
||||
if (!value) {
|
||||
message.error("选项不能为空");
|
||||
|
||||
console.log(props.info?.options[0][index].option);
|
||||
optionList.value[index].option = props.info?.options[0][index].option;
|
||||
optionList.value[index].option = props.info?.options[0][index].option;
|
||||
return;
|
||||
@@ -601,7 +601,7 @@ export default {
|
||||
copyInfo.value.config["first_text"] = props.info.config["first_text"];
|
||||
copyInfo.value.config["second_text"] = props.info.config["second_text"];
|
||||
columns.value = getAnswerStyle(config.value.answer_style);
|
||||
message.error("标题不能相等");
|
||||
message.error("标题不能相同");
|
||||
return;
|
||||
}
|
||||
emitInfo(isupdateV);
|
||||
|
||||
@@ -165,6 +165,7 @@ import { useRoute } from "vue-router";
|
||||
import ModelSuccess from "../../components/config/ModelSuccess.vue";
|
||||
import ModelError from "../../components/config/ModelError.vue";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import moment from "moment";
|
||||
//import Tooltip from "../Tooltip.vue";
|
||||
export default {
|
||||
props: {
|
||||
@@ -316,7 +317,7 @@ export default {
|
||||
{
|
||||
type: 6,
|
||||
},
|
||||
"生成设计模板.xlsx"
|
||||
"MXD生成设计模板.xlsx"
|
||||
);
|
||||
};
|
||||
|
||||
@@ -400,7 +401,7 @@ export default {
|
||||
url: copyConfig.value.config.file_url,
|
||||
// sn: route.query.sn,
|
||||
// question_index: copyConfig.value.question_index
|
||||
});
|
||||
},`MXD生产设计_${ moment().format("YYYYMMDDHHmmss")}.xlsx`);
|
||||
// infoConfig.value.config.file_name = data.data.config.file_name;
|
||||
// infoConfig.value.config.file_url = data.data.config.file_url;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
v-for="(item, index) of mobileList"
|
||||
:key="index"
|
||||
@click="handlerChange(item.type)"
|
||||
:class="item.type === isMobile ? 'mo mobile-active' : 'mo mobile'"
|
||||
:class="[item.class, item.type === isMobile ? 'mo mobile-active' : 'mo mobile']"
|
||||
>
|
||||
<i v-html="item.icon" class="iconfont" />
|
||||
<span class="mo-name">{{ item.name }}</span>
|
||||
@@ -23,8 +23,8 @@ defineProps({
|
||||
const emit = defineEmits(["mobile"]);
|
||||
|
||||
const mobileList = reactive([
|
||||
{ name: '手机', icon: '', type: 'mobile' },
|
||||
{ name: '电脑', icon: '', type: 'pc' }
|
||||
{ name: '手机', icon: '', type: 'mobile', class: 'mo-phone' },
|
||||
{ name: '电脑', icon: '', type: 'pc', class: 'mo-computer' }
|
||||
])
|
||||
const handlerChange = (e) => {
|
||||
emit('mobile', e)
|
||||
@@ -40,11 +40,16 @@ const handlerChange = (e) => {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #ffffff;
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
text-align: center;
|
||||
line-height: 37px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.mo-phone{
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
}
|
||||
.mo-computer{
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
}
|
||||
.mobile {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ export function cbc_shelves_import(params) {
|
||||
|
||||
|
||||
/* Maxdiff导出设计*/
|
||||
const mxd_export = async (params) => {
|
||||
const mxd_export = async (params,name) => {
|
||||
const url = params.url;
|
||||
// await request({
|
||||
// url: `/console/surveys/${params.sn}/questions/${params.question_index}/mxd_export`,
|
||||
@@ -203,7 +203,8 @@ const mxd_export = async (params) => {
|
||||
withCredentials: false,
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
fileDownload(data, "", 'application/vnd.ms-excel');
|
||||
|
||||
fileDownload(data, name, 'application/vnd.ms-excel');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="section-null"
|
||||
v-if="showimg=='1'">
|
||||
<img style="width:15%"
|
||||
<img
|
||||
src="@/assets/img/redpacket/null.png" />
|
||||
<div class="hint">还没有抽奖,快去创建吧~</div>
|
||||
</div>
|
||||
@@ -637,8 +637,9 @@ export default defineComponent({
|
||||
verifyCode: data.verify,
|
||||
}
|
||||
const res = await store.dispatch('redpacket/offeringPrizes', subData)
|
||||
if (res.error_code === 0) {
|
||||
message.success(res.message);
|
||||
if (res.code === 0) {
|
||||
// message.success(res.message);
|
||||
message.success('操作成功');
|
||||
actLists()
|
||||
loading.value = true
|
||||
const data = await store.dispatch('DocumentLibraryApi/getKey')
|
||||
@@ -841,7 +842,8 @@ export default defineComponent({
|
||||
text-align: center;
|
||||
margin-top: 7%;
|
||||
img {
|
||||
width: 25%;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
.hint {
|
||||
font-size: 16px;
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div style="color: #434343;">今日回收量</div>
|
||||
<div style="margin-top: 15px; font-weight: 800; font-size: 18px">
|
||||
<div style="color: #5E5E5E;">今日回收量</div>
|
||||
<div style="margin-top: 19px; font-weight: 800; font-size: 18px">
|
||||
{{ from.num1 }}
|
||||
</div>
|
||||
</div>
|
||||
<i style="font-size: 40px; margin-right: 68px;color: #ffffff;" class="iconfont"></i>
|
||||
</div>
|
||||
<div class="card" :style="from.num3 > 0 ? 'width:34%' : 'width:48%'">
|
||||
<div class="imgstyle" style="background-color: rgb(78, 125, 255)">
|
||||
@@ -28,11 +29,12 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div style="color: #434343;">完成回收总量</div>
|
||||
<div style="margin-top: 15px; font-weight: 800; font-size: 18px">
|
||||
<div style="color: #5E5E5E;">完成回收总量</div>
|
||||
<div style="margin-top: 19px; font-weight: 800; font-size: 18px">
|
||||
{{ from.num2 }}
|
||||
</div>
|
||||
</div>
|
||||
<i style="font-size: 40px; margin-right: 68px;color: #ffffff;" class="iconfont"></i>
|
||||
</div>
|
||||
<div class="card" v-if="from.num3 > 0">
|
||||
<div class="imgstyle" style="background-color: #2cd076">
|
||||
@@ -227,11 +229,11 @@ export default defineComponent({
|
||||
.analyse-setting1 {
|
||||
overflow: hidden;
|
||||
min-height: 200px;
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 24px;
|
||||
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 6px;
|
||||
}
|
||||
.section {
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
.card-wrap {
|
||||
display: flex;
|
||||
@@ -242,19 +244,20 @@ export default defineComponent({
|
||||
width: 31%;
|
||||
background: #fafafa;
|
||||
min-height: 100px;
|
||||
border-radius: 6px;
|
||||
.imgstyle {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
margin: auto 0;
|
||||
background-color: rgb(255, 167, 67);
|
||||
border-radius: 14px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: auto 14px;
|
||||
margin: auto 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user