合并代码
This commit is contained in:
@ -15,4 +15,4 @@ VOLUME ["/etc/nginx/nginx.conf", "/usr/share/nginx/html"]
|
|||||||
|
|
||||||
CMD ["nginx","-g","daemon off;"]
|
CMD ["nginx","-g","daemon off;"]
|
||||||
|
|
||||||
# docker build -t docker.ges.bjgastx.com/itc-web:1.1.10 .
|
# docker build -t docker.ges.bjgastx.com/itc-web:1.1.12 .
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import { LngSmsTemplatePageModel, LngSmsTemplatePageParams, LngSmsTemplatePageResult } from './model/LngSmsTemplateModel';
|
import { LngSmsTemplatePageModel, LngSmsTemplatePageParams, LngSmsTemplatePageResult,
|
||||||
|
LngSmsRecordPageModel, LngSmsRecordPageParams, LngSmsRecordPageResult,
|
||||||
|
} from './model/LngSmsTemplateModel';
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { ErrorMessageMode } from '/#/axios';
|
import { ErrorMessageMode } from '/#/axios';
|
||||||
|
|
||||||
@ -7,10 +9,8 @@ enum Api {
|
|||||||
List = '/system/lngSmsTemplate/list',
|
List = '/system/lngSmsTemplate/list',
|
||||||
Info = '/system/lngSmsTemplate/info',
|
Info = '/system/lngSmsTemplate/info',
|
||||||
LngSmsTemplate = '/system/lngSmsTemplate',
|
LngSmsTemplate = '/system/lngSmsTemplate',
|
||||||
|
Records = '/system/lngSmsTemplate/sendRecord',
|
||||||
|
Resend = '/system/lngSmsTemplate/resend',
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,6 +28,37 @@ export async function getLngSmsTemplatePage(params: LngSmsTemplatePageParams, mo
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 查询LngSmsTemplate分页列表
|
||||||
|
*/
|
||||||
|
export async function getLngSmsRecordPage(params: LngSmsRecordPageParams, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngSmsRecordPageResult>(
|
||||||
|
{
|
||||||
|
url: Api.Records,
|
||||||
|
params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 获取LngSmsTemplate信息
|
||||||
|
*/
|
||||||
|
export async function resend(id: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<any>(
|
||||||
|
{
|
||||||
|
url: Api.Resend,
|
||||||
|
params: { id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 获取LngSmsTemplate信息
|
* @description: 获取LngSmsTemplate信息
|
||||||
*/
|
*/
|
||||||
@ -77,7 +108,7 @@ export async function updateLngSmsTemplate(lngSmsTemplate: Recordable, mode: Err
|
|||||||
* @description: 删除LngSmsTemplate(批量删除)
|
* @description: 删除LngSmsTemplate(批量删除)
|
||||||
*/
|
*/
|
||||||
export async function deleteLngSmsTemplate(ids: string[], mode: ErrorMessageMode = 'modal') {
|
export async function deleteLngSmsTemplate(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||||
return defHttp.delete<boolean>(
|
return defHttp.post<boolean>(
|
||||||
{
|
{
|
||||||
url: Api.LngSmsTemplate,
|
url: Api.LngSmsTemplate,
|
||||||
data: ids,
|
data: ids,
|
||||||
@ -87,3 +118,5 @@ export async function deleteLngSmsTemplate(ids: string[], mode: ErrorMessageMode
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,43 @@ export interface LngSmsTemplatePageModel {
|
|||||||
|
|
||||||
0;
|
0;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: LngSmsTemplate分页参数 模型
|
||||||
|
*/
|
||||||
|
export interface LngSmsRecordPageParams extends BasicPageParams {
|
||||||
|
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
phone: string;
|
||||||
|
|
||||||
|
sendStatus: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: LngSmsTemplate分页返回值模型
|
||||||
|
*/
|
||||||
|
export interface LngSmsRecordPageModel {
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
content: string;
|
||||||
|
|
||||||
|
phone: string;
|
||||||
|
|
||||||
|
sendStatus: string;
|
||||||
|
|
||||||
|
errorMessage: string;
|
||||||
|
|
||||||
|
senderId: string;
|
||||||
|
|
||||||
|
createDate: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: LngSmsTemplate分页返回值结构
|
* @description: LngSmsTemplate分页返回值结构
|
||||||
*/
|
*/
|
||||||
|
export type LngSmsRecordPageResult = BasicFetchResult<LngSmsRecordPageModel>;
|
||||||
|
|
||||||
export type LngSmsTemplatePageResult = BasicFetchResult<LngSmsTemplatePageModel>;
|
export type LngSmsTemplatePageResult = BasicFetchResult<LngSmsTemplatePageModel>;
|
||||||
@ -356,8 +356,14 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
|
|||||||
component: () => import('/@/views/dayPlan/LngAppro/components/createForm.vue'),
|
component: () => import('/@/views/dayPlan/LngAppro/components/createForm.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: (route) => route.query.formName
|
title: (route) => route.query.formName
|
||||||
}
|
path: '/system/LngSmsTemplate/LngSmsRecord',
|
||||||
},
|
name: 'LngDemand',
|
||||||
|
component: () => import('/@/views/system/LngSmsTemplate/LngSmsRecord.vue'),
|
||||||
|
meta: {
|
||||||
|
title: (route) => (route.query.formName || '短信记录')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
115
src/views/system/LngSmsTemplate/LngSmsRecord.vue
Normal file
115
src/views/system/LngSmsTemplate/LngSmsRecord.vue
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
<template>
|
||||||
|
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex">
|
||||||
|
<BasicTable @register="registerTable" ref="tableRef">
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.dataIndex === 'action'">
|
||||||
|
<TableAction :actions="getActions(record)" />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'sendStatus'">
|
||||||
|
{{ record.sendStatus== "SUCCESS" ? "成功" : "失败" }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</PageWrapper>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { BasicTable, useTable, ActionItem, TableAction, TableColumn } from '/@/components/Table'
|
||||||
|
import { getLngSmsRecordPage,resend } from '/@/api/system/LngSmsTemplate'
|
||||||
|
import { FormProps, FormSchema } from '/@/components/Form';
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
const { currentRoute } = useRouter();
|
||||||
|
const SMS_CODE = currentRoute.value.query.code;
|
||||||
|
const tableRef = ref();
|
||||||
|
const searchFormSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
field: 'phone',
|
||||||
|
label: '手机号码',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'sendStatus',
|
||||||
|
label: '发送状态',
|
||||||
|
component: 'XjrSelect',
|
||||||
|
componentProps: {
|
||||||
|
datasourceType: 'dic',
|
||||||
|
params: { itemId: '2034176559801901058' },
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'value',
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const customSearchFormSchema =ref(searchFormSchema);
|
||||||
|
|
||||||
|
|
||||||
|
function getActions(record: Recordable):ActionItem[] {
|
||||||
|
if (record.sendStatus != "SUCCESS") {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
icon: 'ant-design:reload-outlined',
|
||||||
|
tooltip: '重新发送',
|
||||||
|
onClick: function(record: Recordable){
|
||||||
|
console.log(arguments);
|
||||||
|
resend(record.id).then(() => {
|
||||||
|
tableRef.value.reload();
|
||||||
|
});
|
||||||
|
}.bind(null, record)
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [registerTable, { reload }] = useTable({
|
||||||
|
title: '短信记录',
|
||||||
|
api: (params) => getLngSmsRecordPage({ ...params, code: SMS_CODE }),
|
||||||
|
columns: [
|
||||||
|
{ dataIndex: 'code', title: '模板编码', width: 120 },
|
||||||
|
{ dataIndex: 'phone', title: '手机号码', width: 100 },
|
||||||
|
{ dataIndex: 'content', title: '内容', width: 200 },
|
||||||
|
{ dataIndex: 'createDate', title: '发送时间', width: 90 },
|
||||||
|
{ dataIndex: 'sendStatus', title: '状态', width: 60 },
|
||||||
|
{ dataIndex: 'errorMessage', title: '错误信息', width: 120 },
|
||||||
|
],
|
||||||
|
rowKey: 'id',
|
||||||
|
pagination: { pageSize: 10 },
|
||||||
|
scroll: { x: 1200 },
|
||||||
|
useSearchForm: true,
|
||||||
|
formConfig: {
|
||||||
|
rowProps: {gutter: 16},
|
||||||
|
schemas: customSearchFormSchema,
|
||||||
|
fieldMapToTime: [],
|
||||||
|
showResetButton: false,
|
||||||
|
},
|
||||||
|
afterFetch: (res) => {
|
||||||
|
tableRef.value.setToolBarWidth();
|
||||||
|
},
|
||||||
|
striped: false,
|
||||||
|
actionColumn: {
|
||||||
|
width: 80,
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
slots: { customRender: 'action' },
|
||||||
|
},
|
||||||
|
tableSetting: {
|
||||||
|
size: false,
|
||||||
|
setting: false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
:deep(.ant-table-selection-col) {
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hide{
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<LngSmsTemplateModal @register="registerModal" @success="handleSuccess" />
|
<LngSmsTemplateModal @register="registerModal" @success="handleSuccess" />
|
||||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -63,9 +63,15 @@
|
|||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
//所有按钮
|
//所有按钮
|
||||||
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
|
const buttons = ref([
|
||||||
|
{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},
|
||||||
|
{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},
|
||||||
|
{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},
|
||||||
|
{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},
|
||||||
|
{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true},
|
||||||
|
{"isUse":true,"name":"推送记录","code":"sendRecord","icon":"ant-design:share-alt-outlined","isDefault":true}]);
|
||||||
//展示在列表内的按钮
|
//展示在列表内的按钮
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']);
|
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','sendRecord']);
|
||||||
const buttonConfigs = computed(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
return filterButtonAuth(buttons.value);
|
return filterButtonAuth(buttons.value);
|
||||||
})
|
})
|
||||||
@ -74,11 +80,15 @@
|
|||||||
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
|
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const actionButtonConfig = computed(() => {
|
const actionButtonConfig = computed(() => {
|
||||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||||
});
|
});
|
||||||
|
|
||||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,delete : handleDelete,}
|
console.log(buttonConfigs.value)
|
||||||
|
|
||||||
|
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,delete : handleDelete, sendRecord : handleSendRecord}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -169,6 +179,14 @@
|
|||||||
modalVisible.value = true
|
modalVisible.value = true
|
||||||
logId.value = record.id
|
logId.value = record.id
|
||||||
}
|
}
|
||||||
|
function handleSendRecord(record: Recordable) {
|
||||||
|
router.push({
|
||||||
|
path: '/system/LngSmsTemplate/LngSmsRecord',
|
||||||
|
query: {
|
||||||
|
code: record.code
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
// if (schemaIdComputedRef.value) {
|
// if (schemaIdComputedRef.value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user