Merge branch 'bugfix' into dev_hhn

# Conflicts:
#	src/layout/index.vue
fix/non-blocking-route-navigation
HeHaonan 2 years ago
commit 7d4e4fcd6b

Binary file not shown.

@ -48,4 +48,28 @@ export function clusterAnalysis(data) {
method: 'post',
data:data,
})
}
//聚类分析--分析结果
export function clusterAnalysisPlot(data) {
return request({
url: '/api/model/clusterAnalysisResult',
method: 'post',
data:data,
})
}
//关联规则挖掘
export function associationRuleMining(data) {
return request({
url: '/api/model/apriori',
method: 'post',
data:data,
})
}
//回归分析--线性回归
export function linearRegression(data) {
return request({
url: '/api/model/regressionAnalysis',
method: 'post',
data:data,
})
}

@ -2,7 +2,7 @@
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-16 10:14:59
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 16:38:09
* @LastEditTime: 2024-08-17 16:57:01
* @FilePath: \vue3\src\api\marketing-algorithm.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -31,3 +31,27 @@ export function getMarketingAlgorithmPreprocessing(data) {
data,
});
}
// 自建表导入
export function getMarketingAlgorithmImport(data) {
return request({
url: "/api/userprofile/uploadExcel",
method: "POST",
data,
});
}
// 查询自建表
export function getMarketingAlgorithmTable(params) {
return request({
url: "/api/userprofile/selfExcelBaseInfo",
method: "GET",
params,
});
}
// 算法知识导入
export function getMarketingAlgorithmKnowledgeImport(data) {
return request({
url: "/api/model/batchImport",
method: "POST",
data,
});
}

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723862834824" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5630" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M344.8832 932.5568h334.848l-47.104-260.096a42.3424 42.3424 0 0 0-41.984-34.816h-152.576c-20.48 0-37.376 14.336-41.472 34.304l-51.712 260.608z" fill="#ffffff" p-id="5631"></path><path d="M229.0688 848.6912H795.648a51.712 51.712 0 0 1 0 103.3216H229.0688a51.712 51.712 0 1 1 0-103.3216z" fill="#ffffff" p-id="5632"></path><path d="M911.0528 120.0128c34.304 0 61.952 22.528 61.952 50.176v492.544c0 22.528-8.704 44.032-25.088 59.904-15.872 16.384-37.376 25.088-59.904 25.088H136.9088c-22.528 0-44.032-8.704-59.904-25.088-16.384-15.872-25.088-37.376-25.088-59.904v-492.544c0-27.648 27.648-50.176 61.44-50.176z m-305.0496 369.664c-30.208 0-54.784 24.576-54.784 54.784a55.0912 55.0912 0 1 0 54.784-54.784zM201.216 483.84c-30.208 0-54.784 24.576-54.784 54.784a55.0912 55.0912 0 1 0 54.784-54.784z m555.1104-144.0256l-119.296 136.4992c18.9952 8.704 33.792 24.9344 40.3968 44.8l124.928-142.9504a75.6224 75.6224 0 0 1-46.0288-38.3488zM476.16 345.2928a75.7248 75.7248 0 0 1-45.9264 38.9632l108.0832 128.5632a75.776 75.776 0 0 1 45.2608-39.68z m-132.7104 3.6864L228.9664 469.1968c19.3024 7.68 34.6624 23.04 42.3424 42.1888l120.064-125.952c-20.48-4.9152-37.888-18.432-47.9744-36.4544zM408.576 257.4336c-30.208 0-54.784 24.576-54.784 54.784a55.0912 55.0912 0 1 0 54.784-54.784z m414.464-6.2976c-30.208 0-54.784 24.576-54.784 54.784a55.0912 55.0912 0 1 0 54.784-54.784z" fill="#ffffff" p-id="5633"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723863104013" class="icon" viewBox="0 0 1076 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10492" xmlns:xlink="http://www.w3.org/1999/xlink" width="67.25" height="64"><path d="M965.133121 1021.30489c60.710902 0 109.932124-49.221222 109.932123-109.790276v-50.214157l0.283696-31.06469V110.783211C1075.34894 50.072309 1026.127719 0.851087 965.416817 0.851087H163.408782C123.265826 0.851087 85.534285 23.404904 66.526666 58.725031c-9.645657 17.872836-12.766311 36.880454-13.050007 56.881009-0.425544 26.241862-19.149467 23.121208-35.887519 38.015237-11.205984 9.929353-17.58914 24.397839-17.58914 39.291869v115.322344c0 15.035878 6.525003 29.646211 17.872836 39.575564 7.659787 6.808699 18.298379 7.659787 26.383709 13.475551 10.354897 7.517939 9.220114 15.603269 9.220114 27.376645v190.643579c0 12.340767 0.283696 24.823383 0 37.16415-0.425544 23.972295-22.128273 21.419033-36.454911 34.610888-10.780441 9.929353-17.021748 24.114143-17.021748 38.866325v115.322344c0 14.18479 5.815764 28.085884 16.028813 37.87339 4.964677 4.822829 10.922288 8.652722 17.447292 11.205984 13.475551 5.248372 20.000554 9.361961 20.000554 24.823383v33.617952c0 60.710902 49.221222 109.932124 109.932123 109.932124H815.767281l149.36584-1.418479z m-325.11539-106.953318h-19.858706l-31.348386 0.283696H164.543566v-20.426098s-9.220114-114.187561 158.869649-143.408228c0 0 127.946807-17.305444 136.883225-52.483724 0 0 4.822829-3.971741 1.276631-44.823936-7.659787-86.952764-64.682643-127.946807-87.662003-161.281064-22.97936-33.334257-24.965231-71.63319-24.965231-71.63319 0-9.645657 3.971741-13.050007 10.638593-19.291315 8.227178-7.659787 5.815764-15.745117 4.255437-24.255991-5.957612-32.625017-6.525003-84.825045-0.851087-117.59191 1.276631-39.008173 37.16415-70.356559 37.16415-70.356559 6.666851-5.673916 13.475551-11.915224 18.156531-19.433163 1.276631-2.127719 2.553262-4.397285 3.262502-6.666851 2.69511-8.936418-6.383156-15.603269-4.539133-25.107079 1.702175-8.652722 16.454357-9.078266 25.390774-9.503809 20.142402-0.992935 40.284804-1.844023 60.427206-0.283696 150.216928 11.48968 199.721845 66.810362 199.721845 66.810361 11.631528 14.042942 19.433162 31.206538 24.114144 48.653831 1.418479 5.248372 2.553262 10.638593 3.262501 16.028813 4.680981 26.951101 4.680981 55.036986 3.262502 82.129934-0.70924 12.908159-2.269566 25.67447-4.113589 38.58263-0.992935 6.666851-0.425544 12.908159 3.971741 18.298379 3.688045 4.539133 8.08533 7.659787 9.929353 13.47555 0.851087 2.69511 1.134783 5.673916 1.134784 8.652722 0 0-1.985871 38.440781-24.965231 71.633191-22.97936 33.334257-80.002216 74.186452-87.662003 161.281064-3.546198 40.852196 1.276631 44.823937 1.276631 44.823936 8.936418 35.17828 136.883225 52.483724 136.883225 52.483724 169.933786 31.490234 158.86965 143.408228 158.869649 143.408228v20.426098h-111.917994l17.58914-0.283696-194.189777-0.141848z m0 0" fill="#ffffff" p-id="10493"></path></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723863539685" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15248" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M904.470884 1020.515085H121.066652c-50.866598 0-91.565341-35.609227-91.565342-78.849003V81.958848c0-43.239775 40.698743-78.849002 91.565342-78.849002h783.404232c50.871566 0 91.564099 35.609227 91.564099 78.849002v857.16496c0 45.78205-40.692533 81.391277-91.564099 81.391277zM121.066652 53.981412c-25.436404 0-40.693775 15.257371-40.693776 27.977436v857.16496c0 15.262339 15.257371 30.519711 40.693776 30.519711h783.404232c22.892888 0 40.697501-15.257371 40.697501-27.977437V81.958848c0-12.720065-17.804613-27.977436-40.697501-27.977436H121.066652z" fill="#ffffff" p-id="15249"></path><path d="M439.006177 585.575056c0 12.715097-12.716339 25.436404-25.436404 25.436404H227.89309c-15.257371 0-25.430194-10.174065-25.430194-25.436404 0-12.715097 12.715097-25.435162 25.430194-25.435162h185.676683c15.262339 0 25.436404 10.172823 25.436404 25.435162zM296.56927 387.178309c-12.715097 0-25.435162-12.715097-25.435162-25.430195V176.071432c0-15.262339 10.177791-25.436404 25.435162-25.436404 12.720065 0 25.436404 12.715097 25.436404 25.436404v185.676682c0 15.257371-12.716339 25.430194-25.436404 25.430195z m178.044892-20.346888c-55.954873 0-99.19589-48.324324-99.19589-109.368713 0-61.045631 45.783292-109.374923 99.19589-109.374922 53.41384 0 99.200858 48.329292 99.200858 109.374922 0 61.044389-43.239775 109.368713-99.200858 109.368713z m0-167.872069c-27.977436 0-48.324324 25.436404-48.324324 58.503356s22.89413 58.497147 48.324324 58.497147c25.436404 0 48.329292-25.430194 48.329292-58.497147s-20.345646-58.503357-48.329292-58.503356zM698.447313 366.831421c-55.961082 0-99.19589-48.324324-99.195889-109.368713 0-61.045631 45.78205-109.374923 99.195889-109.374922s99.19589 48.329292 99.19589 109.374922c0 61.044389-43.239775 109.368713-99.19589 109.368713z m0-167.872069c-27.977436 0-48.329292 25.436404-48.329291 58.503356s22.89413 58.497147 48.329291 58.497147 48.324324-25.430194 48.324324-58.497147-20.346888-58.503357-48.324324-58.503356zM449.183968 783.966836c0 12.721307-12.720065 25.436404-25.436404 25.436404H238.072123c-15.263581 0-25.436404-10.174065-25.436404-25.436404 0-12.715097 12.715097-25.430194 25.436404-25.430194h185.675441c12.716339 2.542274 25.436404 12.715097 25.436404 25.430194zM675.553184 656.79351c-7.630549 0-12.715097-2.542274-17.804614-7.631791l-61.044388-61.044389c-10.172823-10.172823-10.172823-25.435162 0-35.609226 10.174065-10.172823 25.436404-10.172823 35.609226 0l45.78205 43.241017 106.832648-104.285406c10.172823-10.174065 25.430194-10.174065 35.609227 0 10.172823 10.172823 10.172823 25.435162 0 35.609227l-124.637262 122.088777c-7.625581 5.089516-12.715097 7.631791-20.346887 7.631791z m0 195.849505c-7.630549 0-12.715097-2.542274-17.804614-7.630548l-61.044388-61.045631c-10.172823-10.172823-10.172823-25.430194 0-35.609227 10.174065-10.172823 25.436404-10.172823 35.609226 0l45.78205 43.241018 106.832648-104.285407c10.172823-10.172823 25.430194-10.172823 35.609227 0 10.172823 10.177791 10.172823 25.436404 0 35.614195l-124.637262 122.085052c-7.625581 5.088274-12.715097 7.630549-20.346887 7.630548z" fill="#ffffff" p-id="15250"></path></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723863570227" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16336" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M838.582577 95.049109h-32.29256v98.523393c0 32.54856-26.514276 58.879979-59.245693 58.879979H276.955349c-32.694845 0-59.209122-26.331419-59.209121-58.879979V95.049109H185.417096A130.157668 130.157668 0 0 0 54.857143 224.877634V894.171109A130.157668 130.157668 0 0 0 185.417096 1023.999634h653.165481A130.157668 130.157668 0 0 0 969.142531 894.171109V224.841063a130.157668 130.157668 0 0 0-130.559954-129.828526z m-101.119964 654.95748H286.53706a52.370267 52.370267 0 0 1-52.553124-52.260552c0-28.891418 23.478849-52.260553 52.553124-52.260553h450.925553c29.074275 0 52.553124 23.405706 52.553124 52.260553 0 28.818275-23.551992 52.260553-52.553124 52.260552z m0-205.458212H286.53706a52.370267 52.370267 0 0 1-52.553124-52.260553c0-28.891418 23.478849-52.260553 52.553124-52.260553h450.925553c29.074275 0 52.553124 23.405706 52.553124 52.297125 0 28.891418-23.551992 52.223981-52.553124 52.223981z" fill="#ffffff" p-id="16337"></path><path d="M703.853483 184.539363H320.146191c-16.091423 0-29.257132-13.055995-29.257132-29.074276V29.074275c0-16.01828 13.16571-29.074275 29.257132-29.074275h383.707292c16.091423 0 29.257132 13.055995 29.257132 29.074275v126.390812c0 16.091423-13.16571 29.074275-29.257132 29.074276z" fill="#ffffff" p-id="16338"></path></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723863127018" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11805" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M512 972.8H153.6c-14.336 0-25.6-11.264-25.6-25.6V76.8c0-14.336 11.264-25.6 25.6-25.6h716.8c14.336 0 25.6 11.264 25.6 25.6v527.36c0 14.336 11.264 25.6 25.6 25.6s25.6-11.264 25.6-25.6V76.8c0-42.496-34.304-76.8-76.8-76.8H153.6c-42.496 0-76.8 34.304-76.8 76.8v870.4c0 42.496 34.304 76.8 76.8 76.8h358.4c14.336 0 25.6-11.264 25.6-25.6s-11.264-25.6-25.6-25.6z" fill="#ffffff" p-id="11806"></path><path d="M816.64 286.72c38.4 0 69.12-30.72 69.12-69.12S855.04 148.48 816.64 148.48 747.52 179.2 747.52 217.6c0 16.384 5.632 30.72 14.848 42.496L680.96 396.8c-5.632-1.536-11.776-2.56-17.92-2.56-14.336 0-28.16 4.608-38.912 12.288L493.568 270.848c8.192-14.336 13.312-30.72 13.312-48.128C506.88 170.496 464.384 128 412.16 128S317.44 170.496 317.44 222.72c0 20.992 6.656 39.936 17.92 55.296l-81.92 133.12c-5.12-1.024-10.24-2.048-15.36-2.048C199.68 409.6 168.96 440.32 168.96 478.72S199.68 547.84 238.08 547.84 307.2 517.12 307.2 478.72c0-14.336-4.096-27.136-11.264-37.888l80.384-130.56c11.264 4.608 23.552 7.168 36.352 7.168 15.872 0 31.232-4.096 44.544-11.264l138.24 143.872c-1.024 4.096-1.024 8.704-1.024 12.8 0 38.4 30.72 69.12 69.12 69.12S732.16 501.76 732.16 463.36c0-12.8-3.584-25.088-9.728-35.84l84.48-141.824c3.072 0.512 6.144 1.024 9.728 1.024z" fill="#ffffff" p-id="11807"></path><path d="M1018.88 808.96v-2.56-2.56c0-1.024 0-1.536-0.512-2.56 0-1.024-0.512-1.536-0.512-2.56 0-0.512-0.512-1.024-0.512-1.536 0 0 0-0.512-0.512-0.512-46.08-115.2-171.52-192-312.32-192s-266.24 77.312-312.32 192c0 0 0 0.512-0.512 0.512 0 0.512-0.512 1.024-0.512 1.536-0.512 1.024-0.512 2.048-1.024 2.56 0 1.024 0 1.536-0.512 2.56v5.12c0 1.024 0 1.536 0.512 2.56 0 1.024 0.512 2.048 1.024 2.56 0 0.512 0.512 1.024 0.512 1.536 0 0 0 0.512 0.512 0.512 46.08 115.2 171.52 192 312.32 192 141.312 0 266.752-77.312 312.832-193.024 0-0.512 0.512-1.024 0.512-2.048 0.512-1.024 0.512-1.536 0.512-2.56 0 0 0-0.512 0.512-1.536z m-314.368 148.48c-116.736 0-220.16-60.416-261.12-151.04 40.96-90.624 144.384-151.04 261.12-151.04s220.16 60.416 261.12 151.04c-40.96 91.136-144.384 151.04-261.12 151.04z" fill="#ffffff" p-id="11808"></path><path d="M704.512 714.752c-50.688 0-91.648 40.96-91.648 91.648s40.96 91.648 91.648 91.648c50.688 0 91.648-40.96 91.648-91.648s-40.96-91.648-91.648-91.648z m0 132.096c-22.528 0-40.448-17.92-40.448-40.448s17.92-40.448 40.448-40.448 40.448 17.92 40.448 40.448-17.92 40.448-40.448 40.448z" fill="#ffffff" p-id="11809"></path></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.6 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723863382511" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13069" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M277.8 462C176.2 462 95 380.7 95 279.2S176.2 96.4 277.8 96.4s182.8 81.2 182.8 182.8V462H277.8z m0 0" p-id="13070" fill="#ffffff"></path><path d="M279.8 492.4c-119.8 0-215.3-97.5-215.3-215.3 0-117.8 95.5-213.3 213.3-213.3 117.8 0 213.3 95.5 213.3 213.3v213.3l-211.3 2z m-2-367.6c-83.3 0-152.3 69.1-152.3 152.3 0 83.3 69.1 152.3 152.3 152.3h152.3V277.1c2.1-83.2-67-152.3-152.3-152.3z m0 436.7C176.2 561.5 95 642.7 95 744.3c0 101.6 81.2 182.8 182.8 182.8s182.8-81.2 182.8-182.8V561.5H277.8z m0 0" p-id="13071" fill="#ffffff"></path><path d="M277.8 959.6c-117.8 0-213.3-97.5-213.3-215.3C64.5 626.5 160 531 277.8 531H491v213.3c2.1 117.8-95.4 215.3-213.2 215.3z m0-367.7c-83.3 0-152.3 69.1-152.3 152.3 0 83.3 69.1 152.3 152.3 152.3 83.3 0 152.3-69.1 152.3-152.3V591.9H277.8z m0 0M744.9 561.5c101.6 0 182.8 81.2 182.8 182.8 0 101.6-81.2 182.8-182.8 182.8-101.6 0-182.8-81.2-182.8-182.8V561.5h182.8z m0 0" p-id="13072" fill="#ffffff"></path><path d="M744.9 959.6c-117.8 0-213.3-97.5-213.3-215.3V531h213.3c117.8 0 213.3 95.5 213.3 213.3 0 117.8-95.5 215.3-213.3 215.3zM592.6 591.9v152.3c0 83.3 69.1 152.3 152.3 152.3 83.3 0 152.3-69.1 152.3-152.3 0-83.3-69.1-152.3-152.3-152.3H592.6z m0 0M744.9 492.4H562.1c-8.1 0-16.2-4.1-22.3-8.1-6.1-4.1-8.1-16.3-8.1-24.4V277.1c0-117.8 95.5-213.3 213.3-213.3 117.8 0 213.3 95.5 213.3 213.3-0.1 117.8-95.6 215.3-213.4 215.3z m-152.3-62.9h152.3c83.3 0 152.3-69.1 152.3-152.3 0-83.3-69.1-152.3-152.3-152.3-83.3 0-152.3 69.1-152.3 152.3v152.3z m0 0" p-id="13073" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723862704717" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2726" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M526.130587 213.025725c-7.812854-8.171561-20.457517-8.163385-28.262196 0L190.812487 534.217325c-3.908982 4.088846-7.064782 11.970172-7.064782 17.619545L183.747705 959.616766l223.808383 0L407.556088 718.503601c0-56.47125 45.744798-102.250794 102.187433-102.250794l4.512958 0c56.436503 0 102.187433 45.773413 102.187433 102.250794L616.443912 959.616766l223.808383 0L840.252295 551.83687c0-5.641198-3.162954-13.537852-7.064782-17.619545L526.130587 213.025725z" p-id="2727" fill="#ffffff"></path><path d="M951.023138 491.245094 543.783856 77.72487c-17.529613-17.800431-46.061605-17.775904-63.567713 0L72.976862 491.245094c-11.571609 11.750451-11.439776 30.669924 0.294323 42.256862 11.735122 11.58796 30.629046 11.455106 42.200655-0.295345L512 130.563066l396.52816 402.643545c11.571609 11.750451 30.465533 11.882283 42.200655 0.295345C962.463936 521.915018 962.595768 502.995545 951.023138 491.245094z" p-id="2728" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -1,28 +1,14 @@
<template>
<div
:class="classObj"
class="app-wrapper"
:style="{ '--current-color': theme }"
>
<div class="title" style="height: 58px;background-color: #072048 !important;">
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div class="title" style="height: 58px; background-color: #072048 !important; z-index: 900 !important; position: relative">
<div class="navTitle">
<span class="nacber-name">天 择 数 字 营 销 实 训 系 统 </span>
</div>
<span class="nacber-name">天 择 数 字 营 销 实 训 系 统</span>
</div>
</div>
<div
v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg"
@click="handleClickOutside"
/>
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
class="main-container"
>
<div :class="{ 'fixed-header': fixedHeader }">
<!-- <navbar @setLayout="setLayout" />
<tags-view v-if="needTagsView" /> -->
</div>
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }"></div>
<app-main />
<settings ref="settingRef" />
</div>
@ -85,11 +71,6 @@ function setLayout() {
.app-wrapper {
@include clearfix;
position: relative;
// height: 100%;
// width: 100%;
background: url("@/assets/images/背景.png");
background-size: cover;
padding-bottom: 14px;
height: 100%;
width: 100%;
@ -118,19 +99,19 @@ function setLayout() {
margin-left: 33px;
margin-top: 3px;
letter-spacing: 1px;
}
}
}
.sidebar-container {
margin-top: 58px;
}
.main-container {
.caseData {
position: fixed;
right: 2%;
top: 10%;
z-index: 10000;
}
margin-top: 58px;
}
.main-container {
.caseData {
position: fixed;
right: 2%;
top: 10%;
z-index: 10000;
}
}
}
.drawer-bg {

@ -83,7 +83,7 @@ export const dynamicRoutes = [
path: "/index",
component: () => import("@/views/index"),
name: "Index",
meta: { title: "首页", icon: "dashboard", affix: true },
meta: { title: "首页", icon: "首页", affix: true },
},
],
},
@ -96,7 +96,7 @@ export const dynamicRoutes = [
path: "/digitalMarketTech",
component: () => import("@/views/digitalMarketTech/index"),
name: "digitalMarketTech",
meta: { title: "数字营销技术", icon: "dashboard", affix: true },
meta: { title: "数字营销技术", icon: "monitor2", affix: true },
},
],
},
@ -123,7 +123,7 @@ export const dynamicRoutes = [
path: "/portraitModel",
component: () => import("@/views/portraitModel/index"),
name: "portraitModel",
meta: { title: "用户画像模型", icon: "dashboard", affix: true },
meta: { title: "用户画像模型", icon: "智能算法", affix: true },
},
],
},
@ -136,7 +136,7 @@ export const dynamicRoutes = [
path: "/digitalMarketingAlgorithms",
component: () => import("@/views/digitalMarketingAlgorithms/index"),
name: "digitalMarketingAlgorithms",
meta: { title: "数字营销算法", icon: "dashboard", affix: true },
meta: { title: "数字营销算法", icon: "tongxunlu_B", affix: true },
},
],
},
@ -149,7 +149,7 @@ export const dynamicRoutes = [
path: "/learningResources",
component: () => import("@/views/learningCenter/learningResources.vue"),
name: "learningResources",
meta: { title: "资源中心", icon: "dashboard", affix: true },
meta: { title: "资源中心", icon: "资源中心", affix: true },
},
],
},
@ -162,7 +162,7 @@ export const dynamicRoutes = [
path: "/evaluation",
component: () => import("@/views/learningCenter/evaluation.vue"),
name: "evaluation",
meta: { title: "知识测评", icon: "dashboard", affix: true },
meta: { title: "知识测评", icon: "知识测评", affix: true },
},
],
},
@ -175,7 +175,7 @@ export const dynamicRoutes = [
path: "/Achievement",
component: () => import("@/views/learningCenter/Achievement.vue"),
name: "Achievement",
meta: { title: "学习成绩", icon: "dashboard", affix: true },
meta: { title: "学习成绩", icon: "学习成绩", affix: true },
},
],
},

