diff --git a/examples/router/axios.js b/examples/router/axios.js
index ffb85312..dd43b267 100644
--- a/examples/router/axios.js
+++ b/examples/router/axios.js
@@ -24,9 +24,12 @@ instance.interceptors.request.use(config => {
} else if (/#url-/.test(location.hash)) {
config.baseURL = location.hash.replace(/#url-/, '/')
}
- if (["/xsjr", "/omsapi", "/tfx", "/qxn"].includes(config.baseURL)) {
+ if (["/xsjr", "/omsapi", "/tfx"].includes(config.baseURL)) {
config.url = config.url.replace(/(app|auth|admin|api)\//, "")
}
+ if (['/qxn'].includes(config.baseURL)) {
+ config.url = config.url.replace(/(app|auth|admin)\//, "api/")
+ }
return config
}, error => Message.error(error))
export default instance
diff --git a/project/qianxinan/AppIntegralRule/AppIntegralRule.vue b/project/qianxinan/AppIntegralRule/AppIntegralRule.vue
index d716f508..088afefd 100644
--- a/project/qianxinan/AppIntegralRule/AppIntegralRule.vue
+++ b/project/qianxinan/AppIntegralRule/AppIntegralRule.vue
@@ -1,14 +1,14 @@
-
- 添加
-
-
+
+
+
+
+
@@ -25,10 +25,8 @@
- 停用
- 启用
- 编辑
- 删除
+ 停用
+ 启用
@@ -36,88 +34,6 @@
-
-
-
@@ -148,113 +64,51 @@ export default {
}
return {
search: {
- status: "",
- systemRuleId: "",
- ruleName: ""
+ status: '',
+ category: '',
+ type: '',
},
- systemRuleIdList: [],
page: {current: 1, size: 10, total: 0},
colConfigs: [
{
- prop: "parentRuleName",
+ prop: "type",
label: "类型",
- dict: "integralRuleEventType",
+ dict: "srType",
},
- {prop: "ruleName", label: "事件", dict: "integralRuleEvent"},
- {prop: "ruleType", label: "规则", dict: "integralRuleRuleType"},
+ {prop: "category", label: "事件", dict: "srcategory"},
+ {prop: "score", label: "规则"},
{
- prop: "scoringCycle",
+ prop: "cycle",
label: "周期范围",
- dict: "integralRuleScoringCycle",
- render: (h, {row}) => {
- return h(
- "span",
- {},
- row.numberLimit.length
- ? $dict.getLabel("integralRuleScoringCycle", row.scoringCycle)
- : $dict.getLabel("integralRuleScoringCycle", row.scoringCycle) +
- row.numberLimit +
- "次"
- );
- },
- },
- {slot: "integral", label: "积分分值", align: "center"},
- {
- prop: "validRangeType",
- label: "有效范围",
- formart: (v) => (v == 0 ? "全局" : "指定网格"),
+ dict: "srCycle",
},
+ // {slot: "integral", label: "积分分值", align: "center"},
+ // {
+ // prop: "validRangeType",
+ // label: "有效范围",
+ // formart: (v) => (v == 0 ? "全局" : "指定网格"),
+ // },
{
prop: "status",
label: "状态",
align: "center",
width: 96,
- dict: "integralRuleStatus",
+ dict: "srStatus",
},
{slot: "options", label: "操作", align: "center"},
],
tableData: [],
- dialog: false,
- form: {
- ruleType: "0",
- systemRuleId: "",
- ruleName: "",
- scoringCycle: "",
- numberLimit: "",
- integral: "",
- validRangeType: "0",
- validRangeData: "",
- },
- formRules: {
- systemRuleId: [
- {required: true, message: "请选择事件/类型", trigger: "change"},
- ],
- ruleName: [
- {required: true, message: "请输入自定义事件", trigger: "change"},
- ],
- scoringCycle: [
- {required: true, message: "请选择周期范围", trigger: "change"},
- ],
- integral: [{required: true, validator: validcode, trigger: "blur"},],
- validRangeType: [
- {required: true, message: "请选择有效范围", trigger: "change"},
- ],
- },
- rulesOps: [],
- rulesProps: {
- label: "ruleName",
- value: "id",
- checkStrictly: true,
- },
- radio: 0,
- treeObj: {
- treeList: [],
- defaultProps: {
- label: "girdName",
- value: "id",
- children: 'children',
- isLeaf: 'leaf'
- },
- },
- treeSelected: {},
- girdInfoList: [],
- rulueType: "0",
- girdNameList: [],
- list: [],
- isOneAndTen: false,
};
},
created() {
- this.$dict.load("integralRuleStatus", "integralRuleRuleType", "integralRuleScoringCycle",
- "integralRuleEvent", "integralRuleEventType").then(() => {
+ this.$dict.load('srStatus', 'srCategory', 'srType').then(() => {
this.getList();
- this.getRulesList();
});
},
methods: {
getList() {
this.instance
- .post(`/app/appintegralrule/list`, null, {
+ .post(`/app/appscorerule/list`, null, {
params: {
...this.search,
...this.page,
@@ -267,50 +121,10 @@ export default {
}
});
},
- closed() {
- this.form = {
- ruleType: "0",
- systemRuleId: "",
- ruleName: "",
- scoringCycle: "",
- numberLimit: "",
- integral: "",
- validRangeType: "0",
- validRangeData: "",
- };
- this.girdInfoList = []
- this.treeSelected = {}
- },
- toEdit(row) {
- this.form = {...row}
- if (this.form?.validRangeData) {
- this.girdInfoList = JSON.parse(this.form.validRangeData)
- this.girdNameList = this.girdInfoList.map(e => e.girdName)
- }
- this.$nextTick(() => {
- this.dialog = true;
- });
- },
- remove(id) {
- this.$confirm("删除后不可恢复,是否要删除该规则?", {
- type: "error",
- }).then(() => {
- this.instance
- .post(`/app/appintegralrule/delete?ids=${id}`)
- .then((res) => {
- if (res.code == 0) {
- this.$message.success("删除成功!");
- this.getList();
- }
- });
- });
- },
changeStatus(id, status) {
let text = status == 1 ? "启用" : "停用";
this.$confirm(`确定${text}该条规则?`).then(() => {
- this.instance
- .post(`/app/appintegralrule/enableStatus?id=${id}`)
- .then((res) => {
+ this.instance.post(`/app/appscorerule/enable?id=${id}`).then((res) => {
if (res.code == 0) {
this.$message.success(`${text}成功!`);
this.getList();
@@ -318,146 +132,6 @@ export default {
});
});
},
- onConfirm() {
- this.$refs.DialogForm.validate((valid) => {
- if (valid) {
- let formData = this.$copy(this.form);
- // formData.ladderRule = JSON.stringify(formData.ladderRule)
- formData.integral = formData.integral || 0;
- this.instance
- .post(`/app/appintegralrule/addOrUpdate`, formData)
- .then((res) => {
- if (res.code == 0) {
- this.$message.success(
- `${this.isEdit ? "编辑成功" : "添加成功"}`
- );
- this.dialog = false;
- this.getList();
- this.closed();
- this.girdInfoList = []
- this.girdNameList = []
- }
- });
- } else {
- return false;
- }
- });
- },
- handleTypeSearch(v) {
- this.systemRuleIdList = v
- this.search.systemRuleId = v?.[v.length - 1];
- this.search.ruleName = this.$refs.eventTypeSearch.getCheckedNodes()[0]?.label
- this.page.current = 1;
- this.$refs.eventTypeSearch.dropDownVisible = false;
- this.getList();
- },
- handleTypeForm(v) {
- if (this.dialog) {
- if(v[0] == '1' || v[0]== '10') {
- this.form.scoringCycle = '0'
- this.form.numberLimit = '1'
- this.isOneAndTen = true
- } else {
- this.form.scoringCycle = ''
- this.form.numberLimit = ''
- this.isOneAndTen = false
- }
- this.form.systemRuleId = v?.[v.length - 1];
- }
- },
- handleDelete(i) {
- this.$confirm("是否要删除该规则?")
- .then(() => {
- this.form.ladderRule.splice(i, 1);
- })
- .catch(() => 0);
- },
- checkIntegral(v) {
- return /\.\d{2,}$/.test(v) ? Math.abs(v).toFixed(1) : Math.abs(v);
- },
- getRulesList() {
- this.instance
- .post(`/app/appintegralsystemrule/list?current=1&size=3000`)
- .then((res) => {
- if (res?.data) {
- this.rulesOps = this.toTree(res.data.records);
- this.rulesOps.push({
- ruleName: "自定义",
- id: "自定义",
- });
- }
- });
- },
- // 转树形结构
- toTree(data) {
- let result = [];
- if (!Array.isArray(data)) {
- return result;
- }
- let map = {};
- data.forEach((item) => {
- map[item.id] = item;
- });
- data.forEach((item) => {
- let parent = map[item.parentRuleId];
- if (parent) {
- (parent.children || (parent.children = [])).push(item);
- } else {
- result.push(item);
- }
- });
- return result;
- },
- getCheckedTree() {
- const selected = Object.values(this.treeSelected)
- if (!selected.length) {
- return this.$message.error("请选择网格");
- }
-
- this.girdInfoList = selected.map((item) => {
- return {...item, checkType: true};
- });
- let validRangeData = selected.map((e) => ({id: e.id, girdName: e.girdName}))
- this.girdNameList = validRangeData.map(e => e.girdName)
- this.form.validRangeData = JSON.stringify(validRangeData)
- },
- beforeSelectTree() {
- this.instance.post(`/app/appgirdinfo/listAll3`, null, null).then((res) => {
- if (res?.data) {
- this.list = res.data.map(e => ({...e, checked: !!this.girdInfoList.find(s => s.id == e.id)}))
- this.girdInfoList.map(e => this.treeSelected[e.id] = e)
- this.treeObj.treeList = this.$arr2tree(this.list, {parent: 'parentGirdId'})
- }
- });
- },
- handleTreeChecked(data) {
- this.list.forEach(v => {
- return {
- ...v,
- checked: false
- }
- })
- data.checked = !data.checked
- if (data.checked) {
- this.treeSelected[data.id] = data
- } else {
- delete this.treeSelected[data.id]
- }
- }
- },
- computed: {
- isEdit() {
- return !!this.form.id;
- },
- dialogTitle() {
- return this.isEdit ? "编辑积分规则" : "添加积分规则";
- },
- etOps() {
- return {
- value: "id",
- label: "ruleName",
- };
- },
},
};
diff --git a/project/qianxinan/AppIntegralStatistics/AppIntegralStatistics.vue b/project/qianxinan/AppIntegralStatistics/AppIntegralStatistics.vue
index d8a656e0..8eb66da2 100644
--- a/project/qianxinan/AppIntegralStatistics/AppIntegralStatistics.vue
+++ b/project/qianxinan/AppIntegralStatistics/AppIntegralStatistics.vue
@@ -8,7 +8,7 @@
{{ item }}
-
@@ -22,11 +22,11 @@
-
{{ data.nowIntegral || 0 }}
+ {{ data['积分余额汇总'] }}
发放积分
-
{{ data.addIntegral || 0 }}
+
{{ data['发放积分'] }}
消耗积分
@@ -42,7 +42,7 @@
-
网格积分排行
+
部门积分排行
@@ -56,40 +56,22 @@
-
-
+
-
-
-
- {{ row.integralRuleName }}
- {{ row.eventDesc }}
-
-
-
-
- {{ row.eventType }}
- {{ row.integralRuleName }}
-
-
-
-
- {{ row.changeIntegral | formatTime }}
- {{ row.integralCalcType == 0 ? '-' : '+' }}{{ row.changeIntegral }}
-
-
详情
@@ -103,20 +85,12 @@
-
-
-
- {{ details.integralRuleName }}
- {{ details.eventDesc }}
-
+
+
+
-
- {{ details.changeIntegral | formatTime }}
-
-
- {{ details.changeIntegral > 0 ? '+' : '-' }}{{ details.changeIntegral }}
-
-
+
+
@@ -156,9 +130,9 @@ export default {
tableData: [],
search: {
current: 1,
- userName: '',
- girdId: '',
- integralType: '',
+ name: '',
+ departId: '',
+ scoreType: '',
startTime: '',
endTime: '',
},
@@ -180,7 +154,7 @@ export default {
girdArr: [],
girdOptions: [],
defaultProps: {
- label: 'girdName',
+ label: 'name',
value: 'id',
children: 'children',
checkStrictly: true,
@@ -197,24 +171,23 @@ export default {
...mapState(['user']),
colConfigs() {
return [
- { prop: "integralUserName", label: '姓名', align: "left", width: "200px" },
- { prop: "girdName", label: '所属网格', align: "center", width: "180px" },
- { slot: "eventDesc"},
- { slot: "integralType", label: '类型' },
- { slot: "changeIntegral", label: '积分变动', align: "center", },
- { prop: "nowIntegral", label: '剩余积分', align: "center", },
+ { prop: "name", label: '姓名', align: "left", width: "200px" },
+ { prop: "departName", label: '所属部门', align: "center", width: "180px" },
+ { prop: "eventDesc", label: '事件', align: "center",'show-overflow-tooltip': true},
+ { prop: "scoreType", label: '类型', align: "center", width: "240px", dict: "srScoreType"},
+ { slot: "changeScore", label: '变动积分', align: "center", },
+ { prop: "nowScore", label: '剩余积分', align: "center", },
{ prop: "createTime", label: '时间', align: "center", },
- { slot: "options" }
+ { slot: "options" },
]
}
},
created() {
this.time = [dayjs().subtract(7,'week').format('YYYY-MM-DD'),dayjs().format('YYYY-MM-DD')]
this.getTableData()
- this.$dict.load('epidemicDangerousAreaLevel','integralType','integralRuleEvent','integralRuleEventType').then(() => {
+ this.$dict.load('epidemicDangerousAreaLevel','integralType','integralRuleEvent','integralRuleEventType', 'srScoreType').then(() => {
this.getStatistics()
this.getGridList()
- this.getRanking()
this.search.startTime = this.time?.[0]
this.search.endTime = this.time?.[1]
this.getTableData()
@@ -223,48 +196,35 @@ export default {
methods: {
// 统计接口
getStatistics() {
- this.instance.post('/app/appintegraluser/allGirdIntegral',null, {
+ this.instance.post('/app/appscoredetail/totalityStatistics',null, {
params: {
type: this.type,
- girdId: this.girdId,
+ departId: this.girdId,
startTime: this.startTime,
endTime: this.endTime,
}
}).then(res => {
if(res?.data) {
this.data = res.data
- }
- })
- },
-
- // 人员、网格排行
- getRanking() {
- this.instance.post('/app/appintegraluser/userAndGirdIntegralSort',null,{
- params: {
- type: this.type,
- girdId: this.girdId,
- startTime: this.startTime,
- endTime: this.endTime
- }
- }).then((res) => {
- if(res?.data) {
- this.userSortListX = res.data.userSortList.map(e=> e.userName).reverse()
- this.userSortListY = res.data.userSortList.map(e=> e.changeIntegral).reverse()
- this.girdSortListX = res.data.girdSortList.map(e=> e.girdName).reverse()
- this.girdSortListY = res.data.girdSortList.map(e=> e.changeIntegral).reverse()
+ this.userSortListX = res.data.userSortList.map(e=> e.name).reverse()
+ this.userSortListY = res.data.userSortList.map(e=> e.score).reverse()
+ this.girdSortListX = res.data.departSortList.map(e=> e.name).reverse()
+ this.girdSortListY = res.data.departSortList.map(e=> e.score).reverse()
this.getColEcherts1(this.userSortListX,this.userSortListY)
this.getColEcherts2(this.girdSortListX,this.girdSortListY)
}
})
},
+
// 积分明细
getTableData() {
- this.instance.post('/app/appintegraluser/girdIntegralDetail',null,{
+ this.instance.post('/app/appscoredetail/list',null,{
params: {
...this.search,
current: this.current,
size: this.size,
total: this.total,
+ departId: this.search.girdId
}
}).then(res => {
if(res?.data) {
@@ -419,11 +379,10 @@ export default {
this.girdId = val?.[val.length - 1]
this.$refs.cascader1.dropDownVisible = false;
this.getStatistics()
- this.getRanking()
},
// 所有网格
getGridList() {
- this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => {
+ this.instance.post(`/app/wxcp/wxdepartment/listAll`).then((res) => {
if (res?.code == 0) {
this.girdOptions = this.toTree(res.data)
}
@@ -441,7 +400,7 @@ export default {
map[item.id] = item;
});
data.forEach(item => {
- let parent = map[item.parentGirdId];
+ let parent = map[item.parentid];
if (parent) {
(parent.children || (parent.children = [])).push(item);
} else {
@@ -457,7 +416,6 @@ export default {
}
this.type = index
this.getStatistics()
- this.getRanking()
},
open(id) {
@@ -472,7 +430,7 @@ export default {
},
getDetail(id) {
- this.instance.post(`/app/appintegraldetail/queryDetailById?id=${id}`).then(res=> {
+ this.instance.post(`/app/appscoredetail/queryDetailById?id=${id}`).then(res=> {
if(res?.data) {
this.details = res.data
if(res.data.enclosure) {
@@ -494,7 +452,6 @@ export default {
this.endTime = this.timeList?.[1]
this.dialogDate = false
this.getStatistics()
- this.getRanking()
},
},
diff --git a/project/qianxinan/AppPointsDetails/AppPointsDetails.vue b/project/qianxinan/AppPointsDetails/AppPointsDetails.vue
index 9d6d6d96..3265db78 100644
--- a/project/qianxinan/AppPointsDetails/AppPointsDetails.vue
+++ b/project/qianxinan/AppPointsDetails/AppPointsDetails.vue
@@ -1,363 +1,63 @@
-
-
-
-
-
- 批量调整积分
-
-
-
-
-
-
-
-
-
-
-
-
- 调整积分
- 详情
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
diff --git a/project/qianxinan/AppPointsDetails/components/Detail.vue b/project/qianxinan/AppPointsDetails/components/Detail.vue
new file mode 100644
index 00000000..98d9ef48
--- /dev/null
+++ b/project/qianxinan/AppPointsDetails/components/Detail.vue
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
积分余额
+
{{ data.nowScore || 0 }}
+
+
+
已用积分
+
{{ data.usedIntegral || 0 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/project/qianxinan/AppPointsDetails/components/List.vue b/project/qianxinan/AppPointsDetails/components/List.vue
new file mode 100644
index 00000000..ceeefbc4
--- /dev/null
+++ b/project/qianxinan/AppPointsDetails/components/List.vue
@@ -0,0 +1,356 @@
+
+
+
+
+
+
+ 批量调整积分
+
+
+
+
+
+
+
+
+
+
+
+
+ 调整积分
+ 详情
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+