| | |
| | | {{ item }} |
| | | </el-tag> |
| | | </div> |
| | | <avue-input v-model="searchText" placeholder="æ¥è¯¢" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input> |
| | | <avue-input v-model="searchText" @change="handleSearch" placeholder="æ¥è¯¢" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input> |
| | | </div> |
| | | <div style="height: 60vh"> |
| | | <el-tabs v-model="activeName" @tab-click="handleTabClick"> |
| | |
| | | searchText:'', |
| | | activeName:'', |
| | | svgHtml:'', |
| | | allIconList:[], |
| | | iconList:[] |
| | | } |
| | | }, |
| | |
| | | } else { |
| | | this.iconList = getStore({ name:'icons'}); |
| | | } |
| | | this.allIconList=this.iconList; |
| | | if(this.iconList && this.iconList.length>0){ |
| | | this.activeName=this.iconList[0].label; |
| | | }else { |
| | | getIcons().then(res => { |
| | | /*getIcons().then(res => { |
| | | this.iconList=res.data.data; |
| | | this.allIconList=this.iconList; |
| | | store.dispatch("setIcons", this.iconList); |
| | | if(this.iconList&&this.iconList.length>0) { |
| | | this.activeName=this.iconList[0].label; |
| | | } |
| | | }) |
| | | })*/ |
| | | } |
| | | }, |
| | | methods:{ |
| | | dialogClose() { |
| | | this.visible = false; |
| | | }, |
| | | handleFocus() {debugger; |
| | | handleFocus() { |
| | | if (!this.disabled) { |
| | | if(this.iconList&&this.iconList.length>0) { |
| | | this.activeName=this.iconList[0].label; |
| | |
| | | } else { |
| | | this.iconList = getStore({ name:'icons'}); |
| | | } |
| | | this.allIconList=this.iconList; |
| | | if(this.iconList && this.iconList.length>0){ |
| | | this.activeName=this.iconList[0].label; |
| | | }else { |
| | | getIcons().then(res => { |
| | | /*getIcons().then(res => { |
| | | this.iconList=res.data.data; |
| | | this.allIconList=this.iconList; |
| | | store.dispatch("setIcons", this.iconList); |
| | | if(this.iconList&&this.iconList.length>0) { |
| | | this.activeName=this.iconList[0].label; |
| | | } |
| | | }) |
| | | })*/ |
| | | } |
| | | } |
| | | this.visible = true; |
| | |
| | | }else { |
| | | this.checkedTypes.push(type) |
| | | } |
| | | //æç
§åç±»è¿æ»¤å¾æ |
| | | if(this.checkedTypes.length==0){ |
| | | this.iconList=this.allIconList |
| | | }else{ |
| | | this.iconList=this.allIconList.filter(item=> { |
| | | return this.checkedTypes.includes(item.type); |
| | | }) |
| | | } |
| | | this.activeName=this.iconList[0].label; |
| | | }, |
| | | handleTabClick(tab, event){ |
| | | |
| | | }, |
| | | handleSearch(data){ |
| | | if(data.value==''){ |
| | | this.iconList=this.allIconList; |
| | | } |
| | | let iconList=[] |
| | | this.allIconList.forEach(item=> { |
| | | iconList.push({ |
| | | label:item.label, |
| | | type:item.type, |
| | | list: item.list.filter(iconItem=>{ |
| | | return iconItem.name.replace(item.label,'').indexOf(data.value)!=-1; |
| | | }) |
| | | }) |
| | | }) |
| | | this.iconList=iconList; |
| | | }, |
| | | clearValue(){ |
| | | this.svgHtml=''; |
| | | this.$emit('input','') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | <u-i-content-viewer-in-dialog |
| | | :btmType="btmType" |
| | | :context="context" |
| | | :inDialog="true" |
| | | :key="areasName+'customCom-'+componentVO.oid" |
| | | :componentVO="componentVO" |
| | | :sourceData="sourceData" |
| | | :dataStore="dataStore" |
| | | :areasName="areasName" |
| | | :paramVOS="urlParams" |
| | | @setData="setData" |
| | | @setDataStore="setDataStore"> |
| | | </u-i-content-viewer-in-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {queryStringToObject} from '@/util/util' |
| | | import UIContentViewerInDialog from "@/views/base/UIContentViewerInDialog"; |
| | | export default { |
| | | name: "dynamic-uiParse", |
| | | components: {UIContentViewerInDialog}, |
| | | props: { |
| | | //uiä¸ä¸æçä¸å¡ç±»åï¼æé¾æ¥ç±»åï¼ |
| | | uiBtmType: { |
| | | type: String |
| | | }, |
| | | //uiä¸ä¸æ |
| | | uiContext:{ |
| | | type: String |
| | | }, |
| | | componentVO: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | inDialog: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | canEdit:{ |
| | | //å
容æ¯å¦å¯ç¼è¾ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | areasName: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | sourceData: { |
| | | //æå±åºåçä¸ä¸åºåé䏿°æ® |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | dataStore: { |
| | | //å¼¹çªæ¶æé®æå±åºåé䏿°æ® |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | paramVOS: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | isShow: { |
| | | //æå¨åºåæ¯å¦å·²æ¾ç¤ºï¼é对tabåcollapse |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | btmType: '', |
| | | context: '', |
| | | urlParams: {}, |
| | | height: '300px', |
| | | uiParseClass: '', //?type=xxx&context=yyy¶m=zzz |
| | | isError: false, //è·¯å¾è§£æå¤±è´¥ |
| | | ComponentUrl:'base/UIContentViewerInDialog', |
| | | currentComponent: null |
| | | } |
| | | }, |
| | | watch: { |
| | | sourceData:{ |
| | | handler(newval) { |
| | | //æºæ°æ®æååæ¶åæ´å½ååºåæ°æ® |
| | | this.sourceDataMap(); |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | } |
| | | }, |
| | | computed: {}, |
| | | created() { |
| | | this.sourceDataMap(); |
| | | }, |
| | | mounted() { |
| | | //this.getHeight(this.$parent); |
| | | }, |
| | | methods: { |
| | | sourceDataMap: function () { |
| | | this.uiParseClass=this.componentVO.uiParseClass; |
| | | let urlParams = {}; |
| | | // å¦æè·¯å¾ä¸åå¨ '?' |
| | | if (this.uiParseClass.includes('?')) { |
| | | urlParams = queryStringToObject(this.customClass); |
| | | } |
| | | |
| | | this.btmType = urlParams.type; |
| | | this.context = urlParams.context; |
| | | this.urlParams = Object.assign({},this.paramVOS, urlParams) |
| | | }, |
| | | getHeight(el) { |
| | | if (el.$el.clientHeight > 50) { |
| | | this.height = el.$el.clientHeight + 'px'; |
| | | } else { |
| | | this.getHeight(el.$parent); |
| | | } |
| | | }, |
| | | setDataStore(value) { |
| | | this.$emit("setDataStore", value); |
| | | this.dataStore = value.dataStore; |
| | | }, |
| | | setData(value) { |
| | | this.$emit("setData", value); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |
| | | |
| | |
| | | :isShow="isShow"> |
| | | |
| | | </dynamic-custom> |
| | | <dynamic-ui-parse v-else-if="componentVO.uiComponentType=='uiParse'" |
| | | :uiBtmType="uiBtmType" |
| | | :uiContext="uiContext" |
| | | :inDialog="inDialog" |
| | | :canEdit="canEdit" |
| | | :actionType="actionType" |
| | | :key="areasName+'uiParse-'+componentVO.oid" |
| | | :componentVO="componentVO" |
| | | :sourceData="sourceData" |
| | | :sourceBtmType="sourceBtmType" |
| | | :dataStore="dataStore" |
| | | :areasName="areasName" |
| | | :paramVOS="paramVOS" |
| | | @setData="setData" |
| | | @setDataStore="setDataStore" |
| | | :isShow="isShow"> |
| | | </dynamic-ui-parse> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import dynamicForm from "@/components/dynamic-components/dynamic-form" |
| | | import dynamicTree from "@/components/dynamic-components/dynamic-tree" |
| | | import dynamicCustom from "@/components/dynamic-components/dynamic-custom" |
| | | import DynamicUiParse from "@/components/dynamic-components/dynamic-uiParse"; |
| | | export default { |
| | | name: "dynamicIndex", |
| | | components:{dynamicCustom, dynamicTree, dynamicForm, dynamicTable }, |
| | | components:{DynamicUiParse, dynamicCustom, dynamicTree, dynamicForm, dynamicTable }, |
| | | props:{ |
| | | //uiä¸ä¸æçä¸å¡ç±»åï¼æé¾æ¥ç±»åï¼ |
| | | uiBtmType: { |
| | |
| | | 徿 |
| | | </template> |
| | | <span class="avue-icon avue-icon--small" style="display: block"> |
| | | <svg v-if="nodeRow.imageName && nodeRow.imageName.indexOf('#')==0" aria-hidden="true"> |
| | | <use :xlink:href="nodeRow.imageName"></use> |
| | | </svg> |
| | | <i v-else :class="nodeRow.imageName"></i> |
| | | <span v-html="svgHtml(nodeRow.imageName )"></span> |
| | | </span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :span="12" :contentStyle="descriptionOption.contentStyle" |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | svgHtml(svgName){ |
| | | return func.getSVGByName(svgName); |
| | | }, |
| | | //æ 表æ¥è¯¢ |
| | | getTreeList() { |
| | | this.treeLoading = true; |
| | |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | return done(); |
| | | } |
| | | ; |
| | | |
| | | this.checkViewData = this.checkViewData.filter(item => { |
| | | return item.source && item.source.includes(source); |
| | |
| | | </template> |
| | | |
| | | <template #icon="{ row }"> |
| | | <span class="avue-icon avue-icon--small" style="display: block"> |
| | | <svg v-if="row.imagePath && row.imagePath.indexOf('#')==0" aria-hidden="true"> |
| | | <use :xlink:href="row.imagePath"></use> |
| | | </svg> |
| | | <i v-else :class="row.imagePath"></i> |
| | | </span> |
| | | <span v-html="svgHtml(row.imagePath )"></span> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="徿 ï¼" prop="imagePath"> |
| | | <avue-input-icon v-model="form.imagePath" :icon-list="iconList" placeholder="è¯·éæ©å¾æ "> |
| | | </avue-input-icon> |
| | | <input-icon v-model="form.imagePath" placeholder="è¯·éæ©å¾æ "> |
| | | </input-icon> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button @click="visibleCloseHandler">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="visibleCloseHandler">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | svgHtml(svgName){ |
| | | return func.getSVGByName(svgName); |
| | | }, |
| | | getList() { |
| | | gridStatus(this.page.currentPage, this.page.pageSize).then(res => { |
| | | const data = res.data.data; |
| | |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | return done(); |
| | | } |
| | | ; |
| | | |
| | | this.checkViewData = this.checkViewDataSearch.filter(item => { |
| | | return item.source && item.source.includes(source); |
| | |
| | | {{ item }} |
| | | </el-tag> |
| | | </div> |
| | | <avue-input v-model="form" placeholder="æ¥è¯¢" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input> |
| | | <avue-input v-model="searchText" @change="handleSearch" placeholder="æ¥è¯¢" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input> |
| | | </div> |
| | | <div style="height: calc(100vh - 190px)"> |
| | | <input-icon v-model="iconValue"></input-icon> |
| | | <div> |
| | | <el-button icon="el-icon-upload" type="primary" size="mini" @click="uploadHandler">ä¸ä¼ </el-button> |
| | | </div> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane v-for="item in iconList" :label="item.label" :name="item.label"> |
| | | <div class="iconList"> |
| | |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <!-- ä¸ä¼ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | title="徿 ä¸ä¼ " |
| | | :visible.sync="visible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | width="500px" |
| | | @close="visibleCloseHandler" |
| | | > |
| | | <avue-form ref="form" :option="option" v-model="form"> </avue-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="primary" @click="uploadSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="visibleCloseHandler">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | import {validatenull} from "@/util/validate"; |
| | | import {getStore} from "@/util/store"; |
| | | import store from "@/store"; |
| | | import {addSave, editSave} from "@/api/modeling/statusPool/api"; |
| | | import {getToken} from "@/util/auth"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | return { |
| | | types: ['æ ç¾ä¸' , 'æ ç¾äº' , 'æ ç¾ä¸' , 'æ ç¾å','æ ç¾äº' ], |
| | | checkedTypes:[], |
| | | form:'', |
| | | searchText:'', |
| | | activeName:'', |
| | | iconValue:'iconoir2:adobe-illustrator', |
| | | iconList:[] |
| | | allIconList:[], |
| | | iconList:[], |
| | | visible: false, |
| | | option: { |
| | | labelWidth: 80, |
| | | submitBtn:false, |
| | | emptyBtn:false, |
| | | column: [{ |
| | | label: 'åç±»', |
| | | prop: 'type', |
| | | type: 'select', |
| | | span: 24, |
| | | multiple:true, |
| | | dicData:[{ |
| | | label:'æ ç¾ä¸', |
| | | value:0 |
| | | },{ |
| | | label:'æ ç¾äº', |
| | | value:1 |
| | | },{ |
| | | label:'æ ç¾ä¸', |
| | | value:2 |
| | | }] |
| | | }, { |
| | | label: "éä»¶ä¸ä¼ ", |
| | | prop: "file", |
| | | dataType: "object", |
| | | type: "upload", |
| | | accept:'.json', |
| | | data:{}, |
| | | headers:this.uploadHeaders, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | span: 24, |
| | | action: "", |
| | | } |
| | | ] |
| | | }, |
| | | form:{ |
| | | type:[] |
| | | } |
| | | } |
| | | }, |
| | | created() {debugger; |
| | | computed: { |
| | | uploadHeaders() { |
| | | return { |
| | | "Authorizationtoken":getToken(), |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.initList(); |
| | | }, |
| | | methods:{ |
| | | initList(){ |
| | | if (!validatenull(this.$store.state.icons)) { |
| | | this.iconList = this.$store.state.icons; |
| | | } else { |
| | | this.iconList = getStore({ name:'icons'}); |
| | | } |
| | | this.allIconList=this.iconList; |
| | | if(this.iconList && this.iconList.length>0){ |
| | | this.activeName=this.iconList[0].label; |
| | | }else { |
| | |
| | | "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.5\" stroke-width=\"1.5\"><path d=\"M12 15a3 3 0 1 0 0-6a3 3 0 0 0 0 6\"/><path d=\"M12 9s-1.988-1.975-2-4c.001-1.993-.05-4.001 2-4c1.948.001 1.997 1.976 2 4c.003 1.985-2 4-2 4m3 3s1.975-1.988 4-2c1.993.001 4.001-.05 4 2c-.001 1.948-1.976 1.997-4 2c-1.985.003-4-2-4-2m-6 0s-1.975 1.988-4 2c-1.993-.001-4.001.05-4-2c.001-1.948 1.976-1.997 4-2c1.985-.003 4 2 4 2m3 3s1.988 1.975 2 4c-.001 1.993.05 4.001-2 4c-1.948-.001-1.997-1.976-2-4c-.003-1.985 2-4 2-4\" clip-rule=\"evenodd\"/></g></svg>" |
| | | }] |
| | | }] |
| | | this.allIconList=this.iconList; |
| | | store.dispatch("setIcons", this.iconList); |
| | | if(this.iconList.length>0) { |
| | | this.activeName=this.iconList[0].label; |
| | |
| | | }) |
| | | } |
| | | }, |
| | | methods:{ |
| | | changeType(type){ |
| | | if(this.checkedTypes.includes(type)){ |
| | | this.checkedTypes=this.checkedTypes.filter(item=> item!=type) |
| | | }else { |
| | | this.checkedTypes.push(type) |
| | | } |
| | | //æç
§åç±»è¿æ»¤å¾æ |
| | | if(this.checkedTypes.length==0){ |
| | | this.iconList=this.allIconList |
| | | }else{ |
| | | this.iconList=this.allIconList.filter(item=> { |
| | | return this.checkedTypes.includes(item.type); |
| | | }) |
| | | } |
| | | this.activeName=this.iconList[0].label; |
| | | }, |
| | | handleSearch(data){ |
| | | if(data.value==''){ |
| | | this.iconList=this.allIconList; |
| | | } |
| | | let iconList=[] |
| | | this.allIconList.forEach(item=> { |
| | | iconList.push({ |
| | | label:item.label, |
| | | type:item.type, |
| | | list: item.list.filter(iconItem=>{ |
| | | return iconItem.name.replace(item.label,'').indexOf(data.value)!=-1; |
| | | }) |
| | | }) |
| | | }) |
| | | this.iconList=iconList; |
| | | }, |
| | | handleClick(tab, event){ |
| | | |
| | | }, |
| | | uploadHandler(){ |
| | | this.visible = true; |
| | | }, |
| | | // å
³éå¯¹è¯æ¡ |
| | | visibleCloseHandler() { |
| | | const form = {} |
| | | this.form = form; |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | |
| | | // ä¸ä¼ ä¿å |
| | | uploadSaveHandler() {debugger; |
| | | this.$refs.form.validate((valid,done) => { |
| | | if (valid) { |
| | | done() |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.initList(); |
| | | done(); |
| | | this.visibleCloseHandler(); |
| | | } else { |
| | | this.$message.error(res.data.obj); |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | this.$message.error('å«åé¿åº¦ä¸è½è¶
è¿255ï¼'); |
| | | return |
| | | } |
| | | ; |
| | | |
| | | const params = { |
| | | id: this.form.id, |
| | | name: this.form.name, |