Commit 6a14a35d authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents f7c78315 f9b967a9
......@@ -25,6 +25,7 @@
"china-division": "^2.5.0",
"clipboard": "^2.0.6",
"core-js": "^3.6.5",
"crypto-js": "^4.1.1",
"date-fns": "^2.14.0",
"echarts": "^5.2.2",
"element-china-area-data": "^5.0.2",
......
......@@ -31,16 +31,17 @@
border-bottom: 1px solid rgb(224, 224, 224) !important;
}
.ant-tabs-tab{
.ant-tabs-tab {
font-weight: bold;
color: rgba(0, 0, 0, 0.65);
i{
color:#1890ff
i {
color: #1890ff;
}
}
.ant-spin-nested-loading,.ant-spin-container{
width:100%;
height:100%;
.ant-spin-nested-loading,
.ant-spin-container {
width: 100%;
height: 100%;
}
/* 溢出表格滚动条 */
/* 表格 */
......@@ -56,10 +57,9 @@
tr:only-child > th:last-child {
border-right-color: #f0f0f0 !important;
}
}
.ant-table-placeholder{
width:calc(100% - 6px)
.ant-table-placeholder {
width: calc(100% - 6px);
}
.ant-table-header {
background: #fff;
......@@ -118,4 +118,11 @@
// align-items: center;
// justify-content:space-between;
// margin-bottom: 20px;
// }
\ No newline at end of file
// }
// 统一设置表格为空时的展示
.ant-table-tbody {
td:empty::after {
content: "--";
}
}
......@@ -2,13 +2,16 @@
<div style="margin-bottom: 25px" class="y-quill" :style="{ height: height }">
<!-- 图片上传组件辅助-->
<a-upload
name="uploadFile"
name="file"
:multiple="true"
:headers="headers"
:headers="{
Authorization: token,
}"
:show-upload-list="false"
:action="serverUrl"
@change="handleChange"
:before-upload="beforeUpload"
:accept="accept"
>
</a-upload>
<!-- 富文本 -->
......@@ -24,7 +27,7 @@
</div>
</template>
<script>
import local from "@/utils/local";
import { mapGetters } from "vuex";
// 工具栏配置
const toolbarOptions = [
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
......@@ -104,6 +107,7 @@ export default {
data() {
return {
accept: "image/png,image/gif,image/jpeg,video/mp4",
quillUpdateImg: false, // 根据图片上传状态来确定是否显示loading动画,刚开始是false,不显示
api: process.env.VUE_APP_API_BASE_URL + "/",
editorOption: {
......@@ -142,10 +146,7 @@ export default {
},
},
},
serverUrl: process.env.VUE_APP_API_BASE_URL + "/file/commonupload", // 这里写你要上传的图片服务器地址
headers: {
Authorization: local.getLocal("token"),
},
serverUrl: process.env.VUE_APP_API_BASE_URL + "/base/file/commonupload", // 这里写你要上传的图片服务器地址
};
},
computed: {
......@@ -157,6 +158,7 @@ export default {
this.$emit("input", val);
},
},
...mapGetters("site", ["token"]),
},
methods: {
onEditorBlur() {
......
......@@ -5,8 +5,7 @@
<div class="flex aic">
<router-link to="/" class="flex aic">
<img
class="mr10"
width="32"
class="mr10 logo"
:src="sysLogo ? api + sysLogo : require('@/assets/img/logo.png')"
/>
<h1 class="title">
......@@ -102,6 +101,10 @@ export default {
line-height: normal;
}
}
.logo {
height: 32px;
object-fit: contain;
}
.main {
height: calc(100vh - 64px);
padding: 0px 24px 24px;
......
......@@ -20,7 +20,7 @@
:wrapper-col="{ span: 22 }"
>
<a-form-model-item label="应用主题">
{{ filterItems(appInfo.appThemeName, appDict.appThemeName) }}
{{ filterItems(appInfo.appThemeName) }}
</a-form-model-item>
<a-form-model-item label="应用简介">
{{ appInfo.summary }}
......@@ -117,10 +117,10 @@ import {
getVersionList,
usedVersion,
previewVersion,
getCategoryList,
} from "@/services/market";
import CheckSite from "../modal/CheckSite.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default {
props: {
......@@ -153,9 +153,7 @@ export default {
{
title: "更新说明",
width: "40%",
customRender: (text) => {
return <span>{text.notes ? text.notes : "--"}</span>;
},
dataIndex: "notes",
},
{
title: "应用包",
......@@ -172,7 +170,6 @@ export default {
},
];
return {
filterItems,
api: process.env.VUE_APP_API_BASE_URL + "/",
columns,
appId: this.$route.query.id,
......@@ -185,16 +182,30 @@ export default {
form: {},
tableData: [],
siteVisible: false,
categoryList: [],
};
},
computed: {
...mapGetters("site", ["appDict"]),
},
created() {
this.getCategoryList();
this.getAppInfo();
this.getVersions();
},
methods: {
// 获取分类列表
async getCategoryList() {
let res = await getCategoryList({
page: 1,
size: -1,
siteId: this.siteId,
});
let { data } = res.data.data;
if (res.data.code === 1) {
this.categoryList = data;
}
},
// 获取应用详情
async getAppInfo() {
let res = await getAppInfo({ id: this.appId });
......@@ -275,6 +286,12 @@ export default {
this.$refs.CheckSite.getSiteList(siteList);
this.siteVisible = true;
},
filterItems(appThemeName) {
return (
this.categoryList.find((v) => v.id == appThemeName)?.categoryName ||
"--"
);
},
},
};
</script>
......
......@@ -213,7 +213,6 @@ export default {
...mapMutations("site", ["SET_appDict"]),
// 获取分类列表
async getCategoryList() {
this.loading = true;
let res = await getCategoryList({
page: 1,
size: -1,
......
......@@ -83,6 +83,32 @@
:placeholder="`请选择${v.fieldName}`"
valueFormat="YYYY-MM-DD"
/>
<!-- 年选择器 -->
<a-date-picker
mode="year"
v-else-if="v.fieldType == 'year'"
v-model="v.fieldValue"
:placeholder="`请选择${v.fieldName}`"
valueFormat="YYYY"
format="YYYY"
:open="isopen"
@openChange="handYearChange"
@panelChange="(value) => panelYearChange(value, v)"
/>
<!-- 月选择器 -->
<a-month-picker
v-else-if="v.fieldType == 'month'"
v-model="v.fieldValue"
:placeholder="`请选择${v.fieldName}`"
valueFormat="M"
/>
<!-- 周选择器 -->
<a-week-picker
v-else-if="v.fieldType == 'week'"
v-model="v.fieldValue"
:placeholder="`请选择${v.fieldName}`"
valueFormat="YYYY-WW"
/>
<!-- 多行文本输入框 -->
<a-textarea
v-else-if="v.fieldType == 'textarea'"
......@@ -170,6 +196,8 @@ export default {
appId: "",
appInfoFieldList: [],
},
isopen: false,
year: null,
};
},
computed: {
......@@ -269,6 +297,17 @@ export default {
changeCheckBox(vals, row) {
row.fieldValue = vals.join(",");
},
handYearChange(open) {
if (open) {
this.isopen = true;
} else {
this.isopen = false;
}
},
panelYearChange(value, row) {
row.fieldValue = this.$moment(value).format("YYYY");
this.isopen = false;
},
},
};
</script>
......@@ -289,20 +328,6 @@ export default {
padding: 24px;
flex: 1;
overflow-y: auto;
&::-webkit-scrollbar {
width: 12px;
overflow-y: auto;
}
&::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 147, 153, 0.5);
}
&::-webkit-scrollbar-track {
border-radius: 6px;
background: #fff;
}
}
.content {
align-items: flex-start !important;
......
......@@ -98,6 +98,19 @@ const fieldTypeItem = [
value: "date",
label: "日期选择框",
},
{
value: "year",
label: "年选择框",
},
{
value: "month",
label: "月选择框",
},
{
value: "week",
label: "周选择框",
},
{
value: "radio",
label: "单选框",
......
......@@ -13,23 +13,42 @@
:class="{ active: i === isActive }"
v-for="(v, i) in productList"
:key="v.id"
@click="changeMenu(i, v)"
@click.self="changeMenu(i, v)"
style="width: 50%; text-align: center"
>
<div class="control" v-permission="[1]">
<a-space>
<a-icon type="edit" @click="handleEdit(v)" />
<a-icon type="delete" @click="handleDel(v.id)" />
</a-space>
</div>
{{ v.productName }}
</a-card-grid>
</div>
<!-- 编辑产品 -->
<AddDev
ref="AddDev"
:visible.sync="visible"
:title="title"
@addDev="getProductList"
></AddDev>
</div>
</template>
<script>
import { getProductList } from "@/services/surface";
import { getProductList, deleteProduct } from "@/services/surface";
import { mapMutations } from "vuex";
import AddDev from "../modal/AddDev.vue";
export default {
components: {
AddDev,
},
data() {
return {
productList: [], //产品列表
isActive: "",
visible: false,
title: "编辑产品",
};
},
created() {
......@@ -62,6 +81,38 @@ export default {
};
this.SET_curProduct(obj);
},
// 编辑产品
handleEdit(row) {
this.title = "编辑产品";
this.$refs.AddDev.onEdit(row);
this.visible = true;
},
// 删除产品
handleDel(id) {
let _this = this;
_this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await deleteProduct({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getProductList();
}
},
onCancel() {
console.log("Cancel");
},
});
console.log(id);
},
},
beforeDestroy() {
this.SET_curProduct({});
......@@ -74,6 +125,7 @@ export default {
height: 100%;
background-color: #fff;
}
.search-box {
padding: 15px 15px 0px;
}
......@@ -85,6 +137,9 @@ export default {
.active {
background-color: #1890ff;
color: #fff;
.anticon {
color: inherit;
}
}
}
/deep/.ant-card-grid {
......@@ -93,5 +148,23 @@ export default {
align-items: center;
justify-content: center;
cursor: pointer;
position: relative;
&:hover {
.control {
display: block;
}
}
}
.control {
position: absolute;
right: 10px;
top: 0px;
display: none;
.anticon-edit {
color: #03d76f;
}
.anticon-delete {
color: #fa4d4c;
}
}
</style>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div>
<a-modal
v-model="Visible"
title="新增设备"
:title="title"
@ok="handleOk"
@cancel="handleClose"
>
......@@ -17,11 +17,7 @@
<a-input placeholder="请输入设备名称" v-model="form.productName" />
</a-form-model-item>
<a-form-model-item label="设备编号" prop="productCode">
<a-input
type="password"
placeholder="请输入设备编号"
v-model="form.productCode"
/>
<a-input placeholder="请输入设备编号" v-model="form.productCode" />
</a-form-model-item>
<a-form-model-item label="备注" prop="productRemark">
<a-textarea
......@@ -44,6 +40,11 @@ export default {
type: Boolean,
default: false,
},
title: {
required: true,
type: String,
default: "新增设备",
},
},
data() {
return {
......@@ -88,9 +89,18 @@ export default {
},
// 关闭对话框
handleClose() {
this.$refs.form.resetFields();
this.$refs.form.clearValidate();
this.Visible = false;
},
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
},
// 编辑
onEdit(row) {
this.form = { ...row };
},
},
};
</script>
......
......@@ -3,7 +3,7 @@
<TabHeader label="皮肤管理">
<a-space>
<a-button v-permission="[1]" icon="plus" @click="addDev"
>新增设备</a-button
>新增产品</a-button
>
<a-button
type="primary"
......@@ -48,7 +48,12 @@
@addSkinSuccess="addSkinSuccess"
></AddSurface>
<!-- 新增设备 -->
<AddDev :visible.sync="addDevVisible" @addDev="addDevSuccess"></AddDev>
<AddDev
ref="AddDev"
:visible.sync="addDevVisible"
@addDev="addDevSuccess"
:title="title"
></AddDev>
</div>
</template>
......@@ -77,6 +82,7 @@ export default {
visible: false,
addDevVisible: false,
classifyList: [], //皮肤分类数据
title: "新增产品",
};
},
created() {
......@@ -113,8 +119,8 @@ export default {
},
// 编辑皮肤
editSkin(row) {
this.isShow = true;
this.$refs.AddSurface.onEdit(row);
this.isShow = true;
},
// 新增分类成功刷新数据
addCategorySuccess() {
......@@ -126,6 +132,8 @@ export default {
},
// 新增设备
addDev() {
this.title = "新增产品";
this.$refs.AddDev.onAdd();
this.addDevVisible = true;
},
// 新增设备成功
......
......@@ -2,8 +2,9 @@ import Vue from "vue";
import Vuex from "vuex";
import modules from "./modules";
import createPersistedState from "vuex-persistedstate";
import SecureLS from "secure-ls";
var ls = new SecureLS({ isCompression: false });
// import SecureLS from "secure-ls";
// var ls = new SecureLS({ isCompression: false });
import { SessionCrypto } from "@/utils/util";
Vue.use(Vuex);
const store = new Vuex.Store({
modules,
......@@ -15,9 +16,9 @@ const store = new Vuex.Store({
createPersistedState({
key: "info",
storage: {
getItem: (key) => ls.get(key),
setItem: (key, value) => ls.set(key, value),
removeItem: (key) => ls.remove(key),
getItem: (key) => SessionCrypto.getItem(key),
setItem: (key, value) => SessionCrypto.setItem(key, value),
removeItem: (key) => SessionCrypto.remove(key),
},
}),
],
......
import enquireJs from "enquire.js";
import CryptoJS from "crypto-js";
export function isDef(v) {
return v !== undefined && v !== null;
}
......@@ -62,3 +62,52 @@ export const extractTree = (arrs, childs, attrArr) => {
};
return getObj(arrs);
};
/**
* 加密存储临时数据并解析对象
*/
const aseKey = "**_FXxx_1234_KEY";
const KEY = "KEY_EXTRA";
export class SessionCrypto {
// 加密
static setItem(key = KEY, value = "") {
if (typeof key === "string") {
const stringify = JSON.stringify(value);
const encrypt = CryptoJS.AES.encrypt(
stringify,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString();
window.sessionStorage.setItem(key, encrypt);
return encrypt;
}
}
// 解密
static getItem(key = KEY) {
const ssStr = window.sessionStorage.getItem(key) || "";
try {
if (ssStr) {
const decrypt = CryptoJS.AES.decrypt(
ssStr,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString(CryptoJS.enc.Utf8);
const parseStr = JSON.parse(decrypt);
return parseStr;
}
return "";
} catch (e) {
return "";
}
}
// 删除
static remove(key) {
window.sessionStorage.removeItem(key);
}
}
......@@ -3676,6 +3676,11 @@ crypto-js@^3.1.6:
resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b"
integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==
crypto-js@^4.1.1:
version "4.1.1"
resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==
crypto-random-string@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/crypto-random-string/download/crypto-random-string-2.0.0.tgz?cache=0&sync_timestamp=1583560482221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcrypto-random-string%2Fdownload%2Fcrypto-random-string-2.0.0.tgz"
......
......@@ -69,4 +69,7 @@ export default {
.ant-calendar-next-year-btn::after {
border-color: rgba(0, 0, 0, 1) !important;
}
.ant-progress-text {
color: #fff !important;
}
</style>
\ No newline at end of file
......@@ -776,4 +776,11 @@ img {
// }
// }
// }
// }
\ No newline at end of file
// }
// 统一设置表格为空时的展示
.ant-table-tbody {
td:empty::after {
content: "--";
}
}
\ No newline at end of file
<template>
<div id="indexLizi" class="particle-wavy"></div>
</template>
<script>
import * as THREE from "three";
export default {
name: "Pointwave",
props: {
amountX: {
type: Number,
default: 50,
},
amountY: {
type: Number,
default: 50,
},
color: {
type: String,
default: "#10cbff",
},
top: {
type: Number,
default: 350,
},
},
data() {
return {
count: 0,
// 用来跟踪鼠标水平位置
mouseX: 0,
windowHalfX: null,
// 相机
camera: null,
// 场景
scene: null,
// 批量管理粒子
particles: null,
// 渲染器
renderer: null,
};
},
mounted() {
this.init();
this.animate();
},
methods: {
init() {
const SEPARATION = 100;
const SCREEN_WIDTH = window.innerWidth;
const SCREEN_HEIGHT = window.innerHeight;
const container = document.createElement("div");
this.windowHalfX = window.innerWidth / 2;
container.style.position = "relative";
container.style.top = `${this.top}px`;
container.style.height = `${SCREEN_HEIGHT - this.top}px`;
document.getElementById("indexLizi").appendChild(container);
this.camera = new THREE.PerspectiveCamera(
75,
SCREEN_WIDTH / SCREEN_HEIGHT,
1,
10000
);
this.camera.position.z = 1000;
this.scene = new THREE.Scene();
const numParticles = this.amountX * this.amountY;
const positions = new Float32Array(numParticles * 3);
const scales = new Float32Array(numParticles);
// 初始化粒子位置和大小
let i = 0;
let j = 0;
for (let ix = 0; ix < this.amountX; ix++) {
for (let iy = 0; iy < this.amountY; iy++) {
positions[i] = ix * SEPARATION - (this.amountX * SEPARATION) / 2;
positions[i + 1] = 0;
positions[i + 2] = iy * SEPARATION - (this.amountY * SEPARATION) / 2;
scales[j] = 1;
i += 3;
j++;
}
}
const geometry = new THREE.BufferGeometry();
geometry.setAttribute(
"position",
new THREE.BufferAttribute(positions, 3)
);
geometry.setAttribute("scale", new THREE.BufferAttribute(scales, 1));
// 初始化粒子材质
const material = new THREE.ShaderMaterial({
uniforms: {
color: { value: new THREE.Color(this.color) },
},
vertexShader: `
attribute float scale;
void main() {
vec4 mvPosition = modelViewMatrix * vec4( position, 2.0 );
gl_PointSize = scale * ( 300.0 / - mvPosition.z );
gl_Position = projectionMatrix * mvPosition;
}
`,
fragmentShader: `
uniform vec3 color;
void main() {
if ( length( gl_PointCoord - vec2( 0.5, 0.5 ) ) > 0.475 ) discard;
gl_FragColor = vec4( color, 1.0 );
}
`,
});
this.particles = new THREE.Points(geometry, material);
this.scene.add(this.particles);
this.renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
this.renderer.setSize(container.clientWidth, container.clientHeight);
this.renderer.setPixelRatio(window.devicePixelRatio);
this.renderer.setClearAlpha(0);
container.appendChild(this.renderer.domElement);
window.addEventListener("resize", this.onWindowResize, {
passive: false,
});
document.addEventListener("mousemove", this.onDocumentMouseMove, {
passive: false,
});
document.addEventListener("touchstart", this.onDocumentTouchStart, {
passive: false,
});
document.addEventListener("touchmove", this.onDocumentTouchMove, {
passive: false,
});
},
render() {
this.camera.position.x += (this.mouseX - this.camera.position.x) * 0.05;
this.camera.position.y = 400;
this.camera.lookAt(this.scene.position);
const positions = this.particles.geometry.attributes.position.array;
const scales = this.particles.geometry.attributes.scale.array;
// 计算粒子位置及大小
let i = 0;
let j = 0;
for (let ix = 0; ix < this.amountX; ix++) {
for (let iy = 0; iy < this.amountY; iy++) {
positions[i + 1] =
Math.sin((ix + this.count) * 0.3) * 100 +
Math.sin((iy + this.count) * 0.5) * 100;
scales[j] =
(Math.sin((ix + this.count) * 0.3) + 1) * 8 +
(Math.sin((iy + this.count) * 0.5) + 1) * 8;
i += 3;
j++;
}
}
// 重新渲染粒子
this.particles.geometry.attributes.position.needsUpdate = true;
this.particles.geometry.attributes.scale.needsUpdate = true;
this.renderer.render(this.scene, this.camera);
this.count += 0.02;
},
animate() {
requestAnimationFrame(this.animate);
this.render();
// setInterval(() => {
// }, 50);
},
onDocumentMouseMove(event) {
this.mouseX = event.clientX - this.windowHalfX;
},
onDocumentTouchStart(event) {
if (event.touches.length === 1) {
this.mouseX = event.touches[0].pageX - this.windowHalfX;
}
},
onDocumentTouchMove(event) {
if (event.touches.length === 1) {
event.preventDefault();
this.mouseX = event.touches[0].pageX - this.windowHalfX;
}
},
onWindowResize() {
this.windowHalfX = window.innerWidth / 2;
this.camera.aspect = window.innerWidth / window.innerHeight;
this.camera.updateProjectionMatrix();
this.renderer.setSize(window.innerWidth, window.innerHeight);
},
},
};
</script>
<style lang="less" scoped>
.particle-wavy {
width: 100%;
height: 100%;
opacity: 0.3;
}
</style>
\ No newline at end of file
......@@ -2,9 +2,10 @@ import Vue from "vue";
import Vuex from "vuex";
import modules from "./modules";
import createPersistedState from "vuex-persistedstate";
import SecureLS from "secure-ls";
var ls = new SecureLS({ isCompression: false });
// import SecureLS from "secure-ls";
// var ls = new SecureLS({ isCompression: false });
import VuexReset from "@ianwalter/vuex-reset";
import { SessionCrypto } from "@/utils";
// import persistedState from 'vuex-persistedstate'
Vue.use(Vuex);
const store = new Vuex.Store({
......@@ -16,9 +17,9 @@ const store = new Vuex.Store({
createPersistedState({
key: "info",
storage: {
getItem: (key) => ls.get(key),
setItem: (key, value) => ls.set(key, value),
removeItem: (key) => ls.remove(key),
getItem: (key) => SessionCrypto.getItem(key),
setItem: (key, value) => SessionCrypto.setItem(key, value),
removeItem: (key) => SessionCrypto.remove(key),
},
}),
],
......
......@@ -16,3 +16,66 @@ export let encrypt = (str, keyStr, ivStr) => {
return encrypted.toString();
};
// 解密
export const decrypt = (word, keyStr, ivStr) => {
keyStr = keyStr ? keyStr : "0000000671595991";
ivStr = ivStr ? ivStr : "tdrdadq59tbss5n7";
let key = CryptoJS.enc.Utf8.parse(keyStr);
let iv = CryptoJS.enc.Utf8.parse(ivStr);
let decrypt = CryptoJS.AES.decrypt(word, key, {
iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7,
});
return decrypt.toString(CryptoJS.enc.Utf8);
};
/**
* 加密存储临时数据并解析对象
*/
const aseKey = "**_FXxx_1234_KEY";
const KEY = "KEY_EXTRA";
export class SessionCrypto {
// 加密
static setItem(key = KEY, value = "") {
if (typeof key === "string") {
const stringify = JSON.stringify(value);
const encrypt = CryptoJS.AES.encrypt(
stringify,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString();
window.sessionStorage.setItem(key, encrypt);
return encrypt;
}
}
// 解密
static getItem(key = KEY) {
const ssStr = window.sessionStorage.getItem(key) || "";
try {
if (ssStr) {
const decrypt = CryptoJS.AES.decrypt(
ssStr,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString(CryptoJS.enc.Utf8);
const parseStr = JSON.parse(decrypt);
return parseStr;
}
return "";
} catch (e) {
return "";
}
}
// 删除
static remove(key) {
window.sessionStorage.removeItem(key);
}
}
......@@ -158,7 +158,7 @@ export default {
this.particles.geometry.attributes.position.needsUpdate = true;
this.particles.geometry.attributes.scale.needsUpdate = true;
this.renderer.render(this.scene, this.camera);
this.count += 0.1;
this.count += 0.02;
},
animate() {
requestAnimationFrame(this.animate);
......
<template>
<!-- 路径分析 -->
<div class="page">
<a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<a-select v-model="queryform.productId" style="width: 200px" placeholder="选择产品">
<a-select-option :value="item.id" v-for="(item,index) in product" :key="index">
{{item.title}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="time" style="width: 300px" :allowClear="false"/>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" class="addclass" @click="getData">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div id="path"></div>
</div>
<!-- 路径分析 -->
<div class="page">
<a-form-model
:model="queryform"
:label-col="labelCol"
:wrapper-col="wrapperCol"
layout="inline"
>
<a-form-model-item>
<a-select
v-model="queryform.productId"
style="width: 200px"
placeholder="选择产品"
>
<a-select-option
:value="item.id"
v-for="(item, index) in product"
:key="index"
>
{{ item.title }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker
valueFormat="yyyy-MM-DD"
v-model="time"
style="width: 300px"
:allowClear="false"
/>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" class="addclass" @click="getData">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div id="path"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
import product from "../mixins/product"
import {getWayAccessAnalyse} from '@/api/dataActuary.js'
import moment from 'moment';
export default {
mixins:[product],
data() {
return {
queryform: {
productId: 1,
dateTimeStart:moment().format('yyyy-MM-DD'),
dateTimeEnd:moment().format('yyyy-MM-DD')
},
time:[moment().format('yyyy-MM-DD'),moment().format('yyyy-MM-DD')],
product:[{
title:'排队机',
id:1
}],
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
}
},
mounted() {
this.getData()
},
methods: {
getData() {
this.queryform.dateTimeStart = this.time ? this.time[0] : null
this.queryform.dateTimeStart = this.time ? this.time[1] : null
getWayAccessAnalyse(this.queryform).then(res=>{
let data = res.data.data.map(item=>({name:item.name}))
let links = res.data.links.map(item=>({
source:item.sourceName,
target:item.targetName,
value:item.value,
lineStyle:{
color:'source'
}
}))
this.init(data,links)
})
},
uniqueFunc(arr, uniId){
const res = new Map();
return arr.filter((item) => !res.has(item[uniId]) && res.set(item[uniId], 1));
},
init(data,links) {
let chartDom = document.getElementById('path')
let myChart = echarts.init(chartDom);
myChart.setOption({
series: {
type: 'sankey',
layout: 'none',
emphasis: {
focus: 'adjacency'
},
color:['#FFCAC4','#6D86DE','#409AFE','#4DB3EA','#07CF8C'],
nodeWidth:10,
data: data,
links: links
}
})
}
}
};
import * as echarts from "echarts";
import product from "../mixins/product";
import { getWayAccessAnalyse } from "@/api/dataActuary.js";
import moment from "moment";
export default {
mixins: [product],
data() {
return {
queryform: {
productId: 1,
dateTimeStart: moment().format("yyyy-MM-DD"),
dateTimeEnd: moment().format("yyyy-MM-DD"),
},
time: [moment().format("yyyy-MM-DD"), moment().format("yyyy-MM-DD")],
product: [
{
title: "排队机",
id: 1,
},
],
labelCol: {
span: 1,
},
wrapperCol: {
span: 14,
},
myChart: null,
};
},
created() {
this.$nextTick(() => {
this.getData();
});
},
methods: {
getData() {
this.queryform.dateTimeStart = this.time ? this.time[0] : null;
this.queryform.dateTimeStart = this.time ? this.time[1] : null;
getWayAccessAnalyse(this.queryform).then((res) => {
let newobj = {};
let data = res.data.data.reduce((preVal, curVal) => {
newobj[curVal.name]
? ""
: (newobj[curVal.name] = preVal.push(curVal));
return preVal;
}, []);
// let data = res.data.data.map((item, i) =>
// item.code != "/sceneSignIn"
// ? {
// name: item.name,
// }
// : ""
// );
let links = res.data.links.map((item) => ({
source: item.sourceName,
target: item.targetName,
value: item.value,
lineStyle: {
color: "source",
},
}));
data = data.filter((v) => v);
links = links.filter((v) => v.target != "首页" && v.target != v.source);
this.init(data, links);
});
},
uniqueFunc(arr, uniId) {
const res = new Map();
return arr.filter(
(item) => !res.has(item[uniId]) && res.set(item[uniId], 1)
);
},
init(data, links) {
if (
this.myChart != null &&
this.myChart != "" &&
this.myChart != undefined
) {
this.myChart.dispose(); //销毁
}
this.myChart = echarts.init(document.getElementById("path"));
this.myChart.setOption({
series: {
type: "sankey",
layout: "none",
emphasis: {
focus: "adjacency",
},
color: ["#FFCAC4", "#6D86DE", "#409AFE", "#4DB3EA", "#07CF8C"],
nodeWidth: 10,
data: data,
links: links,
},
});
window.addEventListener("resize", () => {
if (this.myChart) {
this.myChart.resize();
}
});
},
},
};
</script>
<style lang="less" scoped>
.page{
height: calc(100% - 50px);
display: flex;
flex-direction: column;
/deep/.ant-form {
padding: 15px;
}
#path{
flex: 1;
width: 70%;
margin: 0 auto;
}
}
</style>
\ No newline at end of file
.page {
height: calc(100% - 50px);
display: flex;
flex-direction: column;
/deep/.ant-form {
padding: 15px;
}
#path {
flex: 1;
width: 70%;
margin: 0 auto;
}
}
</style>
......@@ -217,12 +217,14 @@ export default {
display: flex;
.img-dv {
width: 60%;
flex: 1;
margin: 100px;
height: 600px;
position: relative;
img {
width: 100%;
height: 100%;
}
#queuing {
......@@ -236,7 +238,7 @@ export default {
}
.list-dv {
width: 40%;
width: 55%;
min-height: 100%;
border-left: solid 1px #efefef;
box-sizing: border-box;
......
<template>
<div class="actuary w-full h-auto">
<Start class="start" />
<ParticleWavy class="start" />
<div class="act_cont">
<div class="act_tit">
<h1>智慧政务数据精算</h1>
......@@ -42,7 +42,7 @@
<script>
import menu from "@/mixins/menu";
import Start from "./ParticleWavy.vue";
import ParticleWavy from "@/components/ParticleWavy.vue";
import { mapState } from "vuex";
import Storage from "@/utils/js/Storage";
export default {
......@@ -54,7 +54,7 @@ export default {
};
},
components: {
Start,
ParticleWavy,
},
computed: {
......
......@@ -308,6 +308,7 @@ export default {
// 查看信息
checkInfo(id) {
this.loading = true;
getImpossibleInfo({
id: id,
}).then((res) => {
......@@ -316,6 +317,7 @@ export default {
this.$refs.FormDetails.fromData = data;
this.visible = true;
}
this.loading = false;
});
},
},
......
......@@ -96,7 +96,7 @@ const filterVal = [
"organization",
"customerDesignPictures",
"customerDesignVideos",
"memberLevel",
"levelName",
"lastLoginTime",
"status",
]; // 导出的表头字段名,需要导出表格字段名
......
......@@ -383,6 +383,7 @@ export default {
},
// 详情
async checkInfo(id) {
this.loading = true;
let res = await getEvaData({ id });
if (res.code == 1) {
let { data } = res;
......@@ -390,6 +391,7 @@ export default {
this.detailsInfo = data;
this.detailsVisible = true;
}
this.loading = false;
},
// 删除
handleDel(id) {
......
......@@ -380,12 +380,14 @@ export default {
},
// 详情
async checkInfo(id) {
this.loading = true;
let res = await getQueEvaData({ id });
if (res.code == 1) {
let { data } = res;
this.detailsInfo = data;
this.detailsVisible = true;
}
this.loading = false;
},
// 删除
handleDel(id) {
......
......@@ -381,6 +381,7 @@ export default {
},
// 详情
async checkInfo(id) {
this.loading = true;
let res = await getEvaData({ id });
if (res.code == 1) {
let { data } = res;
......@@ -388,6 +389,7 @@ export default {
this.detailsInfo = data;
this.detailsVisible = true;
}
this.loading = false;
},
// 删除
handleDel(id) {
......
......@@ -209,31 +209,15 @@ export default {
// 获取报表
async getPrintList() {
this.loading = true;
let pramse = {
page: this.current,
size: this.size,
siteId: this.siteId,
type: this.searchForm.status,
createTimeStart: this.searchForm.time[0],
createTimeEnd: this.searchForm.time[1],
};
if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`;
} else {
pramse.materialName = `%${this.searchForm.searchName}%`;
}
let res = await getPrintList(pramse);
if (res.code == 1) {
let { data, total } = res.data;
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
}
let { total, data } = await this.getDataList();
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
this.loading = false;
},
// 获取导出数据
async getExportPrintList() {
// 获取数据函数
async getDataList(searchForm) {
let list = [];
let listTotal = 0;
let pramse = {
......@@ -243,6 +227,7 @@ export default {
type: this.searchForm.status,
createTimeStart: this.searchForm.time[0],
createTimeEnd: this.searchForm.time[1],
...searchForm,
};
if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`;
......@@ -250,10 +235,10 @@ export default {
pramse.materialName = `%${this.searchForm.searchName}%`;
}
let res = await getPrintList(pramse);
if (res.data.code == 1) {
let { data, total } = res.data.data;
list = data;
if (res.code == 1) {
let { data, total } = res.data;
listTotal = total;
list = data;
}
return {
data: list,
......@@ -304,7 +289,7 @@ export default {
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
this.dataSection(this.getExportPrintList, {}, (data) => {
this.dataSection(this.getDataList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
return;
......
......@@ -383,11 +383,13 @@ export default {
},
// 详情
async checkInfo({ id }) {
this.loading = true;
let res = await getOrderinfo({ id });
if (res.code == 1) {
this.detailsInfo = res.data;
this.visible = true;
}
this.loading = false;
},
},
};
......
......@@ -32,8 +32,8 @@ import { mapState } from "vuex";
import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel";
import { getSys12345 } from "@/api/dataAdmin";
const tHeader = ["序号", "微信号", "电话号码", "拨打位置", "拨打时间"]; // 导出的表头名信息
const filterVal = ["index", "nickname", "phone", "address", "create_time"]; // 导出的表头字段名,需要导出表格字段名
const tHeader = ["微信号", "电话号码", "拨打位置", "拨打时间"]; // 导出的表头名信息
const filterVal = ["nickname", "phone", "address", "create_time"]; // 导出的表头字段名,需要导出表格字段名
export default {
components: {},
data() {
......
......@@ -50,7 +50,6 @@ import FormDetails from "./components/FormDetails.vue";
import { export2Excel } from "@/utils/js/exportExcel";
import { adminList, letterInfo } from "@/api/dataAdmin";
const tHeader = [
"序号",
"工单编号",
"信件标题",
"信件类别",
......@@ -64,7 +63,6 @@ const tHeader = [
"办理部门",
]; // 导出的表头名信息
const filterVal = [
"index",
"LetterCode",
"strTitle",
"strType",
......@@ -294,6 +292,18 @@ export default {
if (this.selectedRowKeys.length && this.excelData.length) {
// 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData);
for (let item of data) {
item.strGender =
item.strGender == 0 ? "" : item.strGender == 1 ? "" : "";
item.source =
item.source == 1
? "微官网"
: item.source == 2
? "自助服务系统"
: item.source == 3
? "数字填单系统"
: "";
}
export2Excel(
this.tHeader,
this.filterVal,
......@@ -306,6 +316,18 @@ export default {
this.$message.warning("暂无数据");
return;
}
for (let item of data) {
item.strGender =
item.strGender == 0 ? "" : item.strGender == 1 ? "" : "";
item.source =
item.source == 1
? "微官网"
: item.source == 2
? "自助服务系统"
: item.source == 3
? "数字填单系统"
: "";
}
export2Excel(
this.tHeader,
this.filterVal,
......@@ -343,12 +365,14 @@ export default {
},
// 查看信息
checkInfo(id) {
this.loading = true;
letterInfo({ id }).then((res) => {
if (res.code == 1) {
let { data } = res;
this.$refs.FormDetails.fromData = data;
this.visible = true;
}
this.loading = false;
});
},
},
......
......@@ -377,6 +377,7 @@ export default {
// 查看信息
checkInfo(id) {
this.loading = true;
getWLLZInfo({
id: id,
}).then((res) => {
......@@ -385,6 +386,7 @@ export default {
this.$refs.FormDetails.fromData = data;
this.visible = true;
}
this.loading = false;
});
},
},
......
......@@ -71,7 +71,7 @@
<a-tag
class="cursor-pointer"
color="blue"
@click="checkInfo(record.id)"
@click="checkInfo(record.id, record)"
>
详细信息
</a-tag>
......@@ -361,6 +361,7 @@ export default {
this.$emit("update", { total, time: this.searchForm.time });
}
this.loading = false;
this.$forceUpdate();
},
// 翻页
......@@ -372,6 +373,7 @@ export default {
// 查看用户信息
async checkUser(row) {
this.loading = true;
let res = await getPeopleanalyse({
idcard: row.people_idcard,
peopleid: row.peopleid,
......@@ -381,11 +383,13 @@ export default {
let { data } = res;
this.userInfo = { ...row, ...data };
}
this.loading = false;
this.userInfoVisible = true;
},
// 查看业务信息
async checkBusiness(row) {
this.loading = true;
let res = await getBusinessEvent({
businessid: row.businessid,
time: this.searchForm.time,
......@@ -397,10 +401,12 @@ export default {
this.businessInfo = data;
this.analysisVisible = true;
}
this.loading = false;
},
// 查看工作人员
async checkWorkman(id) {
this.loading = true;
let res = await getWorkmananalyse({
workmanid: id,
time: this.searchForm.time,
......@@ -410,19 +416,25 @@ export default {
});
let { data } = res;
this.workerInfo = { ...data, ...result.data };
this.loading = false;
this.workerInfoVisible = true;
},
// 查看详细信息
async checkInfo(id) {
async checkInfo(id, row) {
this.loading = true;
let res = await getQueueInfo({
id,
});
if (res.code == 1) {
let { data } = res;
this.detailsInfo = data;
this.detailsInfo = {
...data,
business: row.business,
};
this.detailsVisible = true;
}
this.loading = false;
},
// 勾选表格
......
......@@ -98,14 +98,27 @@
</a-col>
</a-row>
<a-row :gutter="[0, 8]">
<a-col :span="12"> <span>注册方式:</span>身份证注册 </a-col>
<a-col :span="12">
<span>注册方式:</span
>{{
detailsInfo.register_type == "Applets"
? "小程序"
: detailsInfo.register_type == "wechat"
? "公众号"
: detailsInfo.register_type == "app"
? "自助服务终端"
: "--"
}}
</a-col>
<a-col :span="12">
<span>取号设备:</span>{{ detailsInfo.take_name }}
</a-col>
</a-row>
<!-- <a-row :gutter="[0, 8]">
<a-col :span="12"> <span>健康状态:</span>绿码 </a-col>
</a-row> -->
<a-row :gutter="[0, 8]">
<a-col :span="24">
<span>办理业务:</span>{{ detailsInfo.business || "--" }}
</a-col>
</a-row>
<!-- 当前办理步骤标识 -->
<div class="transact-tips2" v-if="detailsInfo.style === 0">
<span class="tips-text"> 排队中 </span>
......@@ -140,7 +153,7 @@
</a-row>
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>叫号设备:</span>{{ detailsInfo.call_name }}
<span>叫号设备:</span>{{ detailsInfo.call_name || "--" }}
</a-col>
</a-row>
</div>
......
......@@ -71,7 +71,7 @@
<a-tag
class="cursor-pointer"
color="blue"
@click="checkInfo(record.id)"
@click="checkInfo(record.id, record)"
>
详细信息
</a-tag>
......@@ -354,6 +354,7 @@ export default {
this.$emit("update", { total, time: this.searchForm.time });
}
this.loading = false;
this.$forceUpdate();
},
// 翻页
......@@ -365,6 +366,7 @@ export default {
// 查看用户信息
async checkUser(row) {
this.loading = true;
let res = await getPeopleanalyse({
idcard: row.people_idcard,
peopleid: row.peopleid,
......@@ -374,11 +376,13 @@ export default {
let { data } = res;
this.userInfo = { ...row, ...data };
}
this.loading = false;
this.userInfoVisible = true;
},
// 查看业务信息
async checkBusiness(row) {
this.loading = true;
let res = await getBusinessEvent({
businessid: row.businessid,
time: this.searchForm.time,
......@@ -390,10 +394,12 @@ export default {
this.businessInfo = data;
this.analysisVisible = true;
}
this.loading = false;
},
// 查看工作人员
async checkWorkman(id) {
this.loading = true;
let res = await getWorkmananalyse({
workmanid: id,
time: this.searchForm.time,
......@@ -403,19 +409,25 @@ export default {
});
let { data } = res;
this.workerInfo = { ...data, ...result.data };
this.loading = false;
this.workerInfoVisible = true;
},
// 查看详细信息
async checkInfo(id) {
async checkInfo(id, row) {
this.loading = true;
let res = await getQueueInfo({
id,
});
if (res.code == 1) {
let { data } = res;
this.detailsInfo = data;
this.detailsInfo = {
...data,
business: row.business,
};
this.detailsVisible = true;
}
this.loading = false;
},
// 勾选表格
......
......@@ -37,8 +37,10 @@
<div class="ellipsis" :title="text">
{{ text ? text : "--" }}
</div>
<div class="ellipsis" :title="record.materiaFullName">
样表全称:{{ record.materiaFullName ? record.materiaFullName : "--" }}
<div class="ellipsis" :title="record.materialFullName">
样表全称:{{
record.materialFullName ? record.materialFullName : "--"
}}
</div>
</template>
<!-- 类型 -->
......@@ -76,8 +78,8 @@ const filterVal = [
"materialName",
"materialFullName",
"deviceName",
"createTime",
"operTime",
"createTime",
]; // 导出的表头字段名,需要导出表格字段名
export default {
data() {
......@@ -115,11 +117,11 @@ export default {
},
{
title: "操作时间",
dataIndex: "createTime",
dataIndex: "operTime",
},
{
title: "查看时间",
dataIndex: "operTime",
dataIndex: "createTime",
customRender: (text) => {
return text ? text : "--";
},
......@@ -173,31 +175,15 @@ export default {
// 获取报表
async getBillList() {
this.loading = true;
let pramse = {
page: this.current,
size: this.size,
siteId: this.siteId,
type: this.searchForm.status,
operTimeStart: this.searchForm.time[0],
operTimeEnd: this.searchForm.time[1],
};
if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`;
} else {
pramse.materialName = `%${this.searchForm.searchName}%`;
}
let res = await getBillList(pramse);
if (res.code == 1) {
let { data, total } = res.data;
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
}
let { total, data } = await this.getDataList();
this.total = total;
this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time });
this.loading = false;
},
// 获取导出数据
async getExportPrintList() {
// 获取数据函数
async getDataList(searchForm) {
let list = [];
let listTotal = 0;
let pramse = {
......@@ -207,6 +193,7 @@ export default {
type: this.searchForm.status,
operTimeStart: this.searchForm.time[0],
operTimeEnd: this.searchForm.time[1],
...searchForm,
};
if (this.searchForm.type == 1) {
pramse.matterName = `%${this.searchForm.searchName}%`;
......@@ -216,8 +203,8 @@ export default {
let res = await getBillList(pramse);
if (res.code == 1) {
let { data, total } = res.data;
list = data;
listTotal = total;
list = data;
}
return {
data: list,
......@@ -257,7 +244,7 @@ export default {
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
this.dataSection(this.getExportPrintList, {}, (data) => {
this.dataSection(this.getDataList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
return;
......
......@@ -11,22 +11,12 @@
class="flex items-center justify-between flex-shrink-0 pl-[10px] pr-[10px]"
>
<div
:class="['tab-item', { active: active == 'CensusType_1' }]"
@click="changeCensusType('CensusType_1')"
v-for="v in CensusTypeList"
:key="v.type"
:class="['tab-item', { active: active == v.type }]"
@click="changeCensusType(v.type)"
>
聚焦服务
</div>
<div
:class="['tab-item', { active: active == 'CensusType_2' }]"
@click="changeCensusType('CensusType_2')"
>
聚焦协同
</div>
<div
:class="['tab-item', { active: active == 'CensusType_3' }]"
@click="changeCensusType('CensusType_3')"
>
聚焦监管
{{ v.name }}
</div>
</div>
<div
......@@ -91,6 +81,20 @@ export default {
data() {
return {
siteId: Storage.get(2, "siteId"),
CensusTypeList: [
{
type: "CensusType_1",
name: "聚焦服务",
},
{
type: "CensusType_2",
name: "聚焦协同",
},
{
type: "CensusType_3",
name: "聚焦监管",
},
],
CensusType_1: [], // 服务
CensusType_2: [], // 协同
CensusType_3: [], // 监管
......
package com.mortals.xhx.module.page.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import com.mortals.xhx.module.page.model.pdu.PageCensusPdu;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.dao.PageAccessDao;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import com.mortals.xhx.module.page.model.pdu.PageCensusPdu;
import com.mortals.xhx.module.page.service.PageAccessService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import java.text.DecimalFormat;
import java.text.ParseException;
......@@ -122,7 +121,7 @@ public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao
if(CollectionUtils.isNotEmpty(todayList)){
for (PageAccessEntity item:todayList){
if(item!=null) {
DecimalFormat decimalFormat=new DecimalFormat(".00");
DecimalFormat decimalFormat=new DecimalFormat("#0.00");
String key = item.getTimeStr() + "_" + item.getFirstCode() + "_" + item.getSecondCode() + "_" + item.getThirdCode() + "_" + item.getFourthCode();
if (mp.containsKey(key)) {
PageAccessEntity last = mp.get(key);
......
......@@ -127,7 +127,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)vo.getValue();
float b = (float)clickSum;
float p = a/b;
DecimalFormat decimalFormat=new DecimalFormat(".00%");
DecimalFormat decimalFormat=new DecimalFormat("#0.00%");
String s = decimalFormat.format(p);
vo.setProportion(s);
}
......@@ -173,7 +173,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)clickSum;
float b = (float)trendCensusVos.size();
float p = a/b;
DecimalFormat decimalFormat=new DecimalFormat(".00");
DecimalFormat decimalFormat=new DecimalFormat("#0.00");
String s = decimalFormat.format(p);
dayAccessAvg = Float.valueOf(s);
}
......@@ -232,8 +232,8 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)clickSum;
float b = (float)item.getAccessCount();
float p = b/a;
DecimalFormat decimalFormat=new DecimalFormat(".00%");
DecimalFormat df=new DecimalFormat(".00");
DecimalFormat decimalFormat=new DecimalFormat("#0.00%");
DecimalFormat df=new DecimalFormat("#0.00");
String s = decimalFormat.format(p);
String s1 = df.format(p);
item.setProportion(s);
......
......@@ -75,7 +75,15 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao,
}
Map<String,Object> result = new HashMap<>();
List<PageWayCensusVo> pageWayCensusVos = dao.getPageWayCensus(pdu);
result.put("links",pageWayCensusVos);
List<PageWayCensusVo> list = new ArrayList<>();
Map<String,String> source = new HashMap<>();
for(PageWayCensusVo item:pageWayCensusVos){
source.put(item.getSource(),item.getSourceName());
if(!source.containsKey(item.getTarget())){
list.add(item);
}
}
result.put("links",list);
List<Map<String, Object>> pageCodes = dao.getPageWayCode(pdu);
result.put("data",pageCodes);
return result;
......
......@@ -8,6 +8,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.utils.LoginAESUtil;
import com.mortals.xhx.module.param.service.ParamService;
......@@ -87,9 +88,11 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
@Override
protected void saveBefore(UserEntity entity, Map<String, Object> model, Context context) throws AppException {
String loginName = LoginAESUtil.decrypt(entity.getLoginName(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
String loginPwd = LoginAESUtil.decrypt(entity.getLoginPwd(),AES_KEY,AES_IV,LoginAESUtil.AES_CBC);
entity.setLoginName(loginName);
entity.setLoginPwd(loginPwd);
if(StringUtils.isNotEmpty(entity.getLoginPwd())) {
String loginPwd = LoginAESUtil.decrypt(entity.getLoginPwd(), AES_KEY, AES_IV, LoginAESUtil.AES_CBC);
entity.setLoginPwd(loginPwd);
}
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment