Browse Source

修改注册页表格元素冲突问题

pull/1/head
zq 4 months ago
parent
commit
ad0d8a255a
  1. 1
      src/assets/register/tableEdit.svg
  2. 1
      src/assets/register/weixin.svg
  3. 1
      src/assets/register/zhifubao.svg
  4. 19
      src/components/GuipSelect.vue
  5. 81
      src/style/theme/common.scss
  6. 574
      src/views/Register.vue
  7. 3
      src/views/elementGroups.vue

1
src/assets/register/tableEdit.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="15.72998046875" height="15.7353515625" viewBox="0 0 15.72998046875 15.7353515625"><g><g><path d="M0.7850341796875,15.73539746875L14.9450341796875,15.73539746875L14.9450341796875,15.73373046875Q15.0223341796875,15.73373046875,15.0981341796875,15.71864646875Q15.1740341796875,15.70356346875,15.2454341796875,15.67397546875Q15.3168341796875,15.64438846875,15.3811341796875,15.60143446875Q15.4454341796875,15.55847946875,15.5001341796875,15.50380946875Q15.5547341796875,15.44913846875,15.5977341796875,15.38485346875Q15.6407341796875,15.32056746875,15.6702341796875,15.24913646875Q15.6998341796875,15.17770646875,15.7149341796875,15.10187646875Q15.7300341796875,15.02604616875,15.7300341796875,14.94873046875Q15.7300341796875,14.87141476875,15.7149341796875,14.79558446875Q15.6998341796875,14.71975446875,15.6702341796875,14.64832446875Q15.6407341796875,14.57689346875,15.5977341796875,14.51260746875Q15.5547341796875,14.44832246875,15.5001341796875,14.39365146875Q15.4454341796875,14.33898146875,15.3811341796875,14.29602646875Q15.3168341796875,14.25307246875,15.2454341796875,14.22348546875Q15.1740341796875,14.19389746875,15.0981341796875,14.17881446875Q15.0223341796875,14.16373046875,14.9450341796875,14.16373046875L14.9450341796875,14.16206346875L0.7850341796875,14.16206346875L0.7850341796875,14.16373046875Q0.7077184796875,14.16373046875,0.6318881796875,14.17881446875Q0.5560581796874999,14.19389746875,0.4846281796875,14.22348546875Q0.4131971796875,14.25307246875,0.3489111796875,14.29602646875Q0.28462617968750004,14.33898146875,0.2299551796875,14.39365146875Q0.17528517968750001,14.44832246875,0.13233017968750005,14.51260746875Q0.0893761796875,14.57689346875,0.05978917968749997,14.64832446875Q0.030201179687500024,14.71975446875,0.015118179687499955,14.79558446875Q0.000034179687499968914,14.87141476875,0.000034179687499968914,14.94873046875Q0.000034179687499968914,15.02604616875,0.015118179687499955,15.10187646875Q0.030201179687500024,15.17770646875,0.05978917968749997,15.24913646875Q0.0893761796875,15.32056746875,0.13233017968750005,15.38485346875Q0.17528517968750001,15.44913846875,0.2299551796875,15.50380946875Q0.28462617968750004,15.55847946875,0.3489111796875,15.60143446875Q0.4131971796875,15.64438846875,0.4846281796875,15.67397546875Q0.5560581796874999,15.70356346875,0.6318881796875,15.71864646875Q0.7077184796875,15.73373046875,0.7850341796875,15.73373046875L0.7850341796875,15.73539746875Z" fill-rule="evenodd" fill="#8A9099" fill-opacity="1"/></g><g><path d="M9.9441694921875,0.23024209375000004L9.9437094921875,0.23069709375000003L1.8036394921875,8.38052109375Q1.6931454921875,8.49115109375,1.6333544921874998,8.63562109375Q1.5735624921875,8.78009109375,1.5735624921875,8.93645109375L1.5735624921875,11.79992109375Q1.5735624921875,11.87742109375,1.5886784921875,11.95342109375Q1.6037934921875001,12.02942109375,1.6334444921875,12.10102109375Q1.6630944921875002,12.17262109375,1.7061404921875,12.23702109375Q1.7491854921874999,12.30142109375,1.8039724921875,12.35622109375Q1.8587584921875,12.41102109375,1.9231804921875,12.45402109375Q1.9876034921875,12.49712109375,2.0591854921875,12.52672109375Q2.1307674921875,12.55642109375,2.2067584921875,12.57152109375Q2.2827495921875,12.58662109375,2.3602294921875,12.58662109375L5.2383294921875,12.58662109375Q5.3948494921875,12.58662109375,5.5394494921875,12.52672109375Q5.6840494921874996,12.46682109375,5.794709492187501,12.35612109375L13.9299294921875,4.21727109375Q13.9847294921875,4.16249109375,14.0277294921875,4.09808109375Q14.0707294921875,4.03367109375,14.1004294921875,3.96210109375Q14.1300294921875,3.89054109375,14.1451294921875,3.81457109375Q14.1602294921875,3.73860109375,14.1602294921875,3.66114109375Q14.1602294921875,3.58368109375,14.1451294921875,3.50771109375Q14.1300294921875,3.43174109375,14.1004294921875,3.36017109375Q14.0707294921875,3.28861109375,14.0277294921875,3.22420109375Q13.9847294921875,3.15979109375,13.9299294921875,3.10500109375L11.0566794921875,0.23048609374999995Q11.0019094921875,0.17568709375000002,10.9374994921875,0.13262709375000004Q10.8730794921875,0.08956809374999997,10.8015094921875,0.059902093749999996Q10.7299294921875,0.030236093750000026,10.6539394921875,0.015104093749999992Q10.5779594921875,-0.000028906249999960387,10.5004794921875,-0.000045906250000005144Q10.4229994921875,-0.0000629062500000499,10.3469994921875,0.015036093750000035Q10.271009492187499,0.030135093750000008,10.1994194921875,0.059770093749999975Q10.1278294921875,0.08940409375000002,10.0633994921875,0.13243609374999998Q9.9989694921875,0.17546709375000002,9.9441694921875,0.23024209375000004ZM10.5005194921875,1.89959109375L3.1468964921875,9.26202109375L3.1468964921875,11.01332109375L4.9123794921875,11.01332109375L12.2612894921875,3.66114109375L10.5005194921875,1.89959109375Z" fill-rule="evenodd" fill="#8A9099" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

1
src/assets/register/weixin.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="26" viewBox="0 0 26 26"><defs><clipPath id="master_svg0_151_44063"><rect x="0" y="0" width="26" height="26" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_151_44063)"><g><rect x="1" y="4" width="24" height="20" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M6,8.22114375C6,8.83064375,6.490547,9.321193749999999,7.1000499999999995,9.321193749999999C7.70955,9.321193749999999,8.20012,8.83064375,8.20012,8.22114375C8.20012,7.61164075,7.70955,7.12109375,7.1000499999999995,7.12109375C6.490572,7.12109375,6,7.61164075,6,8.22114375ZM14.53287,13.884953750000001C14.53287,14.360643750000001,14.9194,14.74717375,15.39509,14.74717375C15.87078,14.74717375,16.2573,14.360643750000001,16.2573,13.884953750000001C16.2573,13.409263750000001,15.87078,13.02274375,15.39509,13.02274375C14.9194,13.02274375,14.53287,13.409263750000001,14.53287,13.884953750000001ZM11.58949,8.22114375C11.58949,8.83064375,12.08004,9.321193749999999,12.689540000000001,9.321193749999999C13.29904,9.321193749999999,13.78959,8.83064375,13.78959,8.22114375C13.78959,7.61164075,13.29904,7.12109375,12.689540000000001,7.12109375C12.08004,7.12109375,11.58949,7.61164075,11.58949,8.22114375Z" fill="#00C261" fill-opacity="1"/></g><g><path d="M21.7860125,0L4.2147825,0C1.8957325,0,0.007812797353,1.88795,0.007812797353,4.22185L0.007812797353,21.7633C0.007812797353,24.0972,1.8957325,25.9851,4.2147825,25.9851L21.7860125,25.9851C24.1050125,25.9851,25.9929125,24.0972,25.9929125,21.7633L25.9929125,4.22185C25.9929125,1.90277,24.1050125,0,21.7860125,0ZM9.7596625,17.4225C8.7785225,17.4225,7.9906525,17.2144,6.9946525,17.0212L4.2445225,18.4036L5.0323925,16.04C3.0552725,14.6575,1.8808825,12.8736,1.8808825,10.7181C1.8808825,6.97196,5.4337625,4.0137,9.7596625,4.0137C13.6396125,4.0137,17.0289125,6.37731,17.7128125,9.54373C17.4604125,9.51401,17.2072125,9.49912,16.9546125,9.49912C13.2085125,9.49912,10.2502125,12.2939,10.2502125,15.7278C10.2502125,16.3076,10.3394125,16.8576,10.4881125,17.3779C10.2502125,17.4076,10.0124125,17.4225,9.7596625,17.4225ZM21.3846125,20.1727L21.9792125,22.1349L19.8237125,20.9457C19.0358125,21.1389,18.2479125,21.3471,17.4601125,21.3471C13.7139125,21.3471,10.7557125,18.7902,10.7557125,15.6238C10.7557125,12.4723,13.7139125,9.90051,17.4600125,9.90051C20.9981125,9.90051,24.1496125,12.4723,24.1496125,15.6238C24.1347125,17.4225,22.9603125,18.9983,21.3846125,20.1727Z" fill="#00C261" fill-opacity="1"/></g><g><path d="M18.828125,13.883699374999999C18.828125,14.359394375,19.214646,14.745914375,19.690339,14.745914375C20.166035,14.745914375,20.552554999999998,14.359394375,20.552554999999998,13.883699374999999C20.552554999999998,13.408006375,20.166035,13.021484375,19.690339,13.021484375C19.199792,13.021484375,18.828125,13.408006375,18.828125,13.883699374999999Z" fill="#00C261" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

1
src/assets/register/zhifubao.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="25.99951171875" viewBox="0 0 26 25.99951171875"><g><g><rect x="2.4453125" y="3.380859375" width="23.46553611755371" height="19.711050033569336" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M16.3459,16.953C14.0665,19.6895,11.7089,21.3628,8.13524,21.3628C4.56157,21.3628,2.2049,19.1579,2.50939,16.4986C2.66211,14.7509,3.87815,11.8616,9.1241,12.3188C11.8607,12.546,13.154,13.0777,15.4343,13.8394C16.0433,12.776,16.4977,11.56,16.8775,10.344L6.84189,10.344L6.84189,9.3551L11.7834,9.3551L11.7834,7.60167L5.77762,7.60167L5.77762,6.46009L11.7834,6.46009L11.7834,3.87624Q11.8578,3.49635,12.315,3.49635L14.8244,3.49635L14.8244,6.46009L21.2091,6.46009L21.2091,7.5234L14.7471,7.5234L14.7471,9.27206L19.993,9.27206C19.5358,11.2498,18.777,13.0729,17.8655,14.5934C19.1588,15.0506,24.4029,16.6456,25.9234,17.1028L25.9234,3.80084C25.9234,1.67325,24.1757,1.67839e-7,22.1225,1.67839e-7L3.80275,0C1.67229,0,0,1.7477,0,3.80084L0,22.1989C0,24.3265,1.7477,25.9997,3.80084,25.9997L22.1989,25.9997C24.3265,25.9997,25.9997,24.252,25.9997,22.1989L25.9997,21.2845C24.7054,20.6784,18.9297,18.169,16.3459,16.953ZM3.57271,16.2686C3.34554,17.2574,3.9526,19.6151,7.75248,19.6151C10.0318,19.6151,12.315,18.1719,14.1372,15.8142C11.5524,14.5209,9.42287,13.9138,6.99079,13.9138C4.86415,13.9892,3.79988,15.2797,3.57271,16.2686Z" fill="#006AFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

19
src/components/GuipSelect.vue

@ -8,7 +8,8 @@
<el-select
:style="{width:width}"
v-model="value" placeholder="请选择">
:placeholder="placeholder1"
v-model="value">
<el-option
v-for="item in options"
:key="item.value"
@ -28,14 +29,15 @@
data() {
return {
value: '',
style:{}
style:{},
placeholder1:'请选择'
}
},
defaultValue(newVal) {
console.log(newVal,'newVal');
this.value = newVal;
},
created(){
mounted(){
//
if(this.defaultValue != null){
this.value = this.defaultValue;
@ -44,6 +46,17 @@
if(this.placeholder){
this.placeholder1 = this.placeholder;
}
this.$nextTick(()=>{
let els = document.querySelectorAll('.el-select .el-input');
els.forEach(item=>{
item.onmouseover= function(){
item.classList.add("hoverclass")
}
item.onmouseout= function(){
item.classList.remove("hoverclass")
}
})
})
},
}
</script>

81
src/style/theme/common.scss

@ -19,6 +19,68 @@ body{
.min-width{
min-width: 1200px;
}
// 公共类名
.mb24{
margin-bottom: 24px;
}
// 多数左右布局中间带竖线
.min-flex{
min-width: 1100px;
max-width: 1556px;
width: 84.75%;
margin: 0 auto;
}
.desc{
font-size: 12px;
font-weight: normal;
line-height: 13px;
letter-spacing: 0.08em;
font-variation-settings: "opsz" auto;
/* text/text_4 */
color: #8A9099;
}
.flex-common{
padding: 32px 36px;
background-color: #fff;
h3{
text-align: left;
margin: 0 0 32px 0;
}
.flex-wrap{
width: 100%;
display: flex;
justify-content: space-between;
}
.flex-line{
border-left: 1px solid #DFE2E6;
margin: 0 54px;
}
.flex-left,.flex-right{
min-width: 460px;
max-width: 590px;
flex: 1;
}
}
// end---------
//radio 发生change事件时会有报错
::v-deep .el-radio__original {
display: none !important;
}
::v-deep.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled){
.el-radio__inner {
box-shadow: none !important;
}
}
::v-deep .el-popover {
display: none !important;
}
::v-deep.el-popover:focus:not(.is-focus):not(:active):not(.is-disabled){}
// .el-radio__inner {
// box-shadow: none !important;
// }
/* button==== start */
.el-button{
@ -161,6 +223,10 @@ body{
// select start
.el-select{
width: 100%;
transition: all .5s;
}
.el-select:hover .el-input__inner{
transition: all .5s;
border-color: transparent;
@ -211,6 +277,12 @@ body{
min-width: 54px;
margin-right: 8px;
}
label.el-radio{
margin-right: 24px;
.el-radio__label{
padding-left: 8px;
}
}
.form-item-top{
height: 18px;
display: flex;
@ -255,6 +327,7 @@ body{
.w388{
width: 388px;
}
.form-item{
display: flex;
align-items: center;
@ -273,6 +346,8 @@ body{
}
.el-form-item__content{
width: 100%;
display: flex;
justify-content: flex-start;
}
}
.form-top-icon{
@ -324,7 +399,11 @@ body{
}
// table end
.el-pagination{
margin-top: 16px;
display: flex;
justify-content: flex-end;
}
// dialog--start
.el-dialog{
min-height: 344px;

574
src/views/Register.vue

@ -55,8 +55,7 @@
<img v-if="isStepFinished(index)" src="@/assets/register/step1_ing.svg" alt="checked"
style="width: 24px; height: 24px" />
<!-- 填写中状态 -->
<img v-else-if="isStepActive(index)" :src="step.checked" alt="editing"
style="width: 24px; height: 24px" />
<img v-else-if="isStepActive(index)" :src="step.checked" alt="editing" style="width: 24px; height: 24px" />
<!-- 未填写状态 -->
<img v-else :src="step.wait" alt="waiting" style="width: 24px; height: 24px" />
</div>
@ -74,43 +73,464 @@
</el-step>
</el-steps>
<p class="pageDesc">搭建售卖渠道</p>
<p class="pageDesc min-flex">搭建售卖渠道</p>
<div class="step1-wrap min-flex" v-if="activeStep == 1">
<div class="step1-top1 flex-common">
<h3>站点信息</h3>
<el-form :model="form1" ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24">
<!-- 这个 form-top-icon 类名已经有样式除此布局外需要自定义添加样式 -->
<div slot="formLeft">站点简称
</div>
<div slot="formRight" class="desc">一个站点对应一个销售渠道定义好名字好区分
</div>
<GuipInput slot="formDom" ref="GuipInput" :maxlength="10" :showWordLimit="true"
placeholder="仅自己区分站点销售渠道,客户看不到" />
</GuipFormItem>
<GuipFormItem column="column">
<div slot="formLeft">销售渠道
</div>
<GuipRadio slot="formDom" v-model="form1.distribution_channel" :options="distribution_channel_options"
prop="language" @change="radioChange" />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" class="mb24">
<div slot="formLeft">域名来源
</div>
<GuipRadio slot="formDom" v-model="form1.language" :options="domain_source" prop="language"
@change="radioChange" />
</GuipFormItem>
<GuipFormItem column="column">
<div slot="formLeft">域名设置
</div>
<GuipInput slot="formDom" ref="GuipInput" placeholder="仅支持数字、字母">
<span slot="appendshow">.chachongz.com</span>
</GuipInput>
</GuipFormItem>
</div>
</div>
</el-form>
</div>
<div class="step1-top2 flex-common">
<h3>模板选择</h3>
<el-form :model="form1" ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
</div>
</div>
</el-form>
</div>
</div>
<!-- 电商渠道 -->
<div class="step2-wrap min-flex" v-if="activeStep == 2 && distribution_channel > 0">
<div class="step1-top flex-common">
<h3>店铺收款</h3>
<el-form :model="form2" ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<!--电商渠道-仅支持店铺首款 -->
<GuipFormItem column="column">
<div slot="formLeft">店铺渠道
</div>
<GuipRadio slot="formDom" v-model="form2.store_channel" :options="store_channel" prop="language"
@change="radioChange_store" />
</GuipFormItem>
<GuipFormItem column="column" v-if="has_store < 1">
<div slot="formLeft">店铺授权
</div>
<div slot="formDom" class="first_register">
<div class="first_reg_left">
<b>请确保使用要添加的淘宝主账号登录并授权</b>
<p> 如未购买"快乐帮手"服务或已过期会跳转到购买服务页面</p>
</div>
<div class="first_reg_right">
<GuipButton type="primary" size="medium">前往授权</GuipButton>
</div>
</div>
</GuipFormItem>
<GuipFormItem column="column" v-else>
<div slot="formLeft">店铺绑定
</div>
<div slot="formRight" class="desc">可选择已有店铺或授权新店铺
</div>
<div slot="formDom" class="first_register">
</div>
</GuipFormItem>
</div>
<div class="step3-wrap">
<div class="step3-top">
<h3>服务列表</h3>
<div class="btngroup">
<GuipButton type="mild" size="mmedium">添加查重服务</GuipButton>
<GuipButton type="mild" size="mmedium">添加写作辅助</GuipButton>
<GuipButton type="mild" size="mmedium">添加AIGC</GuipButton>
</div>
</el-form>
</div>
</div>
<!-- 非电商 -->
<div class="step2-wrap min-flex" v-if="activeStep == 2 && distribution_channel < 1">
<div class="step2-top flex-common">
<h3>店铺收款</h3>
<el-form :model="form3" ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column">
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/weixin.svg" style="width: 26px;height: 26px;" alt=""><span>微信收款</span>
</div>
<GuipSelect slot="formDom" v-model="form3.weixin_pay" prop="weixin_pay" :options="options_weixin"
placeholder="未绑定微信收款" />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column">
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/zhifubao.svg" style="width: 26px;height: 26px;" alt=""><span>支付宝收款</span>
</div>
<GuipSelect slot="formDom" v-model="form3.zhifubao_pay" prop="zhifubao_pay" :options="options_zhifubao"
placeholder="未绑定支付宝收款" />
</GuipFormItem>
</div>
</div>
</el-form>
</div>
</div>
<div class="step3-wrap min-flex" v-if="activeStep == 3">
<div class="step3-top flex-common">
<h3>服务列表</h3>
<div class="btngroup">
<GuipButton type="normal" size="mmedium">添加查重服务</GuipButton>
<GuipButton type="normal" size="mmedium">添加写作辅助</GuipButton>
<GuipButton type="normal" size="mmedium">添加AIGC</GuipButton>
</div>
</div>
<div>
<div class="flex-common table-wrap">
<el-form>
<el-table :data="tableData1.slice((currentPage - 1) * pageSize, currentPage * pageSize)" style="width: 100%"
:key="random()">
<!-- 其他列 -->
<el-table-column prop="name" label="检测服务">
<template slot-scope="scope">
<div class="flex">
<span :class="(scope.row.type == 'a' ? 'green' : 'blue')">{{ scope.row.type == 'a' ? '查重服务' : '写作辅助'
}}</span>
<span class="">{{ scope.row.name }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="stock" label="今日供货价">
<template slot-scope="scope">
<div class="flex cell_render">
<span>¥{{ scope.row.stock }}/</span>
<img class="edit_icon" src="@/assets/register/tableEdit.svg" alt="">
</div>
</template>
</el-table-column>
<!-- 价格列 -->
<el-table-column label="售价">
<template v-slot="{ row, $index }">
<el-popover v-model="row.price_popover" placement="top" trigger="manual" :ref="`popover-${$index}`"
@show="popshow">
<!-- 弹框内容 -->
<div style="text-align: center">
<GuipInput ref="GuipInput" v-if="!row.word" width="252px" v-model="row.edit_price" label="售价"
placeholder="请输入售价" unit="元">
</GuipInput>
<div v-else class="flex">
<GuipInput ref="GuipInput" width="133px" v-model="row.edit_price" label="售价"
placeholder="请输入售价" unit="元">
</GuipInput>
<span class="shortspan">/</span>
<GuipInput ref="GuipInput" width="133px" v-model="row.edit_word"
placeholder="请输入字符" unit="字符">
</GuipInput>
</div>
<!-- <el-input v-model="row.edit_price" size="small" placeholder="请输入价格" /> -->
<div class="flex" style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row,'price')">取消</GuipButton>
<GuipButton type="primary" @click="savePrice(row,'price')" size="medium">确定</GuipButton>
</div>
</div>
<!-- 触发弹框的按钮 -->
<span slot="reference" @click="handlePriceClick(row, $index,'price')">
<div class="flex cell_render">
<span v-if="row.word" :key="random()">¥{{ row.price }}/{{ row.word }}</span>
<span v-else :key="random()">¥{{ row.price }}/</span>
<img class="edit_icon" src="@/assets/register/tableEdit.svg" alt="">
</div>
</span>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="stock" label="排序">
<template v-slot="{ row, $index }">
<el-popover v-model="row.num_popover" placement="top" trigger="manual" :ref="`popover-${$index}`"
@show="popshow">
<!-- 弹框内容 -->
<div style="text-align: center">
<GuipInput ref="GuipInput" width="252px" v-model="row.edit_num" label="排序"
placeholder="请输入数字">
</GuipInput>
<p style=" width: 252px;
margin-left: 40px;
text-align: right;color: #8A9099;letter-spacing: 0.08em;">输入0的数越小排序越前重复则新者优先0则默认排序</p>
<!-- <el-input v-model="row.edit_price" size="small" placeholder="请输入价格" /> -->
<div class="flex" style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row,'num')">取消</GuipButton>
<GuipButton type="primary" @click="savePrice(row,'num')" size="medium">确定</GuipButton>
</div>
</div>
<!-- 触发弹框的按钮 -->
<span slot="reference" @click="handlePriceClick(row, $index,'num')">
<div class="flex cell_render">
<span>{{ row.num }}</span>
<img class="edit_icon" src="@/assets/register/tableEdit.svg" alt="">
</div>
</span>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="stock" label="上首页">
<template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.homeFlag" @change="onSwitchChange(scope.row)">
</GuipSwitch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="112">
<template slot-scope="scope">
<div class="flex">
<el-button type="text">编辑</el-button>
<el-button @click="handleClick(scope.row)" type="text">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="tableData1.length">
</el-pagination>
</el-form>
</div>
</div>
</div>
<!-- 设置域名弹出框 -->
<!-- <GuipDialog :dialogVisible="dialogVisible" title="温馨提示" :show-close-button="false"
:show-cancel-button="showCancelButton" @confirm="handleConfirm" @cancel="handleCancel" @close="handleClose"
@dialogVisibleChange="dialogVisibleChange">
<div>
<p>这是一个自定义内容的弹框</p>
</div>
</GuipDialog> -->
<Footer></Footer>
<div class="register-btns">
<GuipButton type="mild">跳过</GuipButton>
<GuipButton type="primary">完成</GuipButton>
</div>
</div>
</template>
<script>
import Footer from '@/components/Footer.vue';
import GuipButton from '@/components/GuipButton.vue';
import GuipFormItem from '@/components/GuipFormItem.vue';
import GuipInput from '@/components/GuipInput.vue';
import GuipRadio from '@/components/GuipRadio.vue';
import GuipSelect from '@/components/GuipSelect.vue';
import GuipSwitch from '@/components/GuipSwitch.vue';
// import GuipDialog from '@/components/GuipDialog.vue';
// import GuipTable from '@/components/GuipTable.vue';
export default {
data() {
return {
activeStep: 0,
currentPage: 1, //
pageSize: 5, //
total: 0, //
dialogVisible: false,
activeStep: 3,//
has_store: '1',// 0
distribution_channel: '0',// 0 >0
payment_method_list:[//
],
add_chachong_list:[//
],
distribution_channel_options: [
{ label: '电商平台销售', value: '1', selectedLabel: '电商平台销售(淘宝、天猫、拼多多店铺)' },
{ label: '非电商平台销售', value: '0', selectedLabel: '非电商平台销售(浏览器搜索推广、微信售卖等)' },
],
domain_source: [
{ label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" },
{ label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" },
],
store_channel: [
{ label: '拼多多', value: '拼多多', selectedLabel: "拼多多" },
{ label: '天猫', value: '天猫', selectedLabel: "天猫" },
{ label: '淘宝', value: '淘宝', selectedLabel: "淘宝" },
],
steps: [
{ title: "步骤 1", 'desc': '', 'wait': '@/assets/register/step1_ing.svg', 'checked': '@/assets/register/step1_ing.svg', 'finish': '@/assets/register/step_success.svg' },
{ title: "步骤 2", 'desc': '', 'wait': '@/assets/register/step2_null.svg', 'checked': '@/assets/register/step2_ing.svg', 'finish': '@/assets/register/step_success.svg' },
{ title: "步骤 3", 'desc': '', 'wait': '@/assets/register/step3_null.svg', 'checked': '@/assets/register/step3_ing.svg', 'finish': '@/assets/register/step_success.svg' }
]
],
tableData1: [
{ id: 1, name: '商品A1', stock: 100, price: 50, price_popover: false, edit_price: '', type: 'a', num: '1', edit_num: '',num_popover:false, homeFlag: true },
{ id: 2, name: '商品B1', stock: 200, price: 80, word: 1000, price_popover: false, edit_price: '', editWord: '', type: 'a', num: '2', edit_num: '',num_popover:false, homeFlag: true },
{ id: 3, name: '商品C1', stock: 150, price: 120, price_popover: false, edit_price: '', type: 'b', num: '2', edit_num: '',num_popover:false, homeFlag: false },
{ id: 1, name: '商品A2', stock: 100, price: 50, price_popover: false, edit_price: '', type: 'a', num: '3', edit_num: '',num_popover:false, homeFlag: false },
{ id: 2, name: '商品B2', stock: 200, price: 80, word: 1000, price_popover: false, edit_price: '', editWord: '', type: 'a', num: '0', edit_num: '',num_popover:false, homeFlag: true },
{ id: 3, name: '商品C2', stock: 150, price: 120, price_popover: false, edit_price: '', type: 'b', num: '1', edit_num: '' },
{ id: 1, name: '商品A3', stock: 100, price: 50, price_popover: false, edit_price: '', type: 'a' },
{ id: 2, name: '商品B3', stock: 200, price: 80, word: 1000, price_popover: false, edit_price: '', editWord: '', type: 'a' },
{ id: 3, name: '商品C3', stock: 150, price: 120, price_popover: false, edit_price: '', type: 'b' },
{ id: 1, name: '商品A4', stock: 100, price: 50, price_popover: false, edit_price: '', type: 'a' },
{ id: 2, name: '商品B4', stock: 200, price: 80, word: 1000, price_popover: false, edit_price: '', editWord: '', type: 'a' },
{ id: 3, name: '商品C4', stock: 150, price: 120, price_popover: false, edit_price: '', type: 'b' },
{ id: 1, name: '商品A5', stock: 100, price: 50, price_popover: false, edit_price: '', type: 'a' },
{ id: 2, name: '商品B5', stock: 200, price: 80, word: 1000, price_popover: false, edit_price: '', editWord: '', type: 'a' },
{ id: 3, name: '商品C5', stock: 150, price: 120, price_popover: false, edit_price: '', type: 'b' },
],
typelistobj: {
a: ''
},
//
columns: [
{ prop: 'name', label: '检测服务', popover: false }, //
{ prop: 'age', label: '今日供货价', popover: true }, //
{ prop: 'address', label: '售价', popover: true }, //
{ prop: 'address1', label: '收款方式', popover: true }, //
{ prop: 'address2', label: '排序', popover: true }, //
{ prop: 'address3', label: '上首页', popover: false }, //
// { prop: 'address', label: '', popover: false }, //
],
tableData: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
price: '20',
age: 20,
//
edit_name: '王小虎', edit_address: '上海市普陀区金沙江路 1518 弄'
},],
form1: {
username: '',
distribution_channel: '',
},
form2: {
store_channel: '',
},
form3: {
zhifubao_pay: '',
weixin_pay: '',
},
options_weixin: [],
options_zhifubao: [],
};
},
components:{
components: {
GuipButton,
GuipFormItem,
GuipInput,
GuipRadio,
GuipSelect,
Footer,
GuipSwitch
// GuipDialog,
// GuipTable
},
methods: {
handleSizeChange(val) {
this.pageSize = val
},
handleCurrentChange(val) {
this.currentPage = val
},
popshow() {
var ariaEls = document.querySelectorAll('.el-popover')
ariaEls.forEach((item) => {
item.removeAttribute('aria-hidden')
})
ariaEls = document.querySelectorAll('.el-radio__original')
ariaEls.forEach((item) => {
item.removeAttribute('aria-hidden')
})
},
//
onSwitchChange(row){
console.log(row,'------flag');
row.homeFlag = !row.homeFlag;
this.$set(this.tableData1, row)
},
//
handlePriceClick(row, index,type) {
//
this.tableData.forEach((item, i) => {
if (i !== index) {
item[type+ '_popover'] = false;
}
});
//
row[type+ '_popover']= true;
row['edit_'+type] = row[type]
// row.edit_price = row.price; //
},
//
savePrice(row,type) {
if (type=='price' && row.edit_price === '') {
this.$message.warning('价格不能为空');
return;
}
if (type == 'word' &&row.word && row.editWord === '') {
this.$message.warning('字符不能为空');
return;
}
if (row.edit_word) {
row.word = row.edit_word
}
row[type] = row['edit_'+type]; //
row[type+'_popover'] = false; //
this.$message.success('保存成功');
this.$set(this.tableData1, row)
console.log('保存价格:', this.tableData1, row.price);
//
},
//
cancelEdit(row,type) {
row[type+'_popover'] = false; //
this.$message.info('已取消编辑');
},
random() {
var randomNumber = Math.random();
return randomNumber
},
// nextStep() {
// if (this.activeStep < 2) {
// this.activeStep++;
// }
// },
//
radioChange(type) {
console.log(type, '--');
this.distribution_channel = type;
},
//
radioChange_store(data) {
console.log(data, '店铺渠道选择');
// this.distribution_channel= data;
},
//
prevStep() {
if (this.activeStep > 0) {
@ -155,19 +575,28 @@ export default {
};
</script>
<style lang="scss" scoped>
.width-box{
.width-box {
width: 1220px;
}
@media (min-width: 1441px) {
.width-box{
.width-box {
width: 1220px;
}
}
@media (max-width:1200px) {
.width-box{
@media (max-width:1200px) {
.width-box {
width: 1100px;
}
}
.shortspan {
display: inline-block;
height: 38px;
margin: 0 12px;
}
.custom-icon {
@ -189,6 +618,10 @@ export default {
}
.register-wrap {
display: flex;
flex-direction: column;
height: 100%;
.custom-icon {
width: 24px;
height: 24px;
@ -219,7 +652,7 @@ export default {
/* 自动布局 */
display: flex;
flex-direction: column;
padding: 24px 110px;
padding: 24px 36px;
line-height: 32px;
font-size: 18px;
font-weight: bold;
@ -227,15 +660,58 @@ export default {
letter-spacing: 0.06em;
color: #1E2226;
text-align: left;
width: calc(84.75% - 72px);
}
.step1-top {
.form-item1 {
margin-bottom: 24px;
}
}
.step1-top2 {
margin-top: 20px;
}
//
.first_register {
letter-spacing: 0.08em;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 24px;
align-self: stretch;
background: #FAFAFA;
border-radius: 4px;
b {
display: inline-block;
width: 100%;
text-align: left;
font-weight: normal;
margin-bottom: 12px;
}
p {
font-size: 12px;
font-weight: normal;
line-height: 13px;
color: #626573;
}
}
.step3-wrap{
.step3-top{
.step3-wrap {
flex: 1;
.step3-top {
display: flex;
justify-content: space-between;
.btngroup{
.btngroup {
display: flex;
button{
button {
margin-left: 12px;
}
}
@ -243,4 +719,56 @@ export default {
}
}
.table-wrap {
span {
color: #1E2226;
}
.edit_icon{
display: none;
transition: all .3s;
margin-left: 8px;
}
.el-table__row:hover{
.edit_icon{
display: block;
transition: all .3s;
}
}
}
.green,
.blue {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
color: #0DAF49 !important;
letter-spacing: 0.08em;
/* 基本 */
width: 80px;
border-radius: 4px;
background: rgba(239, 255, 224, 0.5);
box-sizing: border-box;
border: 1px solid rgba(0, 194, 97, 0.6);
margin-right: 8px;
}
.blue {
background: #F2F7FF;
border: 1px solid #BFDAFF;
color: #006AFF !important;
}
.register-btns {
// height: 78px;
/* 自动布局 */
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
}
</style>

3
src/views/elementGroups.vue

@ -678,10 +678,11 @@ export default {
.cardfooter {
width: 100%;
// position: fixed;
bottom: 20px;
right: 30px;
text-align: right;
justify-content: center;
}
</style>
Loading…
Cancel
Save