Procházet zdrojové kódy

reactor:随手拍新增地图位置标点查看;

zhangchong před 4 měsíci
rodič
revize
456d69e654

+ 16 - 0
src/api/snapshot/info.ts

@@ -0,0 +1,16 @@
+/*
+ * @Author: zc
+ * @description 随手拍-信息公开
+ */
+import request from '@/utils/request';
+/**
+ * @description 获取随手拍公告列表
+ * @param {object} params
+ */
+export const getSnapshotBulletinList = (params: object) =>{
+	return request({
+		url: `/api/v1/SnapshotBulletin/bulletin/query`,
+		method: 'get',
+		params
+	});
+	}

+ 11 - 9
src/views/auxiliary/notice/components/Notice-edit.vue

@@ -331,14 +331,16 @@ const openDialog = async (row: any, type: string) => {
 						}
 					}
 				}
-				state.ruleForm.displayLocationArr = [];
-				const arr1 = state.ruleForm.displayLocation.map((item: any) => {
-					return item.key;
-				});
-				for (let i of arr1) {
-					for (let j of bulletinDisplayLocation.value) {
-						if (i === j.dicDataValue) {
-							state.ruleForm.displayLocationArr.push(j);
+				if (state.ruleForm.displayLocation) {
+					state.ruleForm.displayLocationArr = [];
+					const arr1 = state.ruleForm.displayLocation?.map((item: any) => {
+						return item.key;
+					});
+					for (let i of arr1) {
+						for (let j of bulletinDisplayLocation.value) {
+							if (i === j.dicDataValue) {
+								state.ruleForm.displayLocationArr.push(j);
+							}
 						}
 					}
 				}
@@ -544,7 +546,7 @@ const onSubmit = throttle(async (formEl: FormInstance | undefined) => {
 					sourceOrgId: state.ruleForm.sourceOrgId,
 					sourceOrgName: state.ruleForm.sourceOrgName,
 					pushRanges,
-					displayLocation
+					displayLocation,
 				};
 				bulletinUpdate(bulletinRequest)
 					.then(() => {

+ 0 - 11
src/views/snapshot/config/info/audit/index.vue

@@ -1,11 +0,0 @@
-<script setup lang="ts">
-
-</script>
-
-<template>
-
-</template>
-
-<style scoped lang="scss">
-
-</style>

+ 0 - 11
src/views/snapshot/config/info/sspConfig/index.vue

@@ -1,11 +0,0 @@
-<script setup lang="ts">
-
-</script>
-
-<template>
-
-</template>
-
-<style scoped lang="scss">
-
-</style>

+ 173 - 0
src/views/snapshot/info/audit/index.vue

@@ -0,0 +1,173 @@
+<template>
+	<div class="snapshot-info-audit-container layout-padding">
+		<div class="layout-padding-auto layout-padding-view pd20">
+			<vxe-grid v-bind="gridOptions" ref="gridRef">
+				<template #form>
+					<el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent :disabled="gridOptions.loading">
+						<el-form-item label="线索分类" prop="CaseName">
+							<el-input v-model="state.queryParams.CaseName" placeholder="请填写线索分类" clearable @keyup.enter="handleQuery" class="keyword-input" />
+						</el-form-item>
+						<el-form-item label="行业类型" prop="IndustryName">
+							<el-input v-model="state.queryParams.IndustryName" placeholder="请填写行业类型" clearable @keyup.enter="handleQuery" class="keyword-input" />
+						</el-form-item>
+						<el-form-item>
+							<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+							<el-button @click="resetQuery(ruleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+						</el-form-item>
+					</el-form>
+				</template>
+				<template #toolbar_buttons>
+					<el-button type="primary" @click="onAdd" v-auth="'snapshot:config:clue:add'">
+						<SvgIcon name="ele-Plus" class="mr5" />新增线索
+					</el-button>
+				</template>
+				<template #action="{row}">
+					<el-button link type="primary" @click="onEdit(row)" v-auth="'snapshot:config:clue:edit'" title="编辑线索"> 编辑 </el-button>
+				</template>
+				<template #pager>
+					<pagination
+						@pagination="queryList"
+						:total="state.total"
+						v-model:current-page="state.queryParams.PageIndex"
+						v-model:page-size="state.queryParams.PageSize"
+						:disabled="state.loading"
+					/>
+				</template>
+			</vxe-grid>
+		</div>
+		<!--  新增线索  -->
+		<clue-add ref="clueAddRef" @updateList="queryList" />
+		<!--  修改线索  -->
+		<clue-edit ref="clueEditRef" @updateList="queryList" />
+	</div>
+</template>
+
+<script lang="tsx" setup name="snapshotInfoAudit">
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
+import { FormInstance } from 'element-plus';
+import { getClueList, getIndustryList } from '@/api/snapshot/config';
+
+// 引入组件
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
+const ClueAdd = defineAsyncComponent(() => import('@/views/snapshot/config/clue/components/Clue-add.vue')); // 新增线索
+const ClueEdit = defineAsyncComponent(() => import('@/views/snapshot/config/clue/components/Clue-edit.vue')); // 修改线索
+
+// 定义变量内容
+const state = reactive<any>({
+	loading: false,
+	queryParams: {
+		// 查询参数
+		PageIndex: 1,
+		PageSize: 20,
+		CaseName: null, // 线索名称
+		IndustryName: null, // 行业类型
+	},
+	total: 0, // 总条数
+});
+
+const gridOptions = reactive<any>({
+	loading: false,
+	border: true,
+	showOverflow: true,
+	columnConfig: {
+		resizable: true,
+	},
+	scrollY: {
+		enabled: true,
+		gt: 100,
+	},
+	toolbarConfig: {
+		zoom: true,
+		custom: true,
+		refresh: {
+			queryMethod: () => {
+				handleQuery();
+			},
+		},
+		slots: {
+			buttons: 'toolbar_buttons',
+		},
+	},
+	customConfig: {
+		storage: true,
+	},
+	id: 'snapshotConfigClue',
+	rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
+	height: 'auto',
+	columns: [
+		{
+			field: 'name',
+			title: '行业类型',
+		},
+		{
+			field: 'industryName',
+			title: '线索分类',
+		},
+		{
+			field: 'citizenReadPackAmountTxt',
+			title: '市民红包',
+		},	{
+			field: 'guiderReadPackAmountTxt',
+			title: '网格员红包',
+		},
+		{
+			field: 'isEnable',
+			title: '启用状态',
+			width: 100,
+			slots: {
+				default: ({ row }: any) => {
+					return row.isEnable ? '启用' : '禁用';
+				},
+			},
+		},
+		{
+			field: 'displayOrder',
+			title: '排序',
+		},
+		{ title: '操作', width: 90, fixed: 'right', align: 'center', slots: { default: 'action' } },
+	],
+	data: [],
+});
+const ruleFormRef = ref<any>(null); // 表单ref
+/** 搜索按钮操作 节流操作 */
+const handleQuery = () => {
+	state.queryParams.PageIndex = 1;
+	queryList();
+};
+// 获取参数列表
+const queryList = () => {
+	state.loading = true;
+	gridOptions.loading = true;
+	getClueList(state.queryParams)
+		.then((res) => {
+			state.loading = false;
+			gridOptions.data = res.result.items ?? [];
+			state.total = res.result.total ?? 0;
+			gridOptions.loading = false;
+		})
+		.finally(() => {
+			state.loading = false;
+			gridOptions.loading = false;
+		});
+};
+// 重置表单
+const resetQuery = (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	formEl.resetFields();
+	queryList();
+};
+// 参数
+const clueAddRef = ref<RefType>(); // 参数行业
+const onAdd = () => {
+	clueAddRef.value.openDialog();
+};
+// 编辑
+const clueEditRef = ref<RefType>();
+const onEdit = (row: any) => {
+	clueEditRef.value.openDialog(row.id);
+};
+// 页面加载时
+onMounted(() => {
+	queryList();
+});
+</script>

+ 204 - 0
src/views/snapshot/info/sspConfig/index.vue

@@ -0,0 +1,204 @@
+<template>
+	<div class="snapshot-info-ssp-config-container layout-padding">
+		<div class="layout-padding-auto layout-padding-view pd20">
+			<vxe-grid v-bind="gridOptions" ref="gridRef">
+				<template #form>
+					<el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent :disabled="gridOptions.loading">
+						<el-form-item label="线索分类" prop="CaseName">
+							<el-input
+								v-model="state.queryParams.CaseName"
+								placeholder="请填写线索分类"
+								clearable
+								@keyup.enter="handleQuery"
+								class="keyword-input"
+							/>
+						</el-form-item>
+						<el-form-item label="行业类型" prop="IndustryName">
+							<el-input
+								v-model="state.queryParams.IndustryName"
+								placeholder="请填写行业类型"
+								clearable
+								@keyup.enter="handleQuery"
+								class="keyword-input"
+							/>
+						</el-form-item>
+						<el-form-item>
+							<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+							<el-button @click="resetQuery(ruleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+						</el-form-item>
+					</el-form>
+				</template>
+				<template #toolbar_buttons>
+					<el-button type="primary" @click="onAdd" v-auth="'snapshot:config:clue:add'"> <SvgIcon name="ele-Plus" class="mr5" />新增 </el-button>
+				</template>
+				<template #action="{ row }">
+					<el-button link type="primary" @click="onEdit(row)" v-auth="'snapshot:config:clue:edit'" title="编辑线索"> 编辑 </el-button>
+				</template>
+				<template #pager>
+					<pagination
+						@pagination="queryList"
+						:total="state.total"
+						v-model:current-page="state.queryParams.PageIndex"
+						v-model:page-size="state.queryParams.PageSize"
+						:disabled="state.loading"
+					/>
+				</template>
+			</vxe-grid>
+		</div>
+		<!--  新增线索  -->
+		<clue-add ref="clueAddRef" @updateList="queryList" />
+		<!--  修改线索  -->
+		<clue-edit ref="clueEditRef" @updateList="queryList" />
+	</div>
+</template>
+
+<script lang="tsx" setup name="snapshotInfoSspConfig">
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
+import { FormInstance } from 'element-plus';
+import { getClueList, getIndustryList } from '@/api/snapshot/config';
+import { getSnapshotBulletinList } from '@/api/snapshot/info';
+
+// 引入组件
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
+const ClueAdd = defineAsyncComponent(() => import('@/views/snapshot/config/clue/components/Clue-add.vue')); // 新增线索
+const ClueEdit = defineAsyncComponent(() => import('@/views/snapshot/config/clue/components/Clue-edit.vue')); // 修改线索
+
+// 定义变量内容
+const state = reactive<any>({
+	loading: false,
+	queryParams: {
+		// 查询参数
+		PageIndex: 1,
+		PageSize: 20,
+		CaseName: null, // 线索名称
+		IndustryName: null, // 行业类型
+	},
+	total: 0, // 总条数
+});
+
+const gridOptions = reactive<any>({
+	loading: false,
+	border: true,
+	showOverflow: true,
+	columnConfig: {
+		resizable: true,
+	},
+	scrollY: {
+		enabled: true,
+		gt: 100,
+	},
+	toolbarConfig: {
+		zoom: true,
+		custom: true,
+		refresh: {
+			queryMethod: () => {
+				handleQuery();
+			},
+		},
+		slots: {
+			buttons: 'toolbar_buttons',
+		},
+	},
+	customConfig: {
+		storage: true,
+	},
+	id: 'snapshotConfigClue',
+	rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
+	height: 'auto',
+	columns: [
+		{
+			field: 'bulletinTypeName',
+			title: '类别名称',
+		},
+		{
+			field: 'title',
+			title: '标题',
+			minWidth: 200,
+		},
+		{
+			field: 'citizenReadPackAmountTxt',
+			title: '文档编码',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '阅读次数',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '部门名称',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '发布人',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '发布时间',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '是否公开',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '网站公开',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '微信公开',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '微博公开',
+		},
+		{
+			field: 'guiderReadPackAmountTxt',
+			title: '审批状态',
+		},
+		{ title: '操作', width: 90, fixed: 'right', align: 'center', slots: { default: 'action' } },
+	],
+	data: [],
+});
+const ruleFormRef = ref<any>(null); // 表单ref
+/** 搜索按钮操作 节流操作 */
+const handleQuery = () => {
+	state.queryParams.PageIndex = 1;
+	queryList();
+};
+// 获取参数列表
+const queryList = () => {
+	state.loading = true;
+	gridOptions.loading = true;
+	getSnapshotBulletinList(state.queryParams)
+		.then((res) => {
+			state.loading = false;
+			gridOptions.data = res.result.items ?? [];
+			state.total = res.result.total ?? 0;
+			gridOptions.loading = false;
+		})
+		.finally(() => {
+			state.loading = false;
+			gridOptions.loading = false;
+		});
+};
+// 重置表单
+const resetQuery = (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	formEl.resetFields();
+	queryList();
+};
+// 参数
+const clueAddRef = ref<RefType>(); // 参数行业
+const onAdd = () => {
+	clueAddRef.value.openDialog();
+};
+// 编辑
+const clueEditRef = ref<RefType>();
+const onEdit = (row: any) => {
+	clueEditRef.value.openDialog(row.id);
+};
+// 页面加载时
+onMounted(() => {
+	queryList();
+});
+</script>