@ -1,20 +1,61 @@
import { parseTime } from './ruoyi'
export function getAssetsFile(url){
import { parseTime } from "./ruoyi";
/**
* 通用分页函数
* @param {Array} data - 需要分页的数据源
* @param {Number} page - 当前页码
* @param {Number} pageSize - 每页显示的条目数
* @returns {Object} 分页结果,包含当前页的数据,页码信息,及总页数
*/
export function paginate(data, page = 1, pageSize = 10) {
// 计算总页数
const totalItems = data.length;
const totalPages = Math.ceil(totalItems / pageSize);
// 确保页码在有效范围内
const currentPage = Math.min(Math.max(page, 1), totalPages);
// 计算当前页的数据起始索引和结束索引
const startIndex = (currentPage - 1) * pageSize;
const endIndex = Math.min(startIndex + pageSize, totalItems);
// 获取当前页的数据片段
const pageData = data.slice(startIndex, endIndex);
return {
currentPage,
pageSize,
totalItems,
totalPages,
data: pageData,
};
}
export function getAssetsFile(url) {
return new URL(`../assets/images/${url}`, import.meta.url).href;
}
/**
* 表格时间格式化
*/
function isTimestamp(value) {
// 判断是否为数字类型且是否为整数
if (typeof value === "number" && Number.isInteger(value)) {
// 判断时间戳是否为13位
return value.toString().length === 13;
}
return false;
}
export function formatDate(cellValue) {
if (cellValue == null || cellValue == "") return "";
var date = new Date(cellValue)
var year = date.getFullYear()
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
// 判断是不是时间戳不是就返回
let time;
if (isTimestamp(cellValue)) {
var date = new Date(cellValue);
var year = date.getFullYear();
var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
var seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
time = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
} else {
time = cellValue;
}
return time;
}
/**
@ -23,40 +64,30 @@ export function formatDate(cellValue) {
* @returns {string}
*/
export function formatTime(time, option) {
if (('' + time).length === 10) {
time = parseInt(time) * 1000
if (("" + time).length === 10) {
time = parseInt(time) * 1000;
} else {
time = +time
time = +time;
}
const d = new Date(time)
const now = Date.now()
const d = new Date(time);
const now = Date.now();
const diff = (now - d) / 1000
const diff = (now - d) / 1000;
if (diff < 30) {
return '刚刚'
return "刚刚";
} else if (diff < 3600) {
// less 1 hour
return Math.ceil(diff / 60) + '分钟前'
return Math.ceil(diff / 60) + "分钟前";
} else if (diff < 3600 * 24) {
return Math.ceil(diff / 3600) + '小时前'
return Math.ceil(diff / 3600) + "小时前";
} else if (diff < 3600 * 24 * 2) {
return '1天前'
return "1天前";
}
if (option) {
return parseTime(time, option)
return parseTime(time, option);
} else {
return (
d.getMonth() +
1 +
'月' +
d.getDate() +
'日' +
d.getHours() +
'时' +
d.getMinutes() +
'分'
)
return d.getMonth() + 1 + "月" + d.getDate() + "日" + d.getHours() + "时" + d.getMinutes() + "分";
}
}
@ -65,18 +96,18 @@ export function formatTime(time, option) {
* @returns {Object}
*/
export function getQueryObject(url) {
url = url == null ? window.location.href : url
const search = url.substring(url.lastIndexOf('?') + 1)
const obj = {}
const reg = /([^?&=]+)=([^?&=]*)/g
url = url == null ? window.location.href : url;
const search = url.substring(url.lastIndexOf("?") + 1);
const obj = {};
const reg = /([^?&=]+)=([^?&=]*)/g;
search.replace(reg, (rs, $1, $2) => {
const name = decodeURIComponent($1)
let val = decodeURIComponent($2)
val = String(val)
obj[name] = val
return rs
})
return obj
const name = decodeURIComponent($1);
let val = decodeURIComponent($2);
val = String(val);
obj[name] = val;
return rs;
});
return obj;
}
/**
@ -85,14 +116,14 @@ export function getQueryObject(url) {
*/
export function byteLength(str) {
// returns the byte length of an utf8 string
let s = str.length
let s = str.length;
for (var i = str.length - 1; i >= 0; i--) {
const code = str.charCodeAt(i)
if (code > 0x7f && code <= 0x7ff) s++
else if (code > 0x7ff && code <= 0xffff) s += 2
if (code >= 0xDC00 && code <= 0xDFFF) i--
const code = str.charCodeAt(i);
if (code > 0x7f && code <= 0x7ff) s++;
else if (code > 0x7ff && code <= 0xffff) s += 2;
if (code >= 0xdc00 && code <= 0xdfff) i--;
}
return s
return s;
}
/**
@ -100,13 +131,13 @@ export function byteLength(str) {
* @returns {Array}
*/
export function cleanArray(actual) {
const newArray = []
const newArray = [];
for (let i = 0; i < actual.length; i++) {
if (actual[i]) {
newArray.push(actual[i])
newArray.push(actual[i]);
}
}
return newArray
return newArray;
}
/**
@ -114,13 +145,13 @@ export function cleanArray(actual) {
* @returns {Array}
*/
export function param(json) {
if (!json) return ''
if (!json) return "";
return cleanArray(
Object.keys(json).map(key => {
if (json[key] === undefined) return ''
return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
Object.keys(json).map((key) => {
if (json[key] === undefined) return "";
return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]);
})
).join('&')
).join("&");
}
/**
@ -128,21 +159,21 @@ export function param(json) {
* @returns {Object}
*/
export function param2Obj(url) {
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
const search = decodeURIComponent(url.split("?")[1]).replace(/\+/g, " ");
if (!search) {
return {}
return {};
}
const obj = {}
const searchArr = search.split('&')
searchArr.forEach(v => {
const index = v.indexOf('=')
const obj = {};
const searchArr = search.split("&");
searchArr.forEach((v) => {
const index = v.indexOf("=");
if (index !== -1) {
const name = v.substring(0, index)
const val = v.substring(index + 1, v.length)
obj[name] = val
const name = v.substring(0, index);
const val = v.substring(index + 1, v.length);
obj[name] = val;
}
})
return obj
});
return obj;
}
/**
@ -150,9 +181,9 @@ export function param2Obj(url) {
* @returns {string}
*/
export function html2Text(val) {
const div = document.createElement('div')
div.innerHTML = val
return div.textContent || div.innerText
const div = document.createElement("div");
div.innerHTML = val;
return div.textContent || div.innerText;
}
/**
@ -162,21 +193,21 @@ export function html2Text(val) {
* @returns {Object}
*/
export function objectMerge(target, source) {
if (typeof target !== 'object') {
target = {}
if (typeof target !== "object") {
target = {};
}
if (Array.isArray(source)) {
return source.slice()
return source.slice();
}
Object.keys(source).forEach(property => {
const sourceProperty = source[property]
if (typeof sourceProperty === 'object') {
target[property] = objectMerge(target[property], sourceProperty)
Object.keys(source).forEach((property) => {
const sourceProperty = source[property];
if (typeof sourceProperty === "object") {
target[property] = objectMerge(target[property], sourceProperty);
} else {
target[property] = sourceProperty
target[property] = sourceProperty;
}
})
return target
});
return target;
}
/**
@ -185,18 +216,16 @@ export function objectMerge(target, source) {
*/
export function toggleClass(element, className) {
if (!element || !className) {
return
return;
}
let classString = element.className
const nameIndex = classString.indexOf(className)
let classString = element.className;
const nameIndex = classString.indexOf(className);
if (nameIndex === -1) {
classString += '' + className
classString += "" + className;
} else {
classString =
classString.substr(0, nameIndex) +
classString.substr(nameIndex + className.length)
classString = classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length);
}
element.className = classString
element.className = classString;
}
/**
@ -204,10 +233,10 @@ export function toggleClass(element, className) {
* @returns {Date}
*/
export function getTime(type) {
if (type === 'start') {
return new Date().getTime() - 3600 * 1000 * 24 * 90
if (type === "start") {
return new Date().getTime() - 3600 * 1000 * 24 * 90;
} else {
return new Date(new Date().toDateString())
return new Date(new Date().toDateString());
}
}
@ -218,38 +247,38 @@ export function getTime(type) {
* @return {*}
*/
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result
let timeout, args, context, timestamp, result;
const later = function() {
const later = function () {
// 据上一次触发时间间隔
const last = +new Date() - timestamp
const last = +new Date() - timestamp;
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
if (last < wait && last > 0) {
timeout = setTimeout(later, wait - last)
timeout = setTimeout(later, wait - last);
} else {
timeout = null
timeout = null;
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) {
result = func.apply(context, args)
if (!timeout) context = args = null
result = func.apply(context, args);
if (!timeout) context = args = null;
}
}
}
};
return function(...args) {
context = this
timestamp = +new Date()
const callNow = immediate && !timeout
return function (...args) {
context = this;
timestamp = +new Date();
const callNow = immediate && !timeout;
// 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait)
if (!timeout) timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(context, args)
context = args = null
result = func.apply(context, args);
context = args = null;
}
return result
}
return result;
};
}
/**
@ -260,18 +289,18 @@ export function debounce(func, wait, immediate) {
* @returns {Object}
*/
export function deepClone(source) {
if (!source && typeof source !== 'object') {
throw new Error('error arguments', 'deepClone')
if (!source && typeof source !== "object") {
throw new Error("error arguments", "deepClone");
}
const targetObj = source.constructor === Array ? [] : {}
Object.keys(source).forEach(keys => {
if (source[keys] && typeof source[keys] === 'object') {
targetObj[keys] = deepClone(source[keys])
const targetObj = source.constructor === Array ? [] : {};
Object.keys(source).forEach((keys) => {
if (source[keys] && typeof source[keys] === "object") {
targetObj[keys] = deepClone(source[keys]);
} else {
targetObj[keys] = source[keys]
targetObj[keys] = source[keys];
}
})
return targetObj
});
return targetObj;
}
/**
@ -279,16 +308,16 @@ export function deepClone(source) {
* @returns {Array}
*/
export function uniqueArr(arr) {
return Array.from(new Set(arr))
return Array.from(new Set(arr));
}
/**
* @returns {string}
*/
export function createUniqueString() {
const timestamp = +new Date() + ''
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
return (+(randomNum + timestamp)).toString(32)
const timestamp = +new Date() + "";
const randomNum = parseInt((1 + Math.random()) * 65536) + "";
return (+(randomNum + timestamp)).toString(32);
}
/**
@ -298,7 +327,7 @@ export function createUniqueString() {
* @returns {boolean}
*/
export function hasClass(ele, cls) {
return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
return !!ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)"));
}
/**
@ -307,7 +336,7 @@ export function hasClass(ele, cls) {
* @param {string} cls
*/
export function addClass(ele, cls) {
if (!hasClass(ele, cls)) ele.className += ' ' + cls
if (!hasClass(ele, cls)) ele.className += " " + cls;
}
/**
@ -317,94 +346,91 @@ export function addClass(ele, cls) {
*/
export function removeClass(ele, cls) {
if (hasClass(ele, cls)) {
const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)')
ele.className = ele.className.replace(reg, ' ')
const reg = new RegExp("(\\s|^)" + cls + "(\\s|$)");
ele.className = ele.className.replace(reg, " ");
}
}
export function makeMap(str, expectsLowerCase) {
const map = Object.create(null)
const list = str.split(',')
const map = Object.create(null);
const list = str.split(",");
for (let i = 0; i < list.length; i++) {
map[list[i]] = true
map[list[i]] = true;
}
return expectsLowerCase
? val => map[val.toLowerCase()]
: val => map[val]
return expectsLowerCase ? (val) => map[val.toLowerCase()] : (val) => map[val];
}
export const exportDefault = 'export default '
export const exportDefault = "export default ";
export const beautifierConf = {
html: {
indent_size: '2',
indent_char: ' ',
max_preserve_newlines: '-1',
indent_size: "2",
indent_char: " ",
max_preserve_newlines: "-1",
preserve_newlines: false,
keep_array_indentation: false,
break_chained_methods: false,
indent_scripts: 'separate',
brace_style: 'end-expand',
indent_scripts: "separate",
brace_style: "end-expand",
space_before_conditional: true,
unescape_strings: false,
jslint_happy: false,
end_with_newline: true,
wrap_line_length: '110',
wrap_line_length: "110",
indent_inner_html: true,
comma_first: false,
e4x: true,
indent_empty_lines: true
indent_empty_lines: true,
},
js: {
indent_size: '2',
indent_char: ' ',
max_preserve_newlines: '-1',
indent_size: "2",
indent_char: " ",
max_preserve_newlines: "-1",
preserve_newlines: false,
keep_array_indentation: false,
break_chained_methods: false,
indent_scripts: 'normal',
brace_style: 'end-expand',
indent_scripts: "normal",
brace_style: "end-expand",
space_before_conditional: true,
unescape_strings: false,
jslint_happy: true,
end_with_newline: true,
wrap_line_length: '110',
wrap_line_length: "110",
indent_inner_html: true,
comma_first: false,
e4x: true,
indent_empty_lines: true
}
}
indent_empty_lines: true,
},
};
// 首字母大小
export function titleCase(str) {
return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
return str.replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
}
// 下划转驼峰
export function camelCase(str) {
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
return str.replace(/_[a-z]/g, (str1) => str1.substr(-1).toUpperCase());
}
export function isNumberStr(str) {
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str);
}
//文件下载
export function downBlobFile(fileName, fileBlob) {
const link = document.createElement('a')
const link = document.createElement("a");
try {
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,type格式根据返回文件不同修改
const blob = fileBlob
const _fileName = fileName // 拆解获取文件名,如果后端没返回文件格式,则需要自己拼接文件后缀
link.style.display = 'none'
const blob = fileBlob;
const _fileName = fileName; // 拆解获取文件名,如果后端没返回文件格式,则需要自己拼接文件后缀
link.style.display = "none";
// 兼容浏览器
const url = window.URL || window.webkitURL || window.moxURL
link.href = url.createObjectURL(blob) // 如果没设置axios请求reponseType为‘blob’的话,则参数应为new Blob(文件流),否则报错
link.download = _fileName // 下载的文件名称
link.click()
window.URL.revokeObjectURL(url) // #URL.revokeObjectURL()方法会释放一个通过URL.createObjectURL()创建的对象URL. 当你要已经用过了这个对象URL,然后要让浏览器知道这个URL已经不再需要指向对应的文件的时候,就需要调用这个方法.
const url = window.URL || window.webkitURL || window.moxURL;
link.href = url.createObjectURL(blob); // 如果没设置axios请求reponseType为‘blob’的话,则参数应为new Blob(文件流),否则报错
link.download = _fileName; // 下载的文件名称
link.click();
window.URL.revokeObjectURL(url); // #URL.revokeObjectURL()方法会释放一个通过URL.createObjectURL()创建的对象URL. 当你要已经用过了这个对象URL,然后要让浏览器知道这个URL已经不再需要指向对应的文件的时候,就需要调用这个方法.
} catch (error) {
console.error(error.message)
console.error(error.message);
}
}

