diff --git a/.env.development b/.env.development index 792769c..397fb47 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ ENV = 'development' # 若依管理系统/开发环境 # VUE_APP_BASE_API = 'https://vue.ruoyi.vip/prod-api' -VUE_APP_BASE_API = 'http://39.101.188.84:9034' +VUE_APP_BASE_API = 'http://192.168.0.108:9034' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/volunteer/gxhzs/gxhzsgl/index.js b/src/api/volunteer/gxhzs/gxhzsgl/index.js index bf3b5c3..e40f3a6 100644 --- a/src/api/volunteer/gxhzs/gxhzsgl/index.js +++ b/src/api/volunteer/gxhzs/gxhzsgl/index.js @@ -3,7 +3,7 @@ import request from "@/utils/request"; // 查询证书管理列表 export function listCertificates(query) { return request({ - url: "/system/certificates/list", + url: "/zhiyuanzhe/certificates/list", method: "get", params: query, }); @@ -12,7 +12,7 @@ export function listCertificates(query) { // 查询证书管理详细 export function getCertificates(id) { return request({ - url: "/system/certificates/" + id, + url: "/zhiyuanzhe/certificates/" + id, method: "get", }); } @@ -20,7 +20,7 @@ export function getCertificates(id) { // 新增证书管理 export function addCertificates(data) { return request({ - url: "/system/certificates", + url: "/zhiyuanzhe/certificates", method: "post", data: data, }); @@ -29,7 +29,7 @@ export function addCertificates(data) { // 修改证书管理 export function updateCertificates(data) { return request({ - url: "/system/certificates", + url: "/zhiyuanzhe/certificates", method: "put", data: data, }); @@ -38,7 +38,7 @@ export function updateCertificates(data) { // 删除证书管理 export function delCertificates(id) { return request({ - url: "/system/certificates/" + id, + url: "/zhiyuanzhe/certificates/" + id, method: "delete", }); } diff --git a/src/components/ImagePreview/index.vue b/src/components/ImagePreview/index.vue index 3c770c7..1c2c1e6 100644 --- a/src/components/ImagePreview/index.vue +++ b/src/components/ImagePreview/index.vue @@ -19,16 +19,16 @@ export default { props: { src: { type: String, - default: "" + default: "", }, width: { type: [Number, String], - default: "" + default: "", }, height: { type: [Number, String], - default: "" - } + default: "", + }, }, computed: { realSrc() { @@ -47,7 +47,7 @@ export default { } let real_src_list = this.src.split(","); let srcList = []; - real_src_list.forEach(item => { + real_src_list.forEach((item) => { if (isExternal(item)) { return srcList.push(item); } @@ -60,14 +60,14 @@ export default { }, realHeight() { return typeof this.height == "string" ? this.height : `${this.height}px`; - } + }, }, }; - diff --git a/src/views/volunteer/gxhzs/gxhzsgl/index.vue b/src/views/volunteer/gxhzs/gxhzsgl/index.vue index 268f7ef..f1e4df7 100644 --- a/src/views/volunteer/gxhzs/gxhzsgl/index.vue +++ b/src/views/volunteer/gxhzs/gxhzsgl/index.vue @@ -30,42 +30,48 @@
-
- -
-
高级
-
-
- 查看 -
-
- 修改 -
-
- 删除 +
+
+ +
+
高级
+
+
+ 查看 +
+
+ 修改 +
+
+ 删除 +
@@ -121,6 +127,39 @@ 取 消
+ + +
+ + 详情 +
+
+
+
+
证书名称:
+
{{ form.name }}
+
+
+
证书时间:
+
{{ form.datetime }}
+
+
+
服务时长:
+
{{ form.serviceDuration }}
+
+
+
证书内容:
+
{{ form.content }}
+
+
+
证书封面:
+
+ +
+
+
+
+
@@ -135,18 +174,21 @@ import { export default { data() { return { + baseUrl: process.env.VUE_APP_BASE_API, + certificatesList: [], tableHeigth: 0, queryParams: {}, loading: false, tableData: [], - total: 1, + total: 0, queryParams: { - pageNum: 0, + pageNum: 1, pageSize: 10, }, form: {}, rules: {}, open: false, + openInfo: false, title: "", fileList: [], }; @@ -156,11 +198,19 @@ export default { this.$nextTick(() => { this.tableHeigth = this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 80; - console.log(this.$refs.search.offsetHeight, "高度"); + this.getList(); }); }, methods: { - getList() {}, + /** 查询证书管理列表 */ + getList() { + this.loading = true; + listCertificates(this.queryParams).then((response) => { + this.certificatesList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, // 表单重置 reset() { this.form = { @@ -194,6 +244,15 @@ export default { this.open = true; this.title = "添加证书管理"; }, + /**详情 */ + handleInfo(row) { + this.reset(); + const id = row.id; + getCertificates(id).then((response) => { + this.form = response.data; + this.openInfo = true; + }); + }, /** 修改按钮操作 */ handleUpdate(row) { this.reset(); @@ -264,33 +323,38 @@ export default { } } .book-main { - box-sizing: border-box; display: flex; flex-wrap: wrap; - & > div { - flex-basis: calc(20% - 20px); - margin: 10px; /* 设置元素之间的间距 */ - display: flex; - flex-direction: column; - box-shadow: 0px 3px 15px 0px rgba(184, 184, 184, 0.22); - border-radius: 10px; - overflow: hidden; - .operate { - flex: 1; + .child-box { + height: 50%; + width: 20%; + box-sizing: border-box; + padding: 10px; + & > div { + height: 100%; + width: 100%; display: flex; - align-items: center; - justify-content: space-between; - padding: 0 10px; - .right-operate { + flex-direction: column; + box-shadow: 0px 3px 15px 0px rgba(184, 184, 184, 0.22); + border-radius: 10px; + overflow: hidden; + .operate { + flex: 1; display: flex; align-items: center; - justify-content: center; - } - .operate-item { - text-align: center; - font-size: 14px; - color: #8a8585; - cursor: pointer; + justify-content: space-between; + padding: 0 10px; + .right-operate { + display: flex; + align-items: center; + justify-content: center; + } + .operate-item { + text-align: center; + font-size: 14px; + color: #8a8585; + cursor: pointer; + } } } } @@ -313,4 +377,29 @@ export default { } } } +//详情 +.info-box { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + .info-item { + display: flex; + // align-items: center; + margin-bottom: 20px; + .item-lable { + width: 80px; + font-size: 16px; + font-family: "Alibaba-PuHuiTi-Regular"; + font-weight: 400; + color: #4c4949; + } + .item-value { + font-size: 16px; + font-family: "Alibaba-PuHuiTi-Regular"; + font-weight: 400; + color: #807a7a; + } + } +}