当前位置: 首页 > news >正文

做网站开发 用什么网站程序元

做网站开发 用什么,网站程序元,东阳网站建设yw81,上海装修公司投诉翻看之前工程师写的vue2的代码#xff0c;很多都是复制、粘贴#xff0c;也真是搞不懂#xff0c;明明可以写一个控件#xff0c;不就可以重复使用。很多前端总喜欢element搞一下#xff0c;ant-design也搞一下#xff0c;有啥意义#xff0c;控件也不是自己写的#x…翻看之前工程师写的vue2的代码很多都是复制、粘贴也真是搞不懂明明可以写一个控件不就可以重复使用。很多前端总喜欢element搞一下ant-design也搞一下有啥意义控件也不是自己写的积木也没有搭好。 选中之后将值带回去 先看看组件代码 templateel-input v-modelinputLabel clickshowSubtemplate #suffixi classiconfont iconicon2-081/i/template/el-inputBaseDialog refdialog title选择会计科目 width470px :visiblevisible :showClosetrue beforeClosevisiblefalseel-tabs v-modelsubjectName el-tab-pane v-for(item,index) in subjectTabs :keyindex :nameitem.name :labelitem.title :valueindex classtabPaneel-tree :datacategoryTree[index] node-keyid default-expand-all highlight-current :expand-on-click-nodefalse node-clickhandleSubjectClick :propsdefaultSubjecTreePropsstyleheight: 380px;overflow-y: auto;template #default{ node,data }span classcustom-tree-nodei :classdata.children.length0 ? iconfont iconicon2-08 : iconfont iconicon2-11 /i{{ node.label }}/span/template/el-tree/el-tab-pane/el-tabstemplate #footerdiv classdialog-footerel-button typeprimary clickcancelDialog返 回/el-button/div/template/BaseDialog /template script langts 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?.accountingStandard1?[{title: 资产, name: 1,},{title: 负债, name: 2,},{title: 权益, name: 3,},{title: 成本, name: 4,},{title: 损益, name: 5,}, ]:[{title: 资产, name: 1,},{title: 负债, name: 2,},{title: 共同, name: 3,},{title: 权益, 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控件使用比较简单了 el-form-item label应付账款 propyfzkacc-account-subject v-modelorderForm.yfzk/acc-account-subject/el-form-item但是在保存和加载的时候需要特殊处理,因为控件的值是{value:data.id,label:data.name} 保存之前需要做一次深拷贝,不能直接修改orderForm.value因为双向绑定页面的数据会改变。 const convertParams () {debuggerlet params proxy.$tool.deepClone({...orderForm.value})// 应收账款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);}}}) }页面加载的时候也需要做一下处理还是因为数据结构的缘故 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;// 应收张狂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.hkea.cn/news/14431479/

相关文章:

  • 做网站有哪些费用crm管理系统哪家好
  • 北京市建设网站首页线下推广渠道
  • 做购物网站适合的服务器网站上的链接怎么做的
  • 雷山网站建设网站分析内容
  • wordpress 做大型网站最吉利旺财的公司名字
  • 系统的网站建设教程青岛网站设计价格
  • 网站建设专员网站建设的原因
  • 珠海做网站设计有哪些开通企业邮箱要钱吗
  • 网络推广文案有哪些seowhy论坛
  • 自己如何制作网站山东新闻 最新消息 今天
  • 织梦是怎么做网站郑州做网站的公司有哪些
  • 金坛企业网站建设公司手机兼职赚钱正规平台怎么找
  • 定制高端网站的公司阜阳市建设局网站
  • 建设一个网站的好处如何自学网页设计
  • 外链推广网站都有哪些一站式建设网站
  • 网站与域名的区别学生网站建设的基本流程
  • 汕头手机模板建站赣州网站建设好么
  • 广州小企业网站制作学设计的个人网页设计作品欣赏
  • wordpress付费剧集网站wordpress恢复源代码
  • 网站建设 繁体莘县网站开发
  • 北京学生做兼职的网站杭州seo营销
  • 雅安公司做网站网站备案用的幕布
  • 怎样能注册自己的网站家具设计网站大全
  • 做打鱼网站的代理wordpress域名404
  • 重庆网站seo建设手机端便民服务平台网站建设
  • 网站建设不包括哪个阶段开发区网站建设
  • 汕头公众号建设网站网站做兼容需要多少钱
  • 专业建站网产品网络推广电商网站开发数据库表
  • 微信公众号怎么创建优惠券手机网站排名优化软件
  • 社群电商的运营模式sem优化是什么