中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

做網(wǎng)站項(xiàng)目的心得小紅書筆記關(guān)鍵詞排名優(yōu)化

做網(wǎng)站項(xiàng)目的心得,小紅書筆記關(guān)鍵詞排名優(yōu)化,企業(yè)網(wǎng)站建設(shè)機(jī)構(gòu),大慶市建設(shè)中專網(wǎng)站翻看之前工程師寫的vue2的代碼,很多都是復(fù)制、粘貼,也真是搞不懂,明明可以寫一個(gè)控件,不就可以重復(fù)使用。很多前端總喜歡element搞一下,ant-design也搞一下,有啥意義,控件也不是自己寫的&#x…

翻看之前工程師寫的vue2的代碼,很多都是復(fù)制、粘貼,也真是搞不懂,明明可以寫一個(gè)控件,不就可以重復(fù)使用。很多前端總喜歡element搞一下,ant-design也搞一下,有啥意義,控件也不是自己寫的,積木也沒有搭好。
1
選中之后將值帶回去
1
先看看組件代碼

<template><el-input v-model="inputLabel" @click="showSub"><template #suffix><i class="iconfont iconicon2-081"></i></template></el-input><BaseDialog ref="dialog" title="選擇會(huì)計(jì)科目" width="470px" :visible='visible' :showClose="true" @beforeClose="visible=false"><el-tabs v-model="subjectName" ><el-tab-pane v-for="(item,index) in subjectTabs" :key="index" :name='item.name' :label="item.title" :value="index" class="tabPane"><el-tree :data="categoryTree[index]" node-key="id" default-expand-all highlight-current :expand-on-click-node='false' @node-click="handleSubjectClick" :props="defaultSubjecTreeProps"style="height: 380px;overflow-y: auto;"><template #default="{ node,data }"><span class="custom-tree-node"><i :class="data.children.length>0 ? 'iconfont iconicon2-08' : 'iconfont iconicon2-11' "></i>{{ node.label }}</span></template></el-tree></el-tab-pane></el-tabs><template #footer><div  class="dialog-footer"><el-button type="primary" @click="cancelDialog">返 回</el-button></div></template></BaseDialog>
</template>
<script lang="ts" setup>
import {ref,getCurrentInstance,computed,onMounted,watch } from 'vue'
import BaseDialog from '@/components/base/BaseDialog.vue';
import { useAppStore } from '@/store'
import { de } from 'element-plus/es/locale';
const { proxy }: any = getCurrentInstance();
const appStore = useAppStore()
const userInfo = computed(() => appStore.userInfo)
const curAccountSet = computed(() => appStore.curAccountSet)
const defaultSubjecTreeProps = ref({children: 'children',label: 'label'})
const inputProps = ref({label:'name',value:'id'})
const inputLabel = ref('')
const emits = defineEmits(['update:modelValue','change'])
const visible = ref(false)
const props = defineProps<{modelValue:{},
}>()
const showSub = () =>{visible.value = true;
}
const subjectName = ref(1)
const subjectTabs = ref(curAccountSet.value?.accountingStandard=='1'?[{title: "資產(chǎn)", name: 1,},{title: "負(fù)債", name: 2,},{title: "權(quán)益", name: 3,},{title: "成本", name: 4,},{title: "損益", name: 5,},
]:[{title: "資產(chǎn)", name: 1,},{title: "負(fù)債", name: 2,},{title: "共同", name: 3,},{title: "權(quán)益", name: 4,},{title: "成本", name: 5,},{title: "損益", name: 6,},
])
const categoryTree = ref([])
const getCategoryTree = async (cate) =>{const res = await proxy.$api.acc.accountsubject.list({asId:curAccountSet.value.accId,category:cate});if (res.success){categoryTree.value[cate - 1] = res.data;} else{proxy.$message.error(res.msg);}
}
const handleSubjectClick = (data) => {if (proxy.$_.isEmpty(data.children)){inputLabel.value = data.nameemits('update:modelValue',{value:data.id,label:data.name})visible.value = false}
}
const cancelDialog = () =>{visible.value = false;
}
watch(()=>props.modelValue,(newVal,oldVal)=>{if (!proxy.$_.isEmpty(newVal)){inputLabel.value = newVal['label']}
},{immediate:true,deep:true})
onMounted(()=>{getCategoryTree(1);getCategoryTree(2);getCategoryTree(3);getCategoryTree(4);getCategoryTree(5);
})
</script>

控件使用比較簡(jiǎn)單了

<el-form-item label="應(yīng)付賬款" prop="yfzk"><acc-account-subject v-model="orderForm.yfzk"></acc-account-subject></el-form-item>

但是在保存和加載的時(shí)候需要特殊處理,因?yàn)榭丶闹凳?code>{value:data.id,label:data.name}
保存之前,需要做一次深拷貝,不能直接修改orderForm.value,因?yàn)殡p向綁定,頁(yè)面的數(shù)據(jù)會(huì)改變。

const convertParams = () =>{debuggerlet params = proxy.$tool.deepClone({...orderForm.value})// 應(yīng)收賬款params['yszk'] = orderForm.value['yszk']?.value || ''params['yszkName'] = orderForm.value['yszk']?.label || ''return params;
}
const save = async () => {orderRef.value?.validate(async valid=>{if (valid){isLoading.value = trueconst params = convertParams()const res = await proxy.$api.setting.psiAccConfig.save(params)if (res.success){isLoading.value = false;proxy.$message.success(res.msg);} else{isLoading.value = false;proxy.$message.error(res.msg);}}})
}

頁(yè)面加載的時(shí)候也需要做一下處理,還是因?yàn)閿?shù)據(jù)結(jié)構(gòu)的緣故

const load = async () => {const res = await proxy.$api.setting.psiAccConfig.load({asId:userInfo.value.currentAsId})if (res.success){isLoading.value = false;orderForm.value = res.data;// 應(yīng)收張狂if (orderForm.value['yszkName']){orderForm.value['yszk'] = {label:orderForm.value['yszkName'],value:orderForm.value['yszk']}}}} else{isLoading.value = false;proxy.$message.error(res.msg);}
}
http://www.risenshineclean.com/news/64818.html

相關(guān)文章:

  • 網(wǎng)站備案要多長(zhǎng)時(shí)間廣告精準(zhǔn)推廣平臺(tái)
  • 企業(yè)網(wǎng)站管理系統(tǒng)安裝教程重慶森林講的什么內(nèi)容
  • 如何騰訊云二級(jí)域名做網(wǎng)站北京中文seo
  • 附近短期電腦培訓(xùn)班深圳關(guān)鍵詞優(yōu)化公司哪家好
  • thinkphp做網(wǎng)站好嗎免費(fèi)網(wǎng)站注冊(cè)免費(fèi)創(chuàng)建網(wǎng)站
  • 一般給公司做網(wǎng)站用什么軟件奶茶推廣軟文200字
  • 做曖網(wǎng)站seo排名優(yōu)化教學(xué)
  • 如何做網(wǎng)站靜態(tài)頁(yè)面佛山網(wǎng)站設(shè)計(jì)實(shí)力樂云seo
  • 做網(wǎng)站瀏覽器2022重大時(shí)政熱點(diǎn)事件簡(jiǎn)短
  • 如何建設(shè)網(wǎng)站效果好近期10大新聞事件
  • 安徽教育機(jī)構(gòu)網(wǎng)站建設(shè)在線網(wǎng)頁(yè)編輯平臺(tái)
  • 網(wǎng)頁(yè)框架與布局網(wǎng)站如何做關(guān)鍵詞優(yōu)化
  • 網(wǎng)站建設(shè)及經(jīng)營(yíng)應(yīng)解決好的問題seo網(wǎng)站診斷文檔案例
  • 昆明網(wǎng)站建設(shè)電話seo導(dǎo)航站
  • 做房地產(chǎn)咨詢網(wǎng)站怎么贏利百度地圖人工客服電話
  • .net網(wǎng)站開發(fā)程序員青島seo服務(wù)公司
  • 公司網(wǎng)站公眾號(hào)維護(hù)怎么做網(wǎng)站聯(lián)盟推廣
  • 上海做網(wǎng)站優(yōu)化價(jià)格重慶seo排名電話
  • 做網(wǎng)站上海做一個(gè)簡(jiǎn)單的網(wǎng)站需要多少錢
  • 高端的環(huán)保行業(yè)網(wǎng)站開發(fā)歌爾股份砍單
  • 東莞做營(yíng)銷型網(wǎng)站的百度推廣開戶費(fèi)用標(biāo)準(zhǔn)
  • 區(qū)域知識(shí)產(chǎn)權(quán)貿(mào)易中心seo助力網(wǎng)站轉(zhuǎn)化率提升
  • 網(wǎng)站如何做sem優(yōu)化seo搜索引擎優(yōu)化工程師招聘
  • 織夢(mèng)網(wǎng)站識(shí)別合肥seo管理
  • 020網(wǎng)站設(shè)計(jì)互聯(lián)網(wǎng)營(yíng)銷培訓(xùn)班
  • 做網(wǎng)站的軟件著作權(quán)安卓手機(jī)優(yōu)化
  • 園林設(shè)計(jì)公司東莞網(wǎng)絡(luò)優(yōu)化哪家好
  • 大連哪個(gè)公司做網(wǎng)站好網(wǎng)絡(luò)營(yíng)銷專業(yè)介紹
  • 無錫網(wǎng)站設(shè)計(jì) 眾海外營(yíng)銷推廣服務(wù)
  • 招聘網(wǎng)站建設(shè)需求分析十大計(jì)算機(jī)培訓(xùn)學(xué)校