@ -17,8 +17,9 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
// baseURL: import.meta.env.VITE_APP_BASE_API,
baseURL:'http://118.31.7.2:9868/',
// baseURL:'http://192.168.2.28:9868/',
// 超时
timeout: 10000
timeout: 100000
})
// request拦截器
service.interceptors.request.use(config => {

@ -1,6 +1,6 @@
<template>
<div class="app-containerO">
<iframe src="https://www.aigcwhere.com/" frameborder="0"></iframe>
<iframe src="https://pidoutv.com/" frameborder="0"></iframe>
</div>
</template>

@ -1,83 +1,74 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2024-08-16 17:56:32
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2024-08-16 17:59:16
* @FilePath: \vue3\src\views\digitalMarketTech\AIGCLargeModel\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="app-top">
<el-button v-for="(item,index) in imgData" :key="index" :class="item.img" @click="clickIndx(index)">{{item.text}}</el-button>
</div>
<div class="app-top">
<el-button v-for="(item, index) in imgData" :key="index" :class="item.img" @click="clickIndx(index)">{{ item.text }}</el-button>
</div>
<component :is="page"></component>
</template>
<script setup>
import AIVenison from './components/AIVenisonDiagram.vue'
import AIGC from './components/thirdPartyAIGC.vue'
const pageData=[AIVenison,null,null,null,null,AIGC]
const page=ref(AIVenison)
const clickIndx=(index)=>{
page.value=pageData[index]
}
const imgData=[
{
text:'AI文生图',
img:'wst'
},{
text:'AI文章',
img:'wz'
},{
text:'AI标题',
img:'bt'
},{
text:'AI修图',
img:'xt'
},{
text:'AI视频',
img:'sp'
},{
text:'第三方AIGC大模型',
img:'dmx'
},
]
import AIVenison from "./components/AIVenisonDiagram.vue";
import AIGC from "./components/thirdPartyAIGC.vue";
const pageData = [AIVenison, null, null, null, null, AIGC];
const page = ref(AIVenison);
const clickIndx = (index) => {
page.value = pageData[index];
};
const imgData = [
{
text: "AI文生图",
img: "wst",
},
{
text: "AI文章",
img: "wz",
},
{
text: "AI标题",
img: "bt",
},
{
text: "AI修图",
img: "xt",
},
{
text: "AI视频",
img: "sp",
},
];
</script>
<style lang="scss" scoped>
.content{
color: #fff;
.content {
color: #fff;
}
.app-top{
background: #041C49;
padding: 10px;
margin: 10px 0px -9px 10px;;
.app-top {
background: #041c49;
padding: 10px;
margin: 10px 0px -9px 10px;
}
.el-button{
width: 160px;
height: 36px;
color: #FFFFFF;
border-color:#FFFFFF00;
padding: 8px 0px 8px 32px;
background-size: 100% 100% !important;
.el-button {
width: 160px;
height: 36px;
color: #ffffff;
border-color: #ffffff00;
padding: 8px 0px 8px 32px;
background-size: 100% 100% !important;
}
.wst{
background: url('@/assets/images/1.png');
.wst {
background: url("@/assets/images/1.png");
}
.wz{
background: url('@/assets/images/2.png');
.wz {
background: url("@/assets/images/2.png");
}
.bt{
background: url('@/assets/images/3.png');
.bt {
background: url("@/assets/images/3.png");
}
.xt{
background: url('@/assets/images/4.png');
.xt {
background: url("@/assets/images/4.png");
}
.sp{
background: url('@/assets/images/5.png');
.sp {
background: url("@/assets/images/5.png");
}
.dmx{
background: url('@/assets/images/6.png');
.dmx {
background: url("@/assets/images/6.png");
}
</style>

@ -1,5 +1,5 @@
<template>
<div class="app-main">
<div class="app-main" v-loading="loading">
<div class="main-left">
<div class="left-top">
<img style="width: 26px; height: 26px" src="../../../assets/images/图标1.png" alt="" />
@ -15,14 +15,24 @@
<span>自建表</span>
</div>
<div class="left-item">
<div v-for="(item, index) in zjData" :key="index" class="item" :class="{ 'is-active': zjIndex === index }" @click="goZJ(index)">
<span>{{ item }}</span>
<div class="metrics">
<el-select v-model="n_dataTableQuery.selfTableName" placeholder="请选择数据" style="width: 180px" @change="selectType">
<el-option v-for="item in zjData" :key="item" :label="item" :value="item" />
</el-select>
</div>
</div>
<div class="left-button">
<input type="file" ref="fileData" style="display: none" @change="importData" />
<el-button round type="primary" @click="$refs.fileData.click()">导入</el-button>
</div>
</div>
<div class="main-right">
<el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle">
<el-table-column v-for="column in tableLabel" :key="column" :prop="column.prop" :label="column.label" align="center" />
<el-table-column v-for="column in tableLabel" :key="column" :prop="column.prop" :label="column.label" align="center">
<template #default="{ row }">
{{ formatDate(row[column.prop])?? '...' }}
</template>
</el-table-column>
</el-table>
<pagination v-show="datatotal > 0" :total="datatotal" v-model:page="n_dataTableQuery.index" v-model:limit="n_dataTableQuery.size" @pagination="getSurface" style="margin-top: 10px" />
</div>
@ -30,25 +40,30 @@
</template>
<script setup>
import * as portraitModel from "@/api/portraitModel";
import * as marketingAlgorithmApi from "@/api/marketing-algorithm";
import { formatDate } from "@/utils/index.js";
import useUserStore from "@/store/modules/user";
import useAlgorithmStore from "@/store/modules/algorithm.js";
import { ref } from "vue";
const { proxy } = getCurrentInstance();
import { getUserInfo } from "@/utils/auth";
const userInfo = JSON.parse(getUserInfo());
const loading = ref(false);
const fileData = ref(null);
const userStore = useUserStore();
const algorithmStore = useAlgorithmStore();
// 数据表query
const n_dataTableQuery = ref({
index: 1,
size: 20,
size: 7,
tableName: "用户属性表",
userId: userStore.userInfo.userId,
userId: userInfo.userId,
});
const datatotal = ref(0);
const nzIndex = ref(0);
const nzData = ["用户属性表", "用户登录活跃表", "用户消费能力表", "用户行为表", "用户评论表"];
const zjIndex = ref(-1);
const zjData = ["用户属性表", "用户登录活跃表", "用户消费能力表", "用户行为表", "用户评论表"];
const tableLabel = reactive([
const zjData = ref([]);
const tableLabel = ref([
{ prop: "id", label: "用户ID" },
{ prop: "loginName", label: "登录名" },
{ prop: "userName", label: "用户姓名" },
@ -62,10 +77,28 @@ const tableLabel = reactive([
{ prop: "updateTime", label: "注册时间" },
{ prop: "location", label: "所在地" },
]);
const tableLabel2 = ref([]);
const arrhander = ref([]);
const arrhanderkey = ref([]);
const goNZ = (index, item) => {
nzIndex.value = index;
zjIndex.value = -1;
tableLabel.value = [
{ prop: "id", label: "用户ID" },
{ prop: "loginName", label: "登录名" },
{ prop: "userName", label: "用户姓名" },
{ prop: "studentId", label: "学号" },
{ prop: "stuClass", label: "班级" },
{ prop: "major", label: "专业" },
{ prop: "school", label: "学校" },
{ prop: "roleName", label: "角色名称" },
{ prop: "roleGender", label: "角色性别" },
{ prop: "roleAge", label: "角色年龄" },
{ prop: "updateTime", label: "注册时间" },
{ prop: "location", label: "所在地" },
];
n_dataTableQuery.value.tableName = item;
delete n_dataTableQuery.value.selfTableName;
getSurface();
};
const goZJ = (index) => {
@ -73,22 +106,60 @@ const goZJ = (index) => {
nzIndex.value = -1;
};
const tableData = ref([]);
const headerCellStyle = () => {
return {
color: "#ffffff !important",
};
};
// 选择内置或自建
const selectType = (type) => {};
const selectType = (type) => {
delete n_dataTableQuery.value.tableName;
getSurface();
nzIndex.value = -1;
};
const getSurface = () => {
portraitModel.getUserTableData(n_dataTableQuery.value).then((res) => {
tableData.value = res?.data?.list;
datatotal.value = res.data.total;
tableLabel2.value = [];
if (tableData.value[0]?.stepOneA) {
arrhander.value = JSON.parse(tableData.value[0].stepOneA);
arrhanderkey.value = Object.keys(tableData.value[0]).slice(2, arrhander.value.length + 2);
arrhander.value.forEach((item, index) => {
tableLabel2.value.push({
prop: arrhanderkey.value[index],
label: item,
});
});
tableLabel.value = tableLabel2.value;
}
});
};
// 导入
const importData = (e) => {
loading.value = true;
const files = e.target.files[0];
const formdata = new FormData();
formdata.append("file", files);
formdata.append("userId", userInfo.userId);
marketingAlgorithmApi.getMarketingAlgorithmImport(formdata).then((res) => {
loading.value = false;
proxy.$modal.msgSuccess("导入成功");
});
};
//选择自建表
const selectZJ = (item) => {
marketingAlgorithmApi.getMarketingAlgorithmTable();
};
// 查询自建下拉框
const getZJData = () => {
marketingAlgorithmApi.getMarketingAlgorithmTable({ userId: userInfo.userId }).then((res) => {
zjData.value = res?.data;
});
};
onMounted(() => {
getSurface();
getZJData();
});
</script>
@ -135,6 +206,44 @@ onMounted(() => {
color: #ffffff;
}
}
.metrics {
padding: 0px 7px !important;
:deep(.el-input) {
.el-input__wrapper {
background-color: #ffffff00;
background-image: url("../../../assets/images/下拉框.png");
background-size: 100% 100%;
}
--el-input-text-color: #ffffff;
--el-input-border-color: #ffffff00;
--el-input-hover-border-color: #ffffff00;
--el-input-hover-border: #ffffff00;
--el-select-border-color-hover: #ffffff00;
--el-select-input-focus-border-color: #ffffff00;
--el-input-placeholder-color: #ffffff;
.el-input__inner {
color: #ffffff;
}
}
}
}
.left-button {
width: 195px;
height: 31px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-top: 20px !important;
:deep(.el-button) {
width: 149px;
height: 48px;
background: url("../../../assets/images/确定.png");
color: #ffffff;
border-color: #ffffff00;
background-size: 100% 100%;
margin: 15px;
}
}
}
.main-right {

@ -1,5 +1,5 @@
<template>
<el-scrollbar height="800px">
<el-scrollbar ref="scrollbar" height="800px">
<div class="main-top">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;">任务描述</span>
<p style="font-weight: 400;font-size: 12px;color: #E6E6E6;">(给出任务清单参考,做哪些数据的统计分析)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
@ -44,7 +44,7 @@
</el-table>
<el-button @click="taskZB">确定</el-button>
</div>
<div class="left-top">
<div class="left-top" style="margin-top:50px">
<span>二、数据预处理</span>
</div>
<div class="metrics">
@ -67,7 +67,7 @@
/>
</el-select>
</div>
<div class="left-top" style="margin-top: 10px">
<div class="left-top" style="margin-top: 50px">
<span>三、模型参数设置</span>
</div>
<div class="metrics-table" style="margin-top: 10px">
@ -100,7 +100,7 @@
</div>
</div>
<div style="margin-top: auto;">
<div class="startOver">
<div class="startOver" @click="startOver()">
<img src="../../../assets/images/重新开始.png" alt="">
<span>重新开始</span>
</div>
@ -118,19 +118,19 @@
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果:</span>
<el-button>下载</el-button>
<el-table :data="tableData" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table :data="tableData3" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
</el-table>
<el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" />
</div>
<div style="margin-top:20px;gap:25px;display: flex;">
<div style="margin-top:20px;gap:25px;display: flex;" v-show="showChart">
<!-- <img src="../../../assets/images/图1.png" alt=""> -->
<div style="background:#FFFFFF;">
<div id="main" style="width: 500px;height: 500px;"></div>
</div>
<div style="background:#FFFFFF;">
<div id="main" style="width: 500px;height: 500px;"></div>
<div id="main2" style="width: 500px;height: 500px;"></div>
</div>
</div>
@ -209,172 +209,97 @@ const { proxy } = getCurrentInstance()
})
})
}
const showChart=ref(false)
const scrollbar = ref(null);
const fileList=ref([])
const handleChange=(info)=>{
fileList.value.push(info);
}
const flag=ref(false)
let myChart;
let myChart2;
//随机颜色
const getRandomColorHex = () => {
const randomValue = () => {
// 生成 0 到 255 之间的随机整数
const value = Math.floor(Math.random() * 256);
// 将整数转换为两位十六进制形式
return value.toString(16).padStart(2, '0');
};
// 生成RGB颜色
let r = randomValue();
let g = randomValue();
let b = randomValue();
// 确保颜色与红色对比度较大
while (parseInt(r, 16) > 200 && parseInt(g, 16) < 50 && parseInt(b, 16) < 50) {
r = randomValue();
g = randomValue();
b = randomValue();
}
return `#${r}${g}${b}`;
};
//图标添加数据
const addData = (myChart, newData,color) => {
// 获取当前的数据
let currentData = myChart.getOption().series[0].data||[];
// 添加新数据集,并为每个数据点单独设置颜色
newData.forEach(dataPoint => {
currentData.push({
value: [dataPoint.x, dataPoint.y],
itemStyle: { color: color }
});
});
// 更新图表
myChart.setOption({
series: [
{
data: currentData
}
]
});
};
onMounted(()=>{
getList()
var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;
echarts.registerTransform(ecStat.transform.clustering);
const data = [
[3.275154, 2.957587],
[-3.344465, 2.603513],
[0.355083, -3.376585],
[1.852435, 3.547351],
[-2.078973, 2.552013],
[-0.993756, -0.884433],
[2.682252, 4.007573],
[-3.087776, 2.878713],
[-1.565978, -1.256985],
[2.441611, 0.444826],
[-0.659487, 3.111284],
[-0.459601, -2.618005],
[2.17768, 2.387793],
[-2.920969, 2.917485],
[-0.028814, -4.168078],
[3.625746, 2.119041],
[-3.912363, 1.325108],
[-0.551694, -2.814223],
[2.855808, 3.483301],
[-3.594448, 2.856651],
[0.421993, -2.372646],
[1.650821, 3.407572],
[-2.082902, 3.384412],
[-0.718809, -2.492514],
[4.513623, 3.841029],
[-4.822011, 4.607049],
[-0.656297, -1.449872],
[1.919901, 4.439368],
[-3.287749, 3.918836],
[-1.576936, -2.977622],
[3.598143, 1.97597],
[-3.977329, 4.900932],
[-1.79108, -2.184517],
[3.914654, 3.559303],
[-1.910108, 4.166946],
[-1.226597, -3.317889],
[1.148946, 3.345138],
[-2.113864, 3.548172],
[0.845762, -3.589788],
[2.629062, 3.535831],
[-1.640717, 2.990517],
[-1.881012, -2.485405],
[4.606999, 3.510312],
[-4.366462, 4.023316],
[0.765015, -3.00127],
[3.121904, 2.173988],
[-4.025139, 4.65231],
[-0.559558, -3.840539],
[4.376754, 4.863579],
[-1.874308, 4.032237],
[-0.089337, -3.026809],
[3.997787, 2.518662],
[-3.082978, 2.884822],
[0.845235, -3.454465],
[1.327224, 3.358778],
[-2.889949, 3.596178],
[-0.966018, -2.839827],
[2.960769, 3.079555],
[-3.275518, 1.577068],
[0.639276, -3.41284]
];
const redPoints = [
[4, 3], // 红色点1的坐标
[-4, -4], // 红色点2的坐标
[2, -2] // 红色点3的坐标
];
var CLUSTER_COUNT = 6;
var DIENSIION_CLUSTER_INDEX = 2;
var COLOR_ALL = [
'#37A2DA',
'#e06343',
'#37a354',
'#b55dba',
'#b5bd48',
'#8378EA',
'#96BFFF'
];
var pieces = [];
for (var i = 0; i < CLUSTER_COUNT; i++) {
pieces.push({
value: i,
label: 'cluster ' + i,
color: COLOR_ALL[i]
});
}
option = {
dataset: [
{
source: data
},
{
transform: {
type: 'ecStat:clustering',
// print: true,
config: {
clusterCount: CLUSTER_COUNT,
outputType: 'single',
outputClusterIndexDimension: DIENSIION_CLUSTER_INDEX
}
var chartDom2 = document.getElementById('main2');
myChart = echarts.init(chartDom);
myChart2 = echarts.init(chartDom2);
// 初始化图表配置
var option = {
dataset: [
{
source: [] // 初始时数据为空
}
}
],
tooltip: {
position: 'top'
},
visualMap: {
show: false,
type: 'piecewise',
// top: 'middle',
min: 0,
max: CLUSTER_COUNT,
left: 10,
splitNumber: CLUSTER_COUNT,
dimension: DIENSIION_CLUSTER_INDEX,
pieces: pieces
},
grid: {
left: 120
},
xAxis: {},
yAxis: {},
series: [
{
type: 'scatter',
encode: { tooltip: [0, 1] },
symbolSize: 15,
itemStyle: {
borderColor: '#555'
},
datasetIndex: 1
],
tooltip: {
position: 'top'
},
{
type: 'scatter',
data: redPoints,
symbolSize: 15,
symbol: 'circle',
itemStyle: {
color: 'red', // 填充颜色
borderColor: 'red', // 边框颜色
opacity: 1 // 设置为不透明
},
tooltip: {
formatter: function (params) {
return params.value[0] + ' ' + params.value[1]; // 显示 X 和 Y 轴的值
xAxis: {},
yAxis: {},
series: [
{
type: 'scatter',
encode: { tooltip: [0, 1] },
symbolSize: 15,
itemStyle: {
borderColor: '#555'
}
}
}
]
};
]
};
option && myChart.setOption(option);
// 设置初始的配置
myChart.setOption(option);
myChart2.setOption(option);
})
const optionData=()=>{
API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value}).then((res)=>{
API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value,algorithmName:'聚类分析'}).then((res)=>{
tableData.value=[]
res.data.forEach(element => {
tableData.value.push({
@ -388,10 +313,11 @@ option && myChart.setOption(option);
selectedRows.value = selection;
};
const tableData2=ref([])
const tableData3=ref([])
const resTable2=ref()
const taskZB=()=>{
flag.value=true
if(!selectedRows.value){
if(selectedRows.value.length===0){
return
}
const sendData={
@ -470,6 +396,8 @@ const resTable2=ref()
})
}
}
//生产表格
const computation=()=>{
if(input5.value&&input6.value&&input4.value){
const sendData={
@ -478,11 +406,100 @@ const resTable2=ref()
userId:JSON.parse(getUserInfo()).userId,
deduplicatedDataList:resTable2.value
}
API.clusterAnalysis(sendData).then((res)=>{
API.clusterAnalysisPlot(sendData).then((res)=>{
showChart.value=true
let sex=1
tableData3.value=[]
res.data.forEach((item,index)=>{
const newItem = {};
tableLabel.forEach((label,index) => {
if(index===0){
newItem[label.prop] = '簇'+sex; // 动态设置字段名
}else{
newItem[label.prop] =''
}
});
newItem['TSuid']=sex
sex++
tableData3.value.push(newItem);
tableData3.value[index].children=[]
const children=ref([])
item.forEach((item2,sexx)=>{
const newItem2 = {};
tableLabel.forEach((label,index2) => {
newItem2[label.prop] = item2[index2]; // 动态设置字段名
});
newItem2['TSuid']=''+sex+sexx
children.value.push(newItem2)
})
tableData3.value[index].children=children.value
console.log(tableData3.value);
})
}).then(()=>{
API.clusterAnalysis(sendData).then((res)=>{
myChart.setOption({
series: [
{
data: [] // 清空数据
}
]
});
myChart2.setOption({
series: [
{
data: [] // 清空数据
}
]
});
Object.keys(res.data.dataSet).forEach(key => {
const bgColor=getRandomColorHex()
addData(myChart, res.data.dataSet[key],bgColor);
addData(myChart2, res.data.dataSet[key],bgColor);
});
Object.keys(res.data.centroid).forEach(key => {
addData(myChart2, res.data.centroid[key],'red');
});
})
})
nextTick(() => {
setTimeout(() => {
const scrollContainer = scrollbar.value?.$el.querySelector('.el-scrollbar__wrap');
if (scrollContainer) {
scrollContainer.scrollTo({
top: scrollContainer.scrollHeight,
behavior: 'smooth' // 平滑滚动
});
}
}, 10);
});
}
}
const startOver=()=>{
myChart.setOption({
series: [
{
data: [] // 清空数据
}
]
});
myChart2.setOption({
series: [
{
data: [] // 清空数据
}
]
});
input.value=''
tableData.value=[]
tableData2.value=[]
tableData3.value=[]
input2.value=''
input3.value=''
input4.value=''
input5.value=''
input6.value=''
showChart.value=false
}
</script>
<style lang="scss" scoped>
@ -637,9 +654,15 @@ const resTable2=ref()
.dialog-footer{
margin-bottom: 20px;
}
:deep(.el-table__expand-icon){
color: #9126FE;
.el-icon{
font-size: 16px;
}
}
</style>
<style lang="scss">
.el-dialog{
.dialogClass{
background:url('../../../assets/images/弹框.png') !important;
background-size: 100% 100% !important;
.el-dialog__header{

@ -1,89 +1,88 @@
<template>
<el-scrollbar height="800px">
<div class="main-top">
<span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
<p style="font-weight: 400; font-size: 12px; color: #e6e6e6">(给出任务清单参考,做哪些数据的统计分析)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
</div>
<div class="main-but">
<el-button>
<img src="../../../assets/images/导入.png" alt="" />
算法知识导入
</el-button>
<el-button @click="taskSubmit">
<img src="../../../assets/images/提交.png" alt="" />
实训任务提交
</el-button>
</div>
<div class="app-main">
<div class="main-left">
<div>
<div class="left-top">
<span>一、选择指标</span>
</div>
<div class="metrics">
<el-select v-model="input" placeholder="请选择数据" style="width: 180px" @change="selectType">
<el-option v-for="item in algorithmStore.userDataLabel" :key="item" :label="item" :value="item" />
</el-select>
</div>
<div class="metrics-table" style="margin-top: 10px">
<el-table border :data="algorithmStore.indexLibrary" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handleSelectionChange">
<el-table-column type="selection" prop="date" label="Date" align="center" />
<el-table-column label="指标" align="center" prop="label" />
</el-table>
<el-button @click="submit">确定</el-button>
</div>
<div class="left-top">
<span>二、数据预处理</span>
</div>
<div class="metrics">
<el-select v-model="preProcessText.text1" placeholder="请选择数据" style="width: 180px">
<el-option label="数据去重" value="数据去重" />
</el-select>
</div>
<div class="metrics" style="margin-top: 15px">
<el-select v-model="preProcessText.text2" placeholder="请选择数据" style="width: 180px" @change="preProcess">
<el-option label="缺失值处理-剔除数据" value="缺失值处理-剔除数据" />
<el-option label="缺失值处理一均值替代" value="缺失值处理一均值替代" />
</el-select>
</div>
<div class="left-top" style="margin-top: 10px">
<span>三、模型参数设置</span>
</div>
<div class="metrics-table" style="margin-top: 10px">
<el-table border :data="modelParams" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handlemodelSelectionChange">
<el-table-column type="selection" prop="date" label="Date" align="center" />
<el-table-column prop="name" label="统计量" align="center" />
</el-table>
<el-button @click="modelCalculation">计算</el-button>
</div>
<!-- <el-scrollbar height="800px" v-loading="loading"> -->
<div class="main-top">
<span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
<p style="font-weight: 400; font-size: 12px; color: #e6e6e6">(给出任务清单参考,做哪些数据的统计分析)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
</div>
<div class="main-but">
<el-button @click="knowledgeImport">
<img src="../../../assets/images/导入.png" alt="" />
算法知识导入
</el-button>
<el-button @click="taskSubmit">
<img src="../../../assets/images/提交.png" alt="" />
实训任务提交
</el-button>
</div>
<div class="app-main">
<div class="main-left">
<div>
<div class="left-top">
<span>一、选择指标</span>
</div>
<div style="margin-top: auto">
<div class="startOver">
<img src="../../../assets/images/重新开始.png" alt="" />
<span>重新开始</span>
</div>
<div class="metrics">
<el-select v-model="n_dataTableQuery.tableName" placeholder="请选择数据" style="width: 180px" @change="selectType">
<el-option v-for="item in algorithmStore.userDataLabel" :key="item" :label="item" :value="item" />
</el-select>
</div>
</div>
<div class="main-right">
<div>
<span style="font-weight: bold; font-size: 18px; color: #3596eb">分析数据:</span>
<el-table :data="analysisData" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle">
<el-table-column v-for="column in analysisHanderKry" :key="column" :prop="column" :label="column" align="center" />
<div class="metrics-table" style="margin-top: 10px">
<el-table border ref="multipleTableRef" :data="algorithmStore.indexLibrary" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handleSelectionChange">
<el-table-column type="selection" prop="date" label="Date" align="center" />
<el-table-column label="指标" align="center" prop="label" />
</el-table>
<!-- <pagination v-show="datatotal > 0" :total="datatotal" v-model:page="dataqueryParams.index" v-model:limit="dataqueryParams.size" @pagination="submit" style="margin-top: 10px" /> -->
<el-button @click="submit">确定</el-button>
</div>
<div class="left-top">
<span>二、数据预处理</span>
</div>
<div class="metrics">
<el-select v-model="preProcessText.text1" placeholder="请选择数据" style="width: 180px">
<el-option label="数据去重" value="数据去重" />
</el-select>
</div>
<div class="metrics" style="margin-top: 15px">
<el-select v-model="preProcessText.text2" placeholder="请选择数据" style="width: 180px" @change="preProcess">
<el-option label="缺失值处理-剔除数据" value="缺失值处理-剔除数据" />
<el-option label="缺失值处理一均值替代" value="缺失值处理一均值替代" />
</el-select>
</div>
<div class="left-top" style="margin-top: 10px">
<span>三、模型参数设置</span>
</div>
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果:</span>
<el-button>下载</el-button>
<el-table :data="tableData" style="width: 94%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.label" :prop="column.label" :label="column.label" align="center"></el-table-column>
<p v-for="column in tableLabel" :key="column.label">{{ column.label }}</p>
<div class="metrics-table" style="margin-top: 10px">
<el-table border ref="multipleTableRef" :data="modelParams" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handlemodelSelectionChange">
<el-table-column type="selection" prop="date" label="Date" align="center" />
<el-table-column prop="name" label="统计量" align="center" />
</el-table>
<el-pagination style="margin-top: 10px" background layout="prev, pager, next" :total="1000" />
<el-button @click="modelCalculation">计算</el-button>
</div>
</div>
<div style="margin-top: auto">
<div class="startOver" @click="restart">
<img src="../../../assets/images/重新开始.png" alt="" />
<span>重新开始</span>
</div>
</div>
</div>
</el-scrollbar>
<div class="main-right">
<div>
<span style="font-weight: bold; font-size: 18px; color: #3596eb">分析数据:</span>
<el-table :data="analysisData" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle">
<el-table-column v-for="column in analysisHanderKry" :key="column" :prop="column" :label="column" align="center" />
</el-table>
<pagination v-show="n_analyzeTheNumberOfDataItems > 0" :total="n_analyzeTheNumberOfDataItems" v-model:page="n_dataTableQuery.index" v-model:limit="n_dataTableQuery.size" @pagination="analyzeDataNext" />
</div>
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果:</span>
<el-button>下载</el-button>
<el-table :data="tableData" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.label" :prop="column.prop" :label="column.label" align="center"></el-table-column>
</el-table>
<pagination v-show="nNumberOfAnalysisResults > 0" :total="nNumberOfAnalysisResults" v-model:page="gAnalysisResults.index" v-model:limit="gAnalysisResults.size" @pagination="updatePageAnalysisResults" />
</div>
</div>
</div>
<!-- </el-scrollbar> -->
<el-dialog v-model="dialogVisible" title="实训任务提交" width="565" custom-class="dialogClass" :show-close="false">
<template #header="{ close, titleId, titleClass }">
<div class="my-header">
@ -95,67 +94,95 @@
<div class="from-item">
<el-form :inline="true" label-position="right" label-width="84px" :model="form" class="demo-form-inline">
<el-form-item label="平均数:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.average" clearable />
</el-form-item>
<el-form-item label="众数:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.mode" clearable />
</el-form-item>
<el-form-item label="中位数:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.median" clearable />
</el-form-item>
<el-form-item label="标准差:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.standardDeviation" clearable />
</el-form-item>
<el-form-item label="方差:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.variance" clearable />
</el-form-item>
<el-form-item label="峰度:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.kurtosis" clearable />
</el-form-item>
<el-form-item label="标准误差:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.standardError" clearable />
</el-form-item>
<el-form-item label="偏度:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.skewness" clearable />
</el-form-item>
<el-form-item label="最大值:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.max" clearable />
</el-form-item>
<el-form-item label="最小值:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.min" clearable />
</el-form-item>
<el-form-item label="求和:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.summation" clearable />
</el-form-item>
<el-form-item label="观测数:">
<el-input style="width: 120px" v-model="formInline.user" clearable />
<el-input style="width: 120px" v-model="formInline.observations" clearable />
</el-form-item>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">确定</el-button>
<el-button @click="submitTask">确定</el-button>
<el-button type="primary" @click="dialogVisible = false">返回</el-button>
</div>
</template>
</el-dialog>
</template>
<el-dialog v-model="b_introductionOfAlgorithmKnowledge" title="算法知识导入" width="60%" :show-close="false">
<template #header="{ close, titleId, titleClass }">
<div class="my-header">
<span :id="titleId" :class="titleClass">实训任务提交</span>
<img class="gbImg" src="../../../assets/images/关闭.png" @click="close" alt="" />
</div>
<img class="xtImg" src="../../../assets/images/线条.png" alt="" />
</template>
<div class="from-item">
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="submitTask">确定</el-button>
<el-button type="primary" @click="dialogVisible = false">返回</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import * as portraitModel from "@/api/portraitModel";
import {paginate} from '@/utils/index.js'
import * as API from "@/api/AI.js";
import * as marketingAlgorithmApi from "@/api/marketing-algorithm.js";
import useAlgorithmStore from "@/store/modules/algorithm.js";
import useUserStore from "@/store/modules/user";
import { onMounted, ref } from "vue";
import { getUserInfo } from "@/utils/auth";
const userInfo = JSON.parse(getUserInfo());
const loading = ref(false);
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
const algorithmStore = useAlgorithmStore();
const multipleTableRef = ref(null);
const b_introductionOfAlgorithmKnowledge = ref(false);
const n_dataTableQuery = ref({
index: 1,
size: 20,
size: 5,
tableName: "用户属性表",
userId: userStore.userInfo.userId,
userId: userInfo.userId,
});
const gAnalysisResults=ref({
index: 1,
size: 5,
})
const dialogVisible = ref(false);
// 模型参数
const modelParams = reactive([
@ -199,35 +226,60 @@ const modelParams = reactive([
const analysisData = ref([]);
const analysisHanderKry = ref([]);
const tableLabel = reactive([
{ prop: "date", label: "用户ID" },
{ prop: "name", label: "登录名" },
{ prop: "name", label: "用户姓名" },
{ prop: "name", label: "学号" },
{ prop: "name", label: "班级" },
{ prop: "name", label: "专业" },
{ prop: "name", label: "学校" },
{ prop: "name", label: "角色名称" },
{ prop: "name", label: "角色性别" },
{ prop: "name", label: "角色年龄" },
{ prop: "name", label: "注册时间" },
{ prop: "name", label: "所在地" },
{ prop: "average", label: "平均数" },
{ prop: "median", label: "中位数" },
{ prop: "mode", label: "众数" },
{ prop: "standardDeviation", label: "标准差" },
{ prop: "variance", label: "方差" },
{ prop: "standardError", label: "标准误差" },
{ prop: "kurtosis", label: "峰度" },
{ prop: "skewness", label: "偏度" },
{ prop: "max", label: "最大值" },
{ prop: "min", label: "最小值" },
{ prop: "summation", label: "求和" },
{ prop: "observations", label: "观测数" },
]);
const formInline = ref({});
const formInline = ref({
average: "",
median: "",
mode: "",
standardDeviation: "",
variance: "",
standardError: "",
kurtosis: "",
skewness: "",
max: "",
min: "",
summation: "",
observations: "",
});
const input = ref();
const g_indicatorData = ref([]);
const preProcessText = ref({
text1: "数据去重",
text2: "",
});
// 分析数据
const n_analyzeTheNumberOfDataItems = ref(0);
const aAnalyzeTheRawData = ref([]);
//分析结果
const nNumberOfAnalysisResults=ref(0)
const aOriginalDataOfAnalysisResults=ref([])
// 模型参数
const g_modelParameter = ref([]);
// 预处理
const preProcess = (tetx) => {
if (analysisData.value.length == 0) {
proxy.$modal.msgWarning("请先选择指标进行数据分析!");
preProcessText.value.text2 = "";
}
API.dataPreprocessing({
mapList: analysisData.value,
method: preProcessText.value.text2,
userId: n_dataTableQuery.value.userId,
}).then((res) => {
proxy.$modal.msgSuccess("预处理成功");
analysisData.value = res.data;
});
};
@ -235,28 +287,7 @@ const preProcess = (tetx) => {
const taskSubmit = () => {
dialogVisible.value = true;
};
const tableData = [
{
date: "2016-05-03",
name: "Tom",
address: "No. 189, Grove St, Los Angeles",
},
{
date: "2016-05-02",
name: "Tom",
address: "No. 189, Grove St, Los Angeles",
},
{
date: "2016-05-04",
name: "Tom",
address: "No. 189, Grove St, Los Angeles",
},
{
date: "2016-05-01",
name: "Tom",
address: "No. 189, Grove St, Los Angeles",
},
];
const tableData = ref([]);
const headerCellStyle = () => {
return {
backgroundColor: "#1882DE !important", // 设置表头背景颜色
@ -274,9 +305,16 @@ const handleSelectionChange = (type) => {
};
// 提交指標
const submit = () => {
if (g_indicatorData.value.length == 0) return proxy.$modal.msgWarning("请选择指标");
marketingAlgorithmApi.getMarketingAlgorithm({ userId: n_dataTableQuery.value.userId, tableName: n_dataTableQuery.value.tableName, fieldList: g_indicatorData.value }).then((res) => {
analysisData.value = res.data;
analysisHanderKry.value = Object.keys(res.data[0]);
if (res.data.length > 5) {
n_analyzeTheNumberOfDataItems.value = res.data.length;
aAnalyzeTheRawData.value = res.data;
analysisData.value = res.data.slice(0, 5);
}
proxy.$modal.msgSuccess("分析数据成功");
});
};
// 选择模型
@ -285,8 +323,19 @@ const handlemodelSelectionChange = (type) => {
};
//计算
const modelCalculation = () => {
if (analysisData.value.length == 0 && g_modelParameter.value.length == 0) {
proxy.$modal.msgWarning("请先分析数据/未选择模型参数!");
return;
}
const processedData = processArrayData(analysisHanderKry.value, analysisData.value);
marketingAlgorithmApi.getMarketingAlgorithmPreprocessing(JSON.stringify({ map: processedData, statistic: g_modelParameter.value, userId: n_dataTableQuery.value.userId }));
marketingAlgorithmApi.getMarketingAlgorithmPreprocessing(JSON.stringify({ map: processedData, statistic: g_modelParameter.value, userId: n_dataTableQuery.value.userId })).then((res) => {
tableData.value = res.data.map((item) => item.statistics);
if(res.data.length>5){
nNumberOfAnalysisResults.value=res.data.length
aOriginalDataOfAnalysisResults.value = res.data.map((item) => item.statistics)
tableData.value = res.data.map((item) => item.statistics).slice(0,5)
}
});
};
function processArrayData(keys, data) {
// 创建结果对象
@ -309,6 +358,65 @@ onMounted(() => {
const getIndicator = () => {
algorithmStore.getUserDatabase({ userId: n_dataTableQuery.value.userId, tableName: n_dataTableQuery.value.tableName });
};
// 算法知识导入
const knowledgeImport = () => {
b_introductionOfAlgorithmKnowledge.value=true
};
// 实训任务提交
const submitTask = () => {
for (let key in formInline.value) {
if (formInline.value[key] == "") {
const label = tableLabel.find((item) => item.prop == key);
proxy.$modal.msgWarning(`${label.label}不能为空`);
return;
}
}
portraitModel
.submit({
userId: n_dataTableQuery.value.userId,
taskName: "描述性统计",
numberOfErrors: 0,
})
.then((res) => {
dialogVisible.value = false;
proxy.$modal.msgSuccess("提交成功");
});
};
// 重新开始
const restart = () => {
// 清空
formInline.value = {
average: "",
median: "",
mode: "",
standardDeviation: "",
variance: "",
standardError: "",
kurtosis: "",
skewness: "",
max: "",
min: "",
summation: "",
observations: "",
};
analysisData.value = [];
analysisHanderKry.value = [];
tableData.value = [];
g_indicatorData.value = [];
g_modelParameter.value = [];
preProcessText.value.text2 = "";
n_dataTableQuery.value.tableName = "用户属性表";
getIndicator();
proxy.$modal.msgSuccess("重新开始成功");
multipleTableRef.value.clearSelection();
};
//
const analyzeDataNext = () => {
analysisData.value =paginate(aAnalyzeTheRawData.value,n_dataTableQuery.value.index,n_dataTableQuery.value.size).data
};
const updatePageAnalysisResults=()=>{
tableData.value =paginate(aOriginalDataOfAnalysisResults.value,gAnalysisResults.value.index,gAnalysisResults.value.size).data
}
</script>
<style lang="scss" scoped>

@ -0,0 +1,538 @@
<template>
<el-scrollbar ref="scrollbar" height="800px">
<div class="main-top">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;">任务描述</span>
<p style="font-weight: 400;font-size: 12px;color: #E6E6E6;">(给出任务清单参考,做哪些数据的统计分析)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
</div>
<div class="main-but">
<el-upload
ref="uploadRef"
class="upload-demo"
:file-list="fileList"
:auto-upload="false"
:on-change="handleChange"
:show-file-list="false"
multiple="multiple"
>
<template #trigger>
<el-button><img src="../../../assets/images/导入.png" alt="">算法知识导入</el-button>
</template>
<!-- <div class="reportPromptFile" v-html="item[`${index}`].path"></div> -->
</el-upload>
<el-button @click="taskSubmit"><img src="../../../assets/images/提交.png" alt="">实训任务提交</el-button>
</div>
<div class="app-main">
<div class="main-left">
<div>
<div class="left-top">
<span>一、选择指标</span>
</div>
<div class="metrics">
<el-select v-model="input" placeholder="请选择" style="width: 180px" @change="optionData">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div class="metrics-table" style="margin-top: 10px">
<el-table border :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handleSelectionChange" >
<el-table-column type="selection" label="Date" align="center" :selectable="flag"/>
<el-table-column prop="text" label="指标" align="center"/>
</el-table>
<el-button @click="taskZB">确定</el-button>
</div>
<div class="left-top" style="margin-top:50px">
<span>二、数据预处理</span>
</div>
<div class="metrics">
<el-select v-model="input2" @change="optionData2" placeholder="请选择" style="width: 180px">
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div class="metrics" style="margin-top:15px">
<el-select v-model="input3" @change="optionData2" placeholder="请选择" style="width: 180px">
<el-option
v-for="item in options3"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div class="left-top" style="margin-top: 50px">
<span>三、模型参数设置</span>
</div>
<div class="metrics-table" style="margin-top: 10px">
<span style="font-weight: 400;font-size: 12px;color: #FFFFFF;">
聚类方法:
</span>
<div class="metrics" style="margin-top:10px">
<el-select v-model="input4" placeholder="请选择" style="width: 180px">
<el-option
v-for="item in options4"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div style="margin-top:10px;">
<span style="font-weight: 400;font-size: 12px;color: #FFFFFF;">
Y变量选择:
</span>
<el-input v-model="input5" style="width: 160px;margin-top:5px"/>
</div>
<div style="margin-top:10px;">
<span style="font-weight: 400;font-size: 12px;color: #FFFFFF;">
X变量选择:
</span>
<el-input v-model="input6" style="width: 160px;margin-top:5px"/>
</div>
<el-button @click="computation">计算</el-button>
</div>
</div>
<div style="margin-top: auto;">
<div class="startOver" @click="startOver()">
<img src="../../../assets/images/重新开始.png" alt="">
<span>重新开始</span>
</div>
</div>
</div>
<div class="main-right">
<div>
<span style="font-weight: bold;font-size: 18px;color: #3596EB;">分析数据:</span>
<el-table :data="tableData2" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
</el-table>
<el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" />
</div>
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果:</span>
<el-button>下载</el-button>
<el-table :data="tableData3" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
</el-table>
<el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" />
</div>
</div>
</div>
</el-scrollbar>
<el-dialog
v-model="dialogVisible"
title="实训任务提交"
width="600"
custom-class="dialogClass"
:show-close="false"
>
<template #header="{ close, titleId, titleClass }">
<div class="my-header">
<span :id="titleId" :class="titleClass">实训任务提交</span>
<img class="gbImg" src="../../../assets/images/关闭.png" @click="close" alt="">
</div>
<img class="xtImg" src="../../../assets/images/线条.png" alt="">
</template>
<div class="from-item">
<el-form :inline="true" label-position="right" label-width="115px" :model="form" class="demo-form-inline">
<el-form-item label="聚类个数:">
<el-input style="width: 120px;" v-model="formInline.user" clearable />
</el-form-item>
<el-form-item label="最大迭代次数:">
<el-input style="width: 120px;" v-model="formInline.user" clearable />
</el-form-item>
</el-form>
<span style="color:#FFFFFF;font-weight: 700;">各簇类特征描述:</span>
<el-form :inline="true" label-position="right" style="margin:15px 0" label-width="115px" :model="form" class="demo-form-inline">
<el-form-item label="簇类1:">
<el-input style="width: 240px;" v-model="formInline.user" clearable />
</el-form-item>
<el-form-item label="簇类2:">
<el-input style="width: 240px;" v-model="formInline.user" clearable />
</el-form-item>
<el-form-item label="簇类3:">
<el-input style="width: 240px;" v-model="formInline.user" clearable />
</el-form-item>
<el-form-item label="簇类4:">
<el-input style="width: 240px;" v-model="formInline.user" clearable />
</el-form-item>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">确定</el-button>
<el-button type="primary" @click="dialogVisible = false">
返回
</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import * as echarts from 'echarts';
import ecStat from 'echarts-stat';
import * as API from '@/api/AI.js'
import { getUserInfo } from "@/utils/auth";
import { onMounted } from 'vue';
const { proxy } = getCurrentInstance()
const dialogVisible=ref(false)
const tableLabel=reactive([
{prop:'date',label:''},
])
const tableLabel2=reactive([
{prop:'date',label:''},
])
const getList=()=>{
API.selectionMetrics({userId:JSON.parse(getUserInfo()).userId}).then((res)=>{
res.data.forEach(element => {
options.value.push({
value:element,
label:element
})
})
})
}
const showChart=ref(false)
const fileList=ref([])
const handleChange=(info)=>{
fileList.value.push(info);
}
const flag=ref(false)
onMounted(()=>{
getList()
})
const optionData=()=>{
API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value,algorithmName:'回归分析'}).then((res)=>{
tableData.value=[]
res.data.forEach(element => {
tableData.value.push({
text:element
})
})
})
}
const selectedRows = ref([]);
const handleSelectionChange = (selection) => {
selectedRows.value = selection;
};
const tableData2=ref([])
const tableData3=ref([])
const resTable2=ref()
const taskZB=()=>{
flag.value=true
if(selectedRows.value.length===0){
return
}
const sendData={
tableName:input.value,
userId:JSON.parse(getUserInfo()).userId,
fieldList:selectedRows.value.map(item=>item.text)
}
API.analysisDataDisplay(sendData).then((res)=>{
tableLabel.length=0
for (const key in res.data[0]) {
tableLabel.push({
label:key,
prop:key
})
}
tableData2.value=res.data
flag.value=true
})
}
const formInline=reactive({
user:'',
region:''
})
const input=ref()
const options = ref([])
const input2=ref()
const options2=ref([
{
value:'数据区重',
label:'数据去重'
}
])
const input3=ref()
const options3=ref([
{
value:'缺失值处理--剔除数据',
label:'缺失值处理--剔除数据'
},{
value:'缺失值处理--均值替换',
label:'缺失值处理--均值替换'
},
])
const input4=ref()
const options4=ref([
{
value:'线性回归',
label:'线性回归'
},{
value:'Logistic逻辑回归',
label:'Logistic逻辑回归'
},
])
const input5=ref()
const input6=ref()
const taskSubmit=()=>{
dialogVisible.value=true
}
const tableData = ref([
])
const headerCellStyle=()=>{
return {
backgroundColor: "#1882DE !important", // 设置表头背景颜色
color: "#ffffff !important",
};
}
const optionData2=()=>{
if(input2.value&&input3.value){
const sendData=ref({
mapList:tableData2.value,
method:input3.value,
userId:JSON.parse(getUserInfo()).userId
})
API.dataPreprocessing(sendData.value).then((res)=>{
resTable2.value=res.data
tableData2.value=[]
tableData2.value=res.data
proxy.$modal.msgSuccess("预处理成功!");
})
}
}
//生产表格
const computation=()=>{
if(input5.value&&input6.value&&input4.value){
const sendData={
confidence:parseFloat(input5.value)/100,
support:parseFloat(input6.value)/100,
userId:JSON.parse(getUserInfo()).userId,
deduplicatedDataList:resTable2.value
}
API.associationRuleMining(sendData).then((res)=>{
tableData3.value=[]
res.data.forEach(element=>{
tableData3.value.push({
date:element
})
})
})
}
}
const startOver=()=>{
input.value=''
tableData.value=[]
tableData2.value=[]
tableData3.value=[]
input2.value=''
input3.value=''
input4.value=''
input5.value=''
input6.value=''
}
</script>
<style lang="scss" scoped>
.main-top {
margin: 20px 20px 0;
margin-top: 10px;
height: 85px;
background: #001d40;
border: 1px solid #0452c6;
padding: 5px 20px;
}
.main-but{
margin: 5px 20px 0;
display: flex;
.el-button:nth-child(1) {
width: 180px;
height: 56px;
background: url('../../../assets/images/011.png');
color:#FFFFFF;
border-color:#FFFFFF00;
}
.el-button:nth-child(2) {
width: 180px;
height: 56px;
background: url('../../../assets/images/022.png');
color:#FFFFFF;
border-color:#FFFFFF00;
}
}
.app-main {
// background-color: #f5f5f5;
min-height: 965px;
margin: 5px 20px 0;
height: 100%;
display: flex;
overflow: auto;
.main-left {
//水平居中
flex-direction: column;
min-height: 965px;
display: flex;
width: 205px;
// height: 100%;
background: #041c49;
padding: 0px 10px;
.left-top {
padding: 10px;
span {
font-weight: bold;
font-size: 18px;
color: #3596eb;
}
}
.metrics-table{
.el-button {
width: 149px;
height: 48px;
background: url('../../../assets/images/确定.png');
color:#FFFFFF;
border-color:#FFFFFF00;
background-size: 100% 100%;
margin: 15px;
}
.el-input{
--el-input-text-color:#FFFFFF;
--el-input-bg-color:#002651;
--el-input-border-color:#67B3D6;
}
}
.startOver{
margin-left: -10px;
width: 205px;
height: 55px;
background: #00F4FF;
//水平居中
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
:deep(.el-table) {
--el-table-row-hover-bg-color:#002651 !important;
--el-table-border-color: #7AC1FF;
.el-table__row{
background-color: #002652 !important;
color: #E6E6E6;
}
}
}
.main-right {
width: 1639px;
// height: 100%;
padding: 20px;
border: 1px solid #0452c6;
:deep(.el-table__header){
.el-table__cell{
background:linear-gradient(0deg, #5304BE 0%, #9126FE 100%) !important;
}
}
:deep(.el-table) {
--el-table-row-hover-bg-color:#002651 !important;
--el-table-border-color: #002651;
--el-table-bg-color:#FFFFFF00;
.el-table__row{
background-color: #002652 !important;
color: #E6E6E6;
}
}
}
.metrics{
:deep(.el-input){
.el-input__wrapper{
background-color:#FFFFFF00;
background-image:url('../../../assets/images/下拉框.png');
background-size: 100% 100%;
}
--el-input-text-color:#FFFFFF;
--el-input-border-color:#FFFFFF00;
--el-input-hover-border-color:#FFFFFF00;
--el-input-hover-border:#FFFFFF00;
--el-select-border-color-hover:#FFFFFF00;
--el-select-input-focus-border-color:#FFFFFF00;
--el-input-placeholder-color:#FFFFFF;
.el-input__inner{
color:#FFFFFF;
}
}
}
}
.analysisResults{
.el-button {
width: 89px;
height: 31px;
background: url('../../../assets/images/下载.png');
color:black;
border-color:#FFFFFF00;
// background-size: 100% 100%;
margin: 15px 0px 5px;
}
}
:deep(.el-form-item__label){
color: #FFFFFF;;
}
.from-item{
padding: 20px;
.el-input{
--el-input-text-color:#FFFFFF;
--el-input-bg-color:#002651;
--el-input-border-color:#67B3D6;
}
}
.dialog-footer{
margin-bottom: 20px;
}
:deep(.el-table__expand-icon){
color: #9126FE;
.el-icon{
font-size: 16px;
}
}
</style>
<style lang="scss">
.dialogClass{
background:url('../../../assets/images/弹框.png') !important;
background-size: 100% 100% !important;
.el-dialog__header{
padding: 5px 0px;
margin-right: 5px !important;
.gbImg{
cursor: pointer;
width: 51px;
height: 31px;
background-size: 100% 100%;
}
}
.xtImg{
margin-left: 18px;
width: 530px;
}
}
.my-header {
display: flex;
flex-direction: row;
justify-content: space-between;
gap: 16px;
text-align: center;
span{
color: #FFFFFF;
padding: 38px 20px 0;
}
}
</style>

@ -20,8 +20,10 @@
import big from './components/bigData.vue'
import descriptiveStatistics from './components/descriptiveStatistics.vue'
import clusterAnalysis from './components/clusterAnalysis.vue'
import associationRuleMining from './components/associationRuleMining.vue'
import regressionAnalysis from './components/regressionAnalysis.vue'
const component=ref(big)
const pageData=[big,descriptiveStatistics,clusterAnalysis]
const pageData=[big,descriptiveStatistics,clusterAnalysis,associationRuleMining,regressionAnalysis]
const isActive=ref(1)
const activeIndex=(index)=>{
isActive.value=index
@ -38,6 +40,9 @@
.top_item{
img{
margin-right: 5px;
}
.el-button{
padding-left: 49px !important;
}
.el-button:nth-child(1) {
width: 170px;
@ -45,6 +50,7 @@
background: url('../../assets/images/11.png');
color:#FFFFFF;
border-color:#FFFFFF00;
padding:8px 5px 8px 47px;
}
.el-button:nth-child(2) {
width: 170px;
@ -52,6 +58,7 @@
background: url('../../assets/images/22.png');
color:#FFFFFF;
border-color:#FFFFFF00;
padding:8px 5px 8px 47px;
}
.el-button:nth-child(3) {
width: 170px;
@ -94,9 +101,9 @@
border-color:#FFFFFF00;
padding:8px 5px 8px 20px;
}
// .active{
// background: url('../../assets/images/亮(钮).png');
// }
.active{
background: url('../../assets/images/亮(钮).png');
}
}
}
</style>

@ -55,7 +55,6 @@
})
const showResource=async(i)=>{
console.log(i);
// const newWindow=window.open(`http://192.168.2.4:8800/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}`)
// window.open(`http://qkljr.sztzjy.com:90/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}`)
if(i.includes('mp4')){

Loading…
Cancel
Save