[update] 菜单图标

This commit is contained in:
zhaoxiao
2021-09-14 17:54:41 +08:00
parent 7e2ceec092
commit 741cc0f828
13 changed files with 194 additions and 9 deletions
@@ -3,6 +3,7 @@
v-bind="$attrs"
v-on="$listeners"
show-search
allowClear
option-filter-prop="children"
:filter-option="filterOption">
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ `${item.realname}(${item.orgCodeTxt})` }}</a-select-option>
+12
View File
@@ -0,0 +1,12 @@
/* 引入 icon class 文件 */
@import "./iconfont.css";
/* 设置使用字体的优先级 anticon 高 */
:global(.anticon) { /* :global() 是为了覆盖全局class .anticon 的样式 */
&:before {
font-family: "anticon", "anticon-jeecg" !important;
/* 默认样式是这样
font-family: "anticon" !important;
*/
}
}
+47
View File
@@ -0,0 +1,47 @@
@font-face {
font-family: "anticon-jeecg"; /* Project id 2798517 */
src: url('iconfont.woff2?t=1631613073967') format('woff2'),
url('iconfont.woff?t=1631613073967') format('woff'),
url('iconfont.ttf?t=1631613073967') format('truetype');
}
.anticon-jeecg {
font-family: "anticon-jeecg" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticonmeeting:before {
content: "\e60f";
}
.anticonproject:before {
content: "\e609";
}
.anticonpack:before {
content: "\e60a";
}
.anticonmember:before {
content: "\e60b";
}
.anticondata-network-disk:before {
content: "\e60c";
}
.anticonfinancial:before {
content: "\e60e";
}
.anticoncontract:before {
content: "\e608";
}
.anticoncompany:before {
content: "\e607";
}
File diff suppressed because one or more lines are too long
+65
View File
@@ -0,0 +1,65 @@
{
"id": "2798517",
"name": "zx-project",
"font_family": "anticon-jeecg",
"css_prefix_text": "anticon",
"description": "",
"glyphs": [
{
"icon_id": "24340808",
"name": "cus_meeting",
"font_class": "meeting1",
"unicode": "e60f",
"unicode_decimal": 58895
},
{
"icon_id": "24340604",
"name": "cus_project",
"font_class": "project",
"unicode": "e609",
"unicode_decimal": 58889
},
{
"icon_id": "24340605",
"name": "cus_pack",
"font_class": "pack",
"unicode": "e60a",
"unicode_decimal": 58890
},
{
"icon_id": "24340606",
"name": "cus_member",
"font_class": "member",
"unicode": "e60b",
"unicode_decimal": 58891
},
{
"icon_id": "24340607",
"name": "cus_data-network-disk",
"font_class": "data-network-disk",
"unicode": "e60c",
"unicode_decimal": 58892
},
{
"icon_id": "24340609",
"name": "cus_financial",
"font_class": "financial",
"unicode": "e60e",
"unicode_decimal": 58894
},
{
"icon_id": "24337509",
"name": "cus_contract",
"font_class": "contract",
"unicode": "e608",
"unicode_decimal": 58888
},
{
"icon_id": "24337464",
"name": "cus_company",
"font_class": "company",
"unicode": "e607",
"unicode_decimal": 58887
}
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
View File
@@ -146,6 +146,10 @@ export default {
)
},
renderIcon (icon) {
if (icon !== 'none' && icon !== undefined && icon.indexOf('cus_') !== -1) {
let className = `anticon-jeecg anticon${icon.substr(4)}`
return <i class={className} style='margin-right: 8px'></i>
}
if (icon === 'none' || icon === undefined) {
return null
}
+4
View File
@@ -29,6 +29,10 @@ import vTrim from '@/utils/vTrim'
import preventClick from '@/utils/preventClick'
import '@/assets/less/JAreaLinkage.less'
import VueAreaLinkage from 'vue-area-linkage'
// Fontclass模式
import '@/components/iconfont/common.less'
// 使用 symbol模式 支持多色
import '@/components/iconfont/iconfont.js'
Vue.config.productionTip = false
Vue.use(Storage, config.storageOptions)
@@ -106,13 +106,13 @@ export default {
}, {
title: '企业名称',
align: 'center',
width: 300,
width: 250,
dataIndex: 'companyName',
scopedSlots: { customRender: 'text' }
}, {
title: '公司地址',
align: 'center',
width: 400,
width: 300,
dataIndex: 'companyAddress',
scopedSlots: { customRender: 'text' }
}, {
@@ -123,7 +123,7 @@ export default {
}, {
title: '姓名',
align: 'center',
width: 160,
width: 170,
dataIndex: 'name',
scopedSlots: { customRender: 'text' }
}, {
@@ -72,7 +72,7 @@
<a-row>
<a-col :span="20">
<a-input placeholder="请输入本年应收款A"
v-decorator="['yearChargeA']"
v-decorator="['yearChargeA',validatorRules.checkMoney]"
:maxLength='50'
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
</a-col>
@@ -109,7 +109,7 @@
<a-row>
<a-col :span="20">
<a-input placeholder="请输入本年应收款B"
v-decorator="['yearChargeB']"
v-decorator="['yearChargeB',validatorRules.checkMoney]"
:maxLength='50'
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
</a-col>
@@ -147,7 +147,7 @@
placeholder="请输入任务及目标"
:auto-size="{ minRows: 3, maxRows: 6 }"
v-decorator="['missionAndObjectives']"
:maxLength='300'
:maxLength='200'
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
</a-form-item>
</a-col>
@@ -175,6 +175,8 @@ import { httpAction } from '@api/manage'
import JUpload from '@comp/jero/JUpload'
import JYearDate from '@comp/jero/JYearDate'
import SelectPrincipal from '@comp/company/SelectPrincipal'
import { isRepeat } from '../../../utils/util'
import { money } from '../../../utils/validate'
export default {
name: 'WorkingGroupProjectModule',
@@ -210,10 +212,18 @@ export default {
},
year: {
rules: [{ required: true, message: '请选择运行年份' }],
validateTrigger: 'blur'
validateTrigger: 'change'
},
principalIdA: {
rules: [{ required: true, message: '请选择负责人A' }],
rules: [{ required: true, validator: this.validatePrincipal }],
validateTrigger: 'change'
},
principalIdB: {
rules: [{ required: false, validator: this.validatePrincipal }],
validateTrigger: 'change'
},
checkMoney: {
rules: [{ required: false, validator: this.checkMoney }],
validateTrigger: 'blur'
}
},
@@ -272,7 +282,48 @@ export default {
},
handleCancel() {
this.close()
}
},
/**
* 校验负责人是否重复
* @param rule
* @param value
* @param callback
*/
validatePrincipal(rule, value, callback) {
if (rule.field === 'principalIdA') {
if (!value) {
callback('请选择负责人A')
}
}
if (value) {
const principalObj = this.form.getFieldsValue(['principalIdA', 'principalIdB'])
const principalArr = Object.values(principalObj)
principalArr.filter(tt => tt !== undefined)
if (isRepeat(principalArr)) {
callback('请选择不同的负责人')
} else {
callback()
}
callback()
return
}
callback()
},
/**
* 校验金额格式
* @param rules
* @param value
* @param callback
*/
checkMoney(rules, value, callback) {
if (value) {
if (money(value)) {
callback()
return
}
callback('请输入正确格式的金额')
}
},
}
}
</script>