+ 输入IP地址,例如192.168.0.1(支持ipv4地址,配置多个IP时使用回车符分隔) + + +
diff --git a/.prettierrc.js b/.prettierrc.js
index 4420fc3d469cd27b8969073063f37e5308651a5e..913b45e40d49d2d4c1f13b72a07df7a9dae590bd 100644
--- a/.prettierrc.js
+++ b/.prettierrc.js
@@ -12,7 +12,7 @@ module.exports = {
htmlWhitespaceSensitivity: "css",
insertPragma: false,
jsxSingleQuote: false,
- printWidth: 120, // 如果属性过多需要换行,减少该值
+ printWidth: 100, // 如果属性过多需要换行,减少该值
proseWrap: "preserve",
quoteProps: "as-needed",
requirePragma: false,
diff --git a/src/assets/css/index.css b/src/assets/css/index.css
index 8a8a37bdbe61f763c26b6454a53f9486d4077182..29876020f3e850724856548f7bb2061acae9f501 100644
--- a/src/assets/css/index.css
+++ b/src/assets/css/index.css
@@ -1573,7 +1573,7 @@ border-radius:8px;
}
.forget_psd {
font-size: 14px;
- color: #3759be;
+ color: #3759be;
cursor: pointer;
}
diff --git a/src/bg-ui/bg-table.vue b/src/bg-ui/bg-table.vue
index 4198ee8a0110a24f34f67ef24c12284983b03baa..0b0c7122419ce63448bf667623068a36cb5aff5a 100644
--- a/src/bg-ui/bg-table.vue
+++ b/src/bg-ui/bg-table.vue
@@ -50,9 +50,17 @@
diff --git a/src/bg-ui/hook/mixin-select-table.js b/src/bg-ui/hook/mixin-select-table.js
index 22f850dbd713ba0417d1c47dd916c979c77386e5..2704912484e593284b3654b439972d87afd32ff9 100644
--- a/src/bg-ui/hook/mixin-select-table.js
+++ b/src/bg-ui/hook/mixin-select-table.js
@@ -1,68 +1,71 @@
-import { reactive, toRefs,useAttrs } from 'vue'
-export function selectTableMixin(){
+import { reactive, toRefs, useAttrs } from "vue";
+export function selectTableMixin() {
const state = reactive({
- nowSelectData:[],
- allSelectData:{}
- })
-
- const attrs = useAttrs()
-// const nowSelectData = reactive([])
-// const allSelectData = reactive({})
+ nowSelectData: [],
+ allSelectData: {},
+ });
-const selectData = (val)=>{
- console.log(val);
- state.nowSelectData = val
- console.log('allSelectData');
- console.log(state.allSelectData);
- console.log(Object.keys(state.allSelectData).length);
-}
+ const attrs = useAttrs();
+ // const nowSelectData = reactive([])
+ // const allSelectData = reactive({})
-const initSelectTableData = (data)=>{
- return new Promise((reslove,reject)=>{
- data.forEach(e => {
- if(state.allSelectData[e[attrs.rowKey||'id']]){
- delete state.allSelectData[e[attrs.rowKey||'id']]
- state.nowSelectData.push(e)
- }
+ const selectData = (val) => {
+ state.nowSelectData = val;
+ };
+ //当某些表格有原始的选中数据时,初始化allSelectData
+ const initAllSelectData = (list) => {
+ list.forEach((e) => {
+ state.allSelectData[e[attrs.rowKey || "id"]] = e;
});
-
- console.log(state.nowSelectData);
- reslove(state.nowSelectData)
- })
-}
-
-const runPage=()=>{//翻页数据推进
- state.nowSelectData.forEach(e => {
- state.allSelectData[e[attrs.rowKey||'id']] = e
- });
- state.nowSelectData = []
-}
+ };
+ const initSelectTableData = (data) => {
+ return new Promise((reslove, reject) => {
+ data.forEach((e) => {
+ if (state.allSelectData[e[attrs.rowKey || "id"]]) {
+ delete state.allSelectData[e[attrs.rowKey || "id"]];
+ state.nowSelectData.push(e);
+ }
+ });
+ reslove(state.nowSelectData);
+ });
+ };
-const clearTable=()=>{//清除选中数据,在页面状态更新时使用
- state.allSelectData={}
- state.nowSelectData=[]
- clearSelection();
-}
+ const runPage = () => {
+ //翻页数据推进
+ state.nowSelectData.forEach((e) => {
+ state.allSelectData[e[attrs.rowKey || "id"]] = e;
+ });
+ state.nowSelectData = [];
+ };
-const dealSelectData=()=>{//最后提交处理数据
- state.nowSelectData.forEach(e => {
- state.allSelectData[e[attrs.rowKey||'id']] = e
- });
- return state.allSelectData
-}
+ // const clearTable = () => {
+ // //清除选中数据,在页面状态更新时使用
+ // state.allSelectData = {};
+ // state.nowSelectData = [];
+ // clearSelection();
+ // };
-const { nowSelectData, allSelectData } = toRefs(state)
+ const dealSelectData = () => {
+ //最后提交处理数据
+ const submitData = { ...state.allSelectData };
+ state.nowSelectData.forEach((e) => {
+ submitData[e[attrs.rowKey || "id"]] = e;
+ });
+ return submitData;
+ };
-return{
- nowSelectData,
- allSelectData,
- selectData,
- initSelectTableData,
- runPage,
- clearTable,
- dealSelectData
-}
+ const { nowSelectData, allSelectData } = toRefs(state);
+ return {
+ nowSelectData,
+ allSelectData,
+ initAllSelectData,
+ selectData,
+ initSelectTableData,
+ runPage,
+ // clearTable,
+ dealSelectData,
+ };
}
// export const selectTableMixin = {
@@ -88,7 +91,7 @@ return{
// this.nowSelectData.push(e)
// }
// });
-
+
// console.log(this.nowSelectData);
// if(this.nowSelectData.length){
// setTimeout(()=>{
@@ -115,4 +118,4 @@ return{
// return this.allSelectData
// }
// },
-// }
\ No newline at end of file
+// }
diff --git a/src/page/main/config/accessRule/add/index.vue b/src/page/main/config/accessRule/add/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..5b2a902261026e1cda682e14113866d14ab93f76
--- /dev/null
+++ b/src/page/main/config/accessRule/add/index.vue
@@ -0,0 +1,508 @@
+
+
+
+ 输入IP地址,例如192.168.0.1(支持ipv4地址,配置多个IP时使用回车符分隔)
+
+
+
+ 输入IP地址,例如192.168.0.1(支持ipv4地址,配置多个IP时使用回车符分隔)
+
+
+
{{ item }}