diff --git a/base-manager-ui/admin/.env.development b/base-manager-ui/admin/.env.development index 66c33625eec671d5241bde4645cc62fa99b02b6f..83e83eff81201f17e6553a5f3b5475eae497c9b6 100644 --- a/base-manager-ui/admin/.env.development +++ b/base-manager-ui/admin/.env.development @@ -1,7 +1,7 @@ #寮€鍙戠幆澧� NODE_ENV = "development" -VUE_APP_API_BASE_URL=http://192.168.0.250:11071 -VUE_APP_API_IMG_URL=http://192.168.0.250:11071/ -# VUE_APP_API_BASE_URL=http://192.168.0.98:11078 -# VUE_APP_API_IMG_URL=http://192.168.0.98:11078/ +# VUE_APP_API_BASE_URL=http://192.168.0.250:11071 +# VUE_APP_API_IMG_URL=http://192.168.0.250:11071/ +VUE_APP_API_BASE_URL=http://192.168.0.98:11078 +VUE_APP_API_IMG_URL=http://192.168.0.98:11078/ #VUE_APP_API_BASE_URL=http://10.12.185.213:11071 \ No newline at end of file diff --git a/base-manager-ui/admin/src/pages/basicset/social/Social.vue b/base-manager-ui/admin/src/pages/basicset/social/Social.vue new file mode 100644 index 0000000000000000000000000000000000000000..8eddcf7fba7a72b3c4f6f7c7566a3521f153f914 --- /dev/null +++ b/base-manager-ui/admin/src/pages/basicset/social/Social.vue @@ -0,0 +1,223 @@ +<template> + <div class="social"> + <TabHeader label="绀句繚閰嶇疆"></TabHeader> + <div class="content"> + <div class="control"> + <a-space> + <div> + <a-button + type="primary" + style="margin-right: 10px" + @click="handleAdd" + >鏂板</a-button + > + <a-button type="danger" @click="handleDelAll">鎵归噺鍒犻櫎</a-button> + </div> + </a-space> + </div> + <YTable + :columns="columns" + :data="tableData" + :pageSize.sync="size" + :page.sync="page" + :total="total" + :loading="loading" + :scroll="{ y: 560 }" + :row-selection="{ + selectedRowKeys: selectedRowKeys, + onChange: onSelectChange, + }" + @changePagination="getDataList" + > + <template slot="action" slot-scope="{ record }"> + <a-space size="middle"> + <span class="primary pointer" @click="handleEdit(record)" + >缂栬緫</span + > + <span class="delete pointer" @click="handleDel(record.id)" + >鍒犻櫎</span + > + </a-space> + </template> + </YTable> + </div> + <!-- 鏂板銆佺紪杈� --> + <AddSocial + ref="AddSocial" + :show.sync="show" + :title="title" + @success="getDataList" + ></AddSocial> + </div> +</template> + +<script> +import TabHeader from "@/components/TabHeader"; +import YTable from "@/components/YTable.vue"; +import local from "@/utils/local"; +import { getSocialSetList, delSocialSet } from "@/services/social"; +import AddSocial from "./modal/AddSocial.vue"; +export default { + components: { + TabHeader, + YTable, + AddSocial, + }, + data() { + return { + title: "鏂板", + show: false, + siteId: local.getLocal("siteId"), + columns: [ + { + title: "搴忓彿", + width: "65px", + customRender: (text, record, index) => { + return this.page * this.size - this.size + index + 1; + }, + }, + + { + title: "鎺ュ叆鏍囪瘑", + dataIndex: "appid", + }, + { + title: "娓犻亾鏍囪瘑", + dataIndex: "accessKey", + }, + { + title: "瀵嗛挜", + dataIndex: "privatKey", + }, + { + title: "娓犻亾瀵嗛挜", + dataIndex: "key", + }, + { + title: "鏈哄叿缂栫爜", + dataIndex: "az400", + }, + { + title: "鏈哄叿瀵嗛挜", + dataIndex: "sm4key", + }, + { + title: "鎺掑彿璁よ瘉鐮�", + dataIndex: "serviceCode", + }, + { + title: "涓氬姟璁よ瘉鐮�", + dataIndex: "busCode", + }, + { + title: "缁熶竴绀句細淇$敤浠g爜", + dataIndex: "orgCode", + }, + { + title: "澶囨敞", + dataIndex: "remark", + }, + { + title: "鎿嶄綔", + width: "120px", + scopedSlots: { customRender: "action" }, + }, + ], + tableData: [], + loading: false, + selectedRowKeys: [], + size: 10, + page: 1, + total: 0, + searchValue: "", + }; + }, + created() { + this.getDataList(); + }, + methods: { + async getDataList() { + this.loading = true; + let res = await getSocialSetList({ + siteId: this.siteId, + page: this.page, + size: this.size, + }); + this.loading = false; + if (res.data.code === 1) { + let { data, total } = res.data.data; + if (!data.length && this.page > 1) { + this.page -= 1; + this.getDataList(); + } + this.tableData = data; + this.total = total; + } + }, + handleAdd() { + this.title = "鏂板"; + this.$refs.AddSocial.onAdd(); + this.show = true; + }, + handleDelAll() { + if (!this.selectedRowKeys.length) { + this.$message.warning("璇峰厛鍕鹃€夋暟鎹�"); + return; + } + let ids = this.selectedRowKeys.join(","); + this.handleDel(ids); + }, + onSelectChange(keys) { + this.selectedRowKeys = keys; + }, + handleEdit(row) { + this.title = "鏂板"; + this.$refs.AddSocial.onEdit(row); + this.show = true; + }, + handleDel(id) { + this.$confirm({ + title: "绯荤粺鎻愮ず", + content: "鍒犻櫎涓嶅彲鎭㈠锛岀‘瀹氳鍒犻櫎鍚楋紵", + okText: "纭畾", + okType: "danger", + cancelText: "鍙栨秷", + centered: true, + icon: "exclamation-circle", + maskClosable: true, + onOk: async () => { + let res = await delSocialSet({ id }); + let { code, msg } = res.data; + if (code === 1) { + this.$message.success(msg); + this.selectedRowKeys = []; + this.getDataList(); + } + }, + onCancel() { + console.log("Cancel"); + }, + }); + }, + }, +}; +</script> + +<style lang="less" scoped> +.social { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} +.content { + flex: 1; + padding: 15px; + .control { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + } +} +</style> diff --git a/base-manager-ui/admin/src/pages/basicset/social/modal/AddSocial.vue b/base-manager-ui/admin/src/pages/basicset/social/modal/AddSocial.vue new file mode 100644 index 0000000000000000000000000000000000000000..99cb0c14e62206b843820da24a339c1d76cfa4d9 --- /dev/null +++ b/base-manager-ui/admin/src/pages/basicset/social/modal/AddSocial.vue @@ -0,0 +1,234 @@ +<template> + <div> + <a-modal + v-model="Visible" + :maskClosable="false" + :title="title" + @cancel="handleClose" + width="45%" + > + <template slot="footer"> + <a-button @click="handleReset">閲嶇疆</a-button> + <a-button type="primary" @click="handleOk">纭畾</a-button> + </template> + <a-form-model + ref="ruleForm" + :model="formData" + :rules="rules" + :label-col="{ span: 7 }" + :wrapper-col="{ span: 17 }" + > + <a-row> + <a-col :span="12"> + <a-form-model-item label="鎺ュ叆鏍囪瘑" prop="appid"> + <a-input v-model="formData.appid" placeholder="璇疯緭鍏ユ帴鍏ユ爣璇�" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="娓犻亾鏍囪瘑" prop="accessKey"> + <a-input + v-model="formData.accessKey" + placeholder="璇疯緭鍏ユ笭閬撴爣璇�" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="瀵嗛挜" prop="privatKey"> + <a-input v-model="formData.privatKey" placeholder="璇疯緭鍏ュ瘑閽�" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="娓犻亾瀵嗛挜" prop="key"> + <a-input v-model="formData.key" placeholder="璇疯緭鍏ユ笭閬撳瘑閽�" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鏈哄叿缂栫爜" prop="az400"> + <a-input v-model="formData.az400" placeholder="璇疯緭鍏ユ満鍏风紪鐮�" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏈哄叿瀵嗛挜" prop="sm4key"> + <a-input + v-model="formData.sm4key" + placeholder="璇疯緭鍏ユ満鍏峰瘑閽�" + /> </a-form-model-item + ></a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鎺掑彿璁よ瘉鐮�" prop="serviceCode"> + <a-input + v-model="formData.serviceCode" + placeholder="璇疯緭鍏ユ帓鍙疯璇佺爜" + /> </a-form-model-item + ></a-col> + <a-col :span="12"> + <a-form-model-item label="涓氬姟璁よ瘉鐮�" prop="busCode"> + <a-input + v-model="formData.busCode" + placeholder="璇疯緭鍏ヤ笟鍔¤璇佺爜" + /> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12" + ><a-form-model-item label="鏈烘瀯鍚嶇О" prop="orgName"> + <a-input + v-model="formData.orgName" + placeholder="璇疯緭鍏ユ満鏋勫悕绉�" + /> </a-form-model-item + ></a-col> + <a-col :span="12"> + <a-form-model-item label="鏈哄叿浣跨敤鍦板潃" prop="address"> + <a-input + v-model="formData.address" + placeholder="璇疯緭鍏ユ満鍏蜂娇鐢ㄥ湴鍧€" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="缁熶竴绀句細淇$敤浠g爜" prop="orgCode"> + <a-input + v-model="formData.orgCode" + placeholder="璇疯緭鍏ョ粺涓€绀句細淇$敤浠g爜" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍖哄煙鐮�" prop="regionCode"> + <a-input + v-model="formData.regionCode" + placeholder="璇疯緭鍏ュ尯鍩熺爜" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="澶囨敞" prop="remark"> + <a-input + type="textarea" + v-model="formData.remark" + placeholder="璇疯緭鍏ュ娉�" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍚敤寮€鍏�" prop="enabled"> + <YSwitch v-model="formData.enabled"></YSwitch> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-modal> + </div> +</template> + +<script> +import { saveSocialSet } from "@/services/social"; +import YSwitch from "@/components/yswitch/YSwitch.vue"; +import local from "@/utils/local"; +export default { + props: { + title: { + required: true, + type: String, + default: "", + }, + show: { + type: Boolean, + required: true, + default: false, + }, + }, + components: { + YSwitch, + }, + data() { + return { + formData: { + siteId: local.getLocal("siteId"), + appid: "", // 娓犻亾鏍囪瘑 + accessKey: "", // 鎺ュ叆鏍囪瘑 + privatKey: "", // 瀵嗛挜 + key: "", // 娓犻亾瀵嗛挜 + az400: "", // 鏈哄叿缂栫爜 + sm4key: "", // 鏈哄叿瀵嗛挜 + serviceCode: "", // 鎺掑彿璁よ瘉鐮� + enabled: 1, // 璧峰仠鐢� + remark: "", // 澶囨敞 + busCode: "", // 涓氬姟璁よ瘉鐮� + orgName: "", // 鏈烘瀯鍚嶇О + address: "", // 鏈哄叿浣跨敤鍦板潃 + regionCode: "", // 鍖哄煙鐮� + orgCode: "", // 缁熶竴绀句細淇$敤浠g爜 + }, + rules: { + appid: [{ required: true, message: "璇疯緭鍏ユ笭閬撴爣璇�", trigger: "blur" }], + accessKey: [ + { required: true, message: "璇疯緭鍏ユ帴鍏ユ爣璇�", trigger: "blur" }, + ], + privatKey: [{ required: true, message: "璇疯緭鍏ュ瘑閽�", trigger: "blur" }], + key: [{ required: true, message: "璇疯緭鍏ユ笭閬撳瘑閽�", trigger: "blur" }], + }, + }; + }, + computed: { + Visible: { + get() { + return this.show; + }, + set(val) { + this.$emit("update:show", val); + }, + }, + }, + methods: { + // 鏂板 + onAdd() { + Object.assign(this.formData, this.$options.data().formData); + this.formData.id && this.$delete(this.formData, "id"); + }, + // 缂栬緫 + onEdit(data) { + this.$nextTick(() => { + this.formData = { ...data }; + }); + }, + // 鍏抽棴寮圭獥 + handleClose() { + this.handleReset(); + this.Visible = false; + }, + // 淇濆瓨 + handleOk() { + this.$refs.ruleForm.validate(async (valid) => { + if (valid) { + let res = await saveSocialSet(this.formData); + let { code, msg } = res.data; + if (code === 1) { + this.$message.success(msg); + this.$emit("success"); + this.handleClose(); + } + } + }); + }, + // 閲嶇疆 + handleReset() { + this.$refs.ruleForm.resetFields(); + }, + }, +}; +</script> + +<style lang="less" scoped></style> diff --git a/base-manager-ui/admin/src/router/config.js b/base-manager-ui/admin/src/router/config.js index b883c1a855d0552f90396e4c0c142e59417cac67..9928cfcae4f67a58975375d731648f0936b99815 100644 --- a/base-manager-ui/admin/src/router/config.js +++ b/base-manager-ui/admin/src/router/config.js @@ -230,6 +230,14 @@ const options = { }, component: () => import("@/pages/basicset/sms/configurat"), }, + { + path: "/social", + name: "绀句繚閰嶇疆", + meta: { + icon: "contacts", + }, + component: () => import("@/pages/basicset/social/Social"), + }, // { // path: "/appmarket", diff --git a/base-manager-ui/admin/src/services/basicsetApi.js b/base-manager-ui/admin/src/services/basicsetApi.js index f94f517d312f14ed2423acb442d5bd446636a67f..4071eb3f7137c08b366d2b9ba214a12a8555b939 100644 --- a/base-manager-ui/admin/src/services/basicsetApi.js +++ b/base-manager-ui/admin/src/services/basicsetApi.js @@ -423,4 +423,12 @@ module.exports = { save: `${BASE_URL}/base/device/blackapp/save`, delete: `${BASE_URL}/base/device/blackapp/delete`, }, + // 绀句繚绠$悊 + social: { + list: `${BASE_URL}/base/social/security/set/list`, + info: `${BASE_URL}/base/social/security/set/info`, + save: `${BASE_URL}/base/social/security/set/save`, + batchSave: `${BASE_URL}/base/social/security/set/batchSave`, + delete: `${BASE_URL}/base/social/security/set/delete`, + }, }; diff --git a/base-manager-ui/admin/src/services/social.js b/base-manager-ui/admin/src/services/social.js new file mode 100644 index 0000000000000000000000000000000000000000..879c20da7316b68a5c0aa60913eb6b97298d3288 --- /dev/null +++ b/base-manager-ui/admin/src/services/social.js @@ -0,0 +1,24 @@ +import { social } from "@/services/basicsetApi"; + +import { request, METHOD } from "@/utils/request"; + +// 鑾峰彇绀句繚閰嶇疆鍒楄〃 +export async function getSocialSetList(data) { + return request(social.list, METHOD.POST, data); +} +// 鏌ョ湅绀句繚閰嶇疆淇℃伅 +export async function getSocialSetInfo(data) { + return request(social.info, METHOD.GET, data); +} +// 淇濆瓨绀句繚閰嶇疆 +export async function saveSocialSet(data) { + return request(social.save, METHOD.POST, data); +} +// 鎵归噺淇濆瓨绀句繚閰嶇疆 +export async function saveSocialSetBatch(data) { + return request(social.batchSave, METHOD.POST, data); +} +// 鍒犻櫎绀句繚閰嶇疆 +export async function delSocialSet(data) { + return request(social.delete, METHOD.GET, data); +}