Browse Source

政策法规

master
赵鹏 1 month ago
parent
commit
479be51a5b
  1. 14
      index.html
  2. BIN
      public/loading_logo.png
  3. 83
      src/api/system/policy/index.ts
  4. 13
      src/views/system/policy/PolicyForm.vue
  5. 2
      src/views/system/policy/index.vue

14
index.html

@ -17,7 +17,7 @@
justify-content: center;
align-items: center;
flex-direction: column;
background: #f0f2f5;
background: #17C653;
}
.app-loading .app-loading-wrap {
@ -40,7 +40,7 @@
}
.app-loading .app-loading-logo {
width: 100px;
width: 400px;
margin: 0 auto 15px auto;
}
@ -57,7 +57,7 @@
position: absolute;
width: 100%;
height: 100%;
border: 4px solid #2d8cf0;
border: 4px solid #ffffff;
border-bottom: 0;
border-left-color: transparent;
border-radius: 50%;
@ -70,7 +70,7 @@
left: calc(50% - 20px);
width: 40px;
height: 40px;
border: 4px solid #87bdff;
border: 4px solid #ffffff;
border-right: 0;
border-top-color: transparent;
border-radius: 50%;
@ -128,8 +128,8 @@
<div class="app-loading">
<div class="app-loading-wrap">
<div class="app-loading-title">
<img src="/logo.gif" class="app-loading-logo" alt="Logo" />
<div class="app-loading-title">%VITE_APP_TITLE%</div>
<img src="/loading_logo.png" class="app-loading-logo" alt="Logo" />
<!-- <div class="app-loading-title">%VITE_APP_TITLE%</div> -->
</div>
<div class="app-loading-item">
<div class="app-loading-outter"></div>
@ -140,7 +140,7 @@
</div>
<script type="module" src="/src/main.ts"></script>
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77"></script>
<!-- <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77"></script> -->
</body>

BIN
public/loading_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

83
src/api/system/policy/index.ts

@ -1,41 +1,42 @@
import request from '@/config/axios'
// 政策法规 VO
export interface PolicyVO {
id: number // id
name: string // 名称
context: string // 内容
}
// 政策法规 API
export const PolicyApi = {
// 查询政策法规分页
getPolicyPage: async (params: any) => {
return await request.get({ url: `/system/policy/page`, params })
},
// 查询政策法规详情
getPolicy: async (id: number) => {
return await request.get({ url: `/system/policy/get?id=` + id })
},
// 新增政策法规
createPolicy: async (data: PolicyVO) => {
return await request.post({ url: `/system/policy/create`, data })
},
// 修改政策法规
updatePolicy: async (data: PolicyVO) => {
return await request.put({ url: `/system/policy/update`, data })
},
// 删除政策法规
deletePolicy: async (id: number) => {
return await request.delete({ url: `/system/policy/delete?id=` + id })
},
// 导出政策法规 Excel
exportPolicy: async (params) => {
return await request.download({ url: `/system/policy/export-excel`, params })
},
}
import request from '@/config/axios'
// 政策法规 VO
export interface PolicyVO {
id: number // id
name: string // 名称
context: string // 内容
effectiveDate: Date // 生效日期
}
// 政策法规 API
export const PolicyApi = {
// 查询政策法规分页
getPolicyPage: async (params: any) => {
return await request.get({ url: `/system/policy/page`, params })
},
// 查询政策法规详情
getPolicy: async (id: number) => {
return await request.get({ url: `/system/policy/get?id=` + id })
},
// 新增政策法规
createPolicy: async (data: PolicyVO) => {
return await request.post({ url: `/system/policy/create`, data })
},
// 修改政策法规
updatePolicy: async (data: PolicyVO) => {
return await request.put({ url: `/system/policy/update`, data })
},
// 删除政策法规
deletePolicy: async (id: number) => {
return await request.delete({ url: `/system/policy/delete?id=` + id })
},
// 导出政策法规 Excel
exportPolicy: async (params) => {
return await request.download({ url: `/system/policy/export-excel`, params })
},
}

13
src/views/system/policy/PolicyForm.vue

@ -10,6 +10,14 @@
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="生效日期" prop="effectiveDate">
<el-date-picker
v-model="formData.effectiveDate"
type="date"
placeholder="请选择生效日期"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="内容" prop="context">
<Editor v-model="formData.context" height="350px" />
</el-form-item>
@ -37,8 +45,12 @@ const formData = ref({
id: undefined,
name: undefined,
context: undefined,
effectiveDate: Date()
})
const formRules = reactive({
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
context: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
effectiveDate: [{ required: true, message: '生效日期不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
@ -90,6 +102,7 @@ const resetForm = () => {
id: undefined,
name: undefined,
context: undefined,
effectiveDate: Date()
}
formRef.value?.resetFields()
}

2
src/views/system/policy/index.vue

@ -57,6 +57,8 @@
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<!-- <el-table-column label="id" align="center" prop="id" /> -->
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="生效日期" align="center" prop="effectiveDate" :formatter="dateFormatter2" />
<el-table-column
label="创建时间"
align="center"

Loading…
Cancel
Save