diff --git a/vue/element-ui-personal/components/Popover/index.vue b/vue/element-ui-personal/components/Popover/index.vue deleted file mode 100644 index 0a5e25b..0000000 --- a/vue/element-ui-personal/components/Popover/index.vue +++ /dev/null @@ -1,217 +0,0 @@ - - - diff --git a/vue/element-ui-personal/index.js b/vue/element-ui-personal/index.js index 6612258..0d6836a 100644 --- a/vue/element-ui-personal/index.js +++ b/vue/element-ui-personal/index.js @@ -1,8 +1,7 @@ import Message from "./components/Message" -import Popover from './components/Popover' import Select from './components/Select/Select' -const components = [Popover, Select] +const components = [Select] export default function (Vue) { components.forEach(component => { diff --git a/vue/src/assets/styles/element-ui.scss b/vue/src/assets/styles/element-ui.scss index b79a82a..afa7797 100644 --- a/vue/src/assets/styles/element-ui.scss +++ b/vue/src/assets/styles/element-ui.scss @@ -20,6 +20,8 @@ } .el-card { + overflow: visible; + .el-card__body { height: 100%; } diff --git a/vue/src/bizComponents/DocumentHistory/index.vue b/vue/src/bizComponents/DocumentHistory/index.vue index d89591a..761b01d 100644 --- a/vue/src/bizComponents/DocumentHistory/index.vue +++ b/vue/src/bizComponents/DocumentHistory/index.vue @@ -11,7 +11,7 @@ if (type === 'add') return '' return ( + + + + + + + + diff --git a/vue/src/components/RegionSelector/Tab/style.scss b/vue/src/components/RegionSelector/Tab/style.scss new file mode 100644 index 0000000..56ca779 --- /dev/null +++ b/vue/src/components/RegionSelector/Tab/style.scss @@ -0,0 +1,178 @@ +.rg-header, .rg-search { + padding: 2px 10px 0; + background-color: white; +} + +.rg-header { + h3 { + line-height: normal; + padding: 6px 80px 10px 10px; + margin: 0; + text-align: left; + color: #24292e; + font-size: 16px; + white-space: nowrap; + + .rg-header-selected { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + font-size: 14px; + max-width: 310px; + display: inline-block; + } + } + + button { + position: absolute; + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: 0 0; + border: 0; + outline: none; + color: #999; + top: 9px; + + i { + font-size: 16px; + } + + &:hover { + color: black; + } + + &.rg-removeall-button { + right: 32px + } + + &.rg-done-button { + right: 8px; + } + } +} + +.rg-level-tabs { + margin-top: 10px; + background-color: #fff; + + ul { + padding: 0; + margin: 0; + line-height: 1.5; + border-bottom: 1px solid #eee; + + li { + display: inline-block; + position: relative; + + a { + display: block; + padding: 0.2rem 1rem 0.6rem; + font-size: 14px; + color: #bbb; + text-decoration: none; + cursor: pointer; + line-height: 1.43; + } + + &.active { + a { + color: #333; + background-color: #fff; + font-weight: 600; + } + + &::after { + content: ""; + display: block; + position: absolute; + bottom: 0; + height: 0.2rem; + width: 100%; + background-color: #bbb; + } + } + } + } +} + +.rg-results-container { + background-color: #fff; + list-style: none; + margin: 0; + padding: 0; + position: relative; + width: 100%; + overflow-y: auto; + overflow-x: hidden; + clear: both; + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + + .rg-results { + background-color: #fff; + list-style: none; + margin: 0; + padding: 5px; + width: 364px; + line-height: 1.5; + + li { + margin: 0; + overflow: hidden; + padding: 3px 10px; + position: relative; + text-align: left; + white-space: nowrap; + font-size: 14px; + color: black; + cursor: pointer; + + &.rg-item { + display: inline-block; + border-radius: 2px; + margin-right: 5px; + color: #777; + + &:hover { + color: black; + background-color: #F5F5F5; + } + + &.active { + background-color: #E4EAEE; + color: black; + } + } + + &.rg-message-box { + height: 30px; + line-height: 30px; + text-align: center; + box-sizing: content-box; + font-size: 14px; + cursor: default; + } + } + } +} + +.rg-input { + display: block; + background-color: #f5f5f5; + margin: 0 !important; + border: 0; + width: 100%; + font-size: 14px; + line-height: 1.42; + padding: 4px 6px; + vertical-align: middle; + box-sizing: border-box; + outline: none !important; + border-radius: 2px; + + &::-webkit-input-placeholder { + color: #999; + } +} diff --git a/vue/src/components/RegionSelector/Tree/TreeDialog.vue b/vue/src/components/RegionSelector/Tree/TreeDialog.vue index afb1a3f..2a37373 100644 --- a/vue/src/components/RegionSelector/Tree/TreeDialog.vue +++ b/vue/src/components/RegionSelector/Tree/TreeDialog.vue @@ -1,4 +1,5 @@ diff --git a/vue/src/components/RegionSelector/mixin.js b/vue/src/components/RegionSelector/mixin.js new file mode 100644 index 0000000..6087103 --- /dev/null +++ b/vue/src/components/RegionSelector/mixin.js @@ -0,0 +1,10 @@ +export default { + props: { + value: String, + readonly: Boolean, + size: String, + getChildrenOnSelect: Boolean, + limit: Boolean, + limitApi: Function + } +} diff --git a/vue/src/router/constant/modules/example.js b/vue/src/router/constant/modules/example.js index cbb696c..ba59d63 100644 --- a/vue/src/router/constant/modules/example.js +++ b/vue/src/router/constant/modules/example.js @@ -76,6 +76,12 @@ const router = { name: 'signatureExample', component: () => import('@/views/example/components/signatureExample'), meta: {title: '手写签名'} + }, + { + path: 'regionSelectorExample', + name: 'regionSelectorExample', + component: () => import('@/views/example/components/regionSelectorExample'), + meta: {title: '行政区划选择'} } ] }, diff --git a/vue/src/utils/validate.js b/vue/src/utils/validate.js index a35fb4d..721a2df 100644 --- a/vue/src/utils/validate.js +++ b/vue/src/utils/validate.js @@ -57,7 +57,7 @@ export function isString(str) { export function isInteger(v) { let t = parseFloat(v) - return t.toString() !== 'Nan' && t < 2147483647 && t > -2147483648 + return t.toString() !== 'NaN' && t < 2147483647 && t > -2147483648 } export function isImage(str) { diff --git a/vue/src/views/example/components/regionSelectorExample.vue b/vue/src/views/example/components/regionSelectorExample.vue new file mode 100644 index 0000000..4971012 --- /dev/null +++ b/vue/src/views/example/components/regionSelectorExample.vue @@ -0,0 +1,41 @@ + + + diff --git a/vue/src/views/stock/current/index.vue b/vue/src/views/stock/current/index.vue index 28e132a..d444a3b 100644 --- a/vue/src/views/stock/current/index.vue +++ b/vue/src/views/stock/current/index.vue @@ -156,7 +156,7 @@ exportExcel(baseUrl + '/export', this.mergeSearchForm(), this.excel) }, nodeClick(obj) { - let ids = getNodeId(obj.children) + const ids = getNodeId(obj.children) ids.unshift(obj.id) this.searchForm.cids = ids.join(',') this.temp.cname = obj.name diff --git a/vue/src/views/system/customer/EditDialog.vue b/vue/src/views/system/customer/EditDialog.vue index 4e1a494..ff06d7c 100644 --- a/vue/src/views/system/customer/EditDialog.vue +++ b/vue/src/views/system/customer/EditDialog.vue @@ -14,7 +14,6 @@ import DialogForm from '@/components/DialogForm' - import RegionSelector from '@/components/RegionSelector/Tree' + import RegionSelector from '@/components/RegionSelector' import dialogMixin from "@/mixins/dialogMixin" import {addCustomer, updateCustomer} from "@/api/system/customer" import {isEmpty, mergeObj, resetObj} from '@/utils' diff --git a/vue/src/views/system/customer/index.vue b/vue/src/views/system/customer/index.vue index ceab14f..d4a3144 100644 --- a/vue/src/views/system/customer/index.vue +++ b/vue/src/views/system/customer/index.vue @@ -9,7 +9,7 @@ :value="temp.region_name" limit :limit-api="getLimitRegion" - get-children-on-click + get-children-on-select @clear="clearSidSearch" @select="selectRegion" /> @@ -79,7 +79,7 @@