指挥舱树状菜单样式

This commit is contained in:
zh
2025-11-12 10:46:25 +08:00
parent 8a0fa5c1bd
commit d263e40da7

View File

@ -157,10 +157,10 @@
if (setting.check.enable) {
data.makeChkFlag(setting, node);
if(node.check_Child_State>0 || node.isShow) {
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"></path><path d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z" fill="#004242" ></path></svg></span>`);
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.0313 8.00141C15.0313 7.91703 15.0168 7.84625 15.0125 7.83828C15.0097 7.79609 14.9957 7.72016 14.9821 7.67984C14.9783 7.67 14.9741 7.65969 14.9699 7.64937C14.9629 7.62641 14.9549 7.60391 14.9465 7.58609C13.6494 4.74969 10.858 2.84375 8.00004 2.84375C5.14254 2.84375 2.35114 4.74828 1.0602 7.56922C1.04473 7.60016 1.03395 7.62922 1.02692 7.655C1.02367 7.66277 1.02055 7.67058 1.01754 7.67844C0.991761 7.75297 0.991292 7.805 0.993636 7.79187C0.981448 7.84672 0.970667 7.95547 0.970667 7.95547C0.967386 7.98875 0.967386 8.01453 0.971136 8.04781C0.971136 8.04781 0.981917 8.1425 0.987073 8.16219C0.988948 8.18891 0.995511 8.22828 1.00348 8.26438L1.00301 8.26438C1.00957 8.29484 1.01942 8.32438 1.03207 8.35344C1.0391 8.37594 1.0466 8.39703 1.05364 8.4125C2.35207 11.2498 5.14348 13.1562 8.00004 13.1562C10.8585 13.1562 13.6499 11.2513 14.9319 8.44391C14.9521 8.40734 14.9647 8.37313 14.9736 8.34266C14.9774 8.33375 14.9807 8.32531 14.9835 8.31734C15.006 8.25172 15.0107 8.19547 15.0088 8.19547L15.0083 8.19594C15.0172 8.15047 15.0313 8.0825 15.0313 8.00141ZM8.00004 10.3438C6.7077 10.3438 5.65629 9.29234 5.65629 8C5.65629 6.70766 6.7077 5.65625 8.00004 5.65625C9.29239 5.65625 10.3438 6.70766 10.3438 8C10.3438 9.29234 9.29239 10.3438 8.00004 10.3438Z" fill="rgba(var(--color-base1), 1)" ></path></svg></span>`);
}
else {
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)" d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"></path><defs><linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125" y2="12.878036499023438" gradientUnits="userSpaceOnUse"><stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /><stop offset="1" stop-color="var(--color-border1)" /></linearGradient></defs></svg></span>`);
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M0.92193 7.40555C2.05765 9.88822 4.50054 11.5342 7.00003 11.5342C7.89745 11.5342 8.78626 11.3152 9.61067 10.9247L7.5603 8.96332C7.38107 9.01459 7.19567 9.05069 7.00003 9.05069C5.86923 9.05069 4.94925 8.1307 4.94925 6.9999C4.94925 6.83543 4.97386 6.67752 5.01036 6.52412L2.6495 4.2658C1.93994 4.91385 1.34398 5.71324 0.928082 6.62256C0.914547 6.64963 0.905113 6.67506 0.898961 6.69803C0.895873 6.70471 0.893139 6.71155 0.890758 6.71854C0.868199 6.78334 0.867789 6.82723 0.86984 6.81738C0.859586 6.86537 0.849332 6.96094 0.849332 6.96094C0.846461 6.98965 0.846871 7.01262 0.850152 7.04133C0.850152 7.04133 0.859176 7.21401 0.863688 7.23123M13.1524 7.00113C13.1524 6.9269 13.1397 6.86537 13.136 6.8584C13.1335 6.82108 13.1212 6.75463 13.1093 6.71977C13.106 6.71115 13.1023 6.70213 13.0986 6.69311C13.0925 6.67301 13.0855 6.65332 13.0781 6.63774C11.9432 4.15547 9.50075 2.48818 7.00003 2.48818C6.10343 2.48818 5.21544 2.70556 4.39226 3.09439L6.42704 5.041C6.60997 4.98686 6.79987 4.94912 7.00003 4.94912C8.13083 4.94912 9.05081 5.8691 9.05081 6.9999C9.05081 7.16889 9.02456 7.3309 8.9856 7.48799L11.351 9.75041C12.0593 9.10196 12.6528 8.3042 13.0658 7.39981C13.0835 7.36781 13.0945 7.33213 13.1023 7.30588C13.1056 7.29809 13.1085 7.28783 13.1109 7.28045C13.1306 7.22303 13.1347 7.17217 13.1331 7.17217C13.1331 7.17217 13.1331 7.17176 13.1327 7.17176C13.1401 7.13238 13.1524 7.0725 13.1524 7.00113ZM11.5117 11.9218C11.5052 11.9218 11.4987 11.9216 11.4922 11.9213C11.4857 11.921 11.4792 11.9206 11.4727 11.92C11.4662 11.9193 11.4597 11.9186 11.4533 11.9177C11.4468 11.9167 11.4404 11.9157 11.434 11.9144C11.4276 11.9132 11.4212 11.9118 11.4149 11.9103C11.4085 11.9087 11.4023 11.907 11.396 11.9052C11.3897 11.9034 11.3835 11.9014 11.3774 11.8993C11.3712 11.8971 11.3651 11.8948 11.359 11.8924C11.353 11.89 11.347 11.8874 11.3411 11.8847C11.3351 11.882 11.3293 11.8791 11.3235 11.8761C11.3177 11.8731 11.312 11.87 11.3063 11.8668C11.3007 11.8635 11.2951 11.8601 11.2896 11.8566C11.2842 11.853 11.2788 11.8494 11.2735 11.8456C11.2682 11.8418 11.2629 11.8379 11.2578 11.8338C11.2527 11.8298 11.2477 11.8256 11.2428 11.8213C11.2379 11.8171 11.233 11.8127 11.2283 11.8082L1.79474 2.78472C1.63109 2.62804 1.62535 2.36841 1.78162 2.20476C1.9383 2.04111 2.19793 2.03537 2.36157 2.19164L11.7952 11.2151C11.9584 11.3718 11.9646 11.6314 11.8079 11.795C11.8031 11.8 11.7982 11.8049 11.7932 11.8097C11.7882 11.8144 11.7831 11.819 11.7779 11.8235C11.7726 11.828 11.7673 11.8324 11.7618 11.8366C11.7564 11.8408 11.7508 11.8449 11.7451 11.8488C11.7395 11.8527 11.7337 11.8565 11.7278 11.8602C11.722 11.8638 11.716 11.8673 11.71 11.8707C11.704 11.874 11.6979 11.8772 11.6917 11.8802C11.6855 11.8833 11.6792 11.8861 11.6728 11.8889C11.6665 11.8916 11.6601 11.8941 11.6536 11.8965C11.6472 11.8989 11.6406 11.9011 11.634 11.9032C11.6275 11.9052 11.6208 11.9071 11.6141 11.9088C11.6075 11.9106 11.6007 11.9121 11.594 11.9135C11.5872 11.9149 11.5804 11.9161 11.5736 11.9171C11.5668 11.9182 11.5599 11.919 11.5531 11.9197C11.5462 11.9204 11.5393 11.9209 11.5324 11.9213C11.5255 11.9216 11.5187 11.9218 11.5117 11.9218Z"></path></svg></span>`);
}
}
},
@ -519,10 +519,10 @@
}
obj.attr('class', view.makeChkClass(setting, node));
if(node.check_Child_State>0 || node.isShow) {
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"></path><path d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z" fill="#004242" ></path></svg>`)
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.0313 8.00141C15.0313 7.91703 15.0168 7.84625 15.0125 7.83828C15.0097 7.79609 14.9957 7.72016 14.9821 7.67984C14.9783 7.67 14.9741 7.65969 14.9699 7.64937C14.9629 7.62641 14.9549 7.60391 14.9465 7.58609C13.6494 4.74969 10.858 2.84375 8.00004 2.84375C5.14254 2.84375 2.35114 4.74828 1.0602 7.56922C1.04473 7.60016 1.03395 7.62922 1.02692 7.655C1.02367 7.66277 1.02055 7.67058 1.01754 7.67844C0.991761 7.75297 0.991292 7.805 0.993636 7.79187C0.981448 7.84672 0.970667 7.95547 0.970667 7.95547C0.967386 7.98875 0.967386 8.01453 0.971136 8.04781C0.971136 8.04781 0.981917 8.1425 0.987073 8.16219C0.988948 8.18891 0.995511 8.22828 1.00348 8.26438L1.00301 8.26438C1.00957 8.29484 1.01942 8.32438 1.03207 8.35344C1.0391 8.37594 1.0466 8.39703 1.05364 8.4125C2.35207 11.2498 5.14348 13.1562 8.00004 13.1562C10.8585 13.1562 13.6499 11.2513 14.9319 8.44391C14.9521 8.40734 14.9647 8.37313 14.9736 8.34266C14.9774 8.33375 14.9807 8.32531 14.9835 8.31734C15.006 8.25172 15.0107 8.19547 15.0088 8.19547L15.0083 8.19594C15.0172 8.15047 15.0313 8.0825 15.0313 8.00141ZM8.00004 10.3438C6.7077 10.3438 5.65629 9.29234 5.65629 8C5.65629 6.70766 6.7077 5.65625 8.00004 5.65625C9.29239 5.65625 10.3438 6.70766 10.3438 8C10.3438 9.29234 9.29239 10.3438 8.00004 10.3438Z" fill="rgba(var(--color-base1), 1)" ></path></svg>`)
}
else {
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)" d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"></path><defs><linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125" y2="12.878036499023438" gradientUnits="userSpaceOnUse"><stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /><stop offset="1" stop-color="var(--color-border1)" /></linearGradient></defs></svg></span>`)
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M0.92193 7.40555C2.05765 9.88822 4.50054 11.5342 7.00003 11.5342C7.89745 11.5342 8.78626 11.3152 9.61067 10.9247L7.5603 8.96332C7.38107 9.01459 7.19567 9.05069 7.00003 9.05069C5.86923 9.05069 4.94925 8.1307 4.94925 6.9999C4.94925 6.83543 4.97386 6.67752 5.01036 6.52412L2.6495 4.2658C1.93994 4.91385 1.34398 5.71324 0.928082 6.62256C0.914547 6.64963 0.905113 6.67506 0.898961 6.69803C0.895873 6.70471 0.893139 6.71155 0.890758 6.71854C0.868199 6.78334 0.867789 6.82723 0.86984 6.81738C0.859586 6.86537 0.849332 6.96094 0.849332 6.96094C0.846461 6.98965 0.846871 7.01262 0.850152 7.04133C0.850152 7.04133 0.859176 7.21401 0.863688 7.23123M13.1524 7.00113C13.1524 6.9269 13.1397 6.86537 13.136 6.8584C13.1335 6.82108 13.1212 6.75463 13.1093 6.71977C13.106 6.71115 13.1023 6.70213 13.0986 6.69311C13.0925 6.67301 13.0855 6.65332 13.0781 6.63774C11.9432 4.15547 9.50075 2.48818 7.00003 2.48818C6.10343 2.48818 5.21544 2.70556 4.39226 3.09439L6.42704 5.041C6.60997 4.98686 6.79987 4.94912 7.00003 4.94912C8.13083 4.94912 9.05081 5.8691 9.05081 6.9999C9.05081 7.16889 9.02456 7.3309 8.9856 7.48799L11.351 9.75041C12.0593 9.10196 12.6528 8.3042 13.0658 7.39981C13.0835 7.36781 13.0945 7.33213 13.1023 7.30588C13.1056 7.29809 13.1085 7.28783 13.1109 7.28045C13.1306 7.22303 13.1347 7.17217 13.1331 7.17217C13.1331 7.17217 13.1331 7.17176 13.1327 7.17176C13.1401 7.13238 13.1524 7.0725 13.1524 7.00113ZM11.5117 11.9218C11.5052 11.9218 11.4987 11.9216 11.4922 11.9213C11.4857 11.921 11.4792 11.9206 11.4727 11.92C11.4662 11.9193 11.4597 11.9186 11.4533 11.9177C11.4468 11.9167 11.4404 11.9157 11.434 11.9144C11.4276 11.9132 11.4212 11.9118 11.4149 11.9103C11.4085 11.9087 11.4023 11.907 11.396 11.9052C11.3897 11.9034 11.3835 11.9014 11.3774 11.8993C11.3712 11.8971 11.3651 11.8948 11.359 11.8924C11.353 11.89 11.347 11.8874 11.3411 11.8847C11.3351 11.882 11.3293 11.8791 11.3235 11.8761C11.3177 11.8731 11.312 11.87 11.3063 11.8668C11.3007 11.8635 11.2951 11.8601 11.2896 11.8566C11.2842 11.853 11.2788 11.8494 11.2735 11.8456C11.2682 11.8418 11.2629 11.8379 11.2578 11.8338C11.2527 11.8298 11.2477 11.8256 11.2428 11.8213C11.2379 11.8171 11.233 11.8127 11.2283 11.8082L1.79474 2.78472C1.63109 2.62804 1.62535 2.36841 1.78162 2.20476C1.9383 2.04111 2.19793 2.03537 2.36157 2.19164L11.7952 11.2151C11.9584 11.3718 11.9646 11.6314 11.8079 11.795C11.8031 11.8 11.7982 11.8049 11.7932 11.8097C11.7882 11.8144 11.7831 11.819 11.7779 11.8235C11.7726 11.828 11.7673 11.8324 11.7618 11.8366C11.7564 11.8408 11.7508 11.8449 11.7451 11.8488C11.7395 11.8527 11.7337 11.8565 11.7278 11.8602C11.722 11.8638 11.716 11.8673 11.71 11.8707C11.704 11.874 11.6979 11.8772 11.6917 11.8802C11.6855 11.8833 11.6792 11.8861 11.6728 11.8889C11.6665 11.8916 11.6601 11.8941 11.6536 11.8965C11.6472 11.8989 11.6406 11.9011 11.634 11.9032C11.6275 11.9052 11.6208 11.9071 11.6141 11.9088C11.6075 11.9106 11.6007 11.9121 11.594 11.9135C11.5872 11.9149 11.5804 11.9161 11.5736 11.9171C11.5668 11.9182 11.5599 11.919 11.5531 11.9197C11.5462 11.9204 11.5393 11.9209 11.5324 11.9213C11.5255 11.9216 11.5187 11.9218 11.5117 11.9218Z"></path></svg></span>`)
}
},
setParentNodeCheckBox: function (setting, node, value, srcNode) {