上架功能修改

This commit is contained in:
a0049873 2022-07-19 15:06:26 +08:00
parent e770028fba
commit d1692a1f51
1 changed files with 168 additions and 82 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-18 14:43:47 * @LastEditTime: 2022-07-19 14:50:30
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -15,7 +15,7 @@
</div> </div>
<template v-if="title.isConfigure"> <template v-if="title.isConfigure">
<div class="bottom"> <div class="bottom">
<div class="items" v-if="data[title.name].length > 0"> <!-- <div class="items" v-if="data[title.name].length > 0">
<div <div
class="item" class="item"
v-for="(val, index) in data[title.name]" v-for="(val, index) in data[title.name]"
@ -42,8 +42,92 @@
<div @click="del(title.name, index)">删除</div> <div @click="del(title.name, index)">删除</div>
</div> </div>
</div> </div>
</div> -->
<div
v-for="(val, index) in data[title.name]"
:key="'key1' + val.name + index"
>
<div
style="
font-size: 0.18rem;
font-weight: 600;
display: flex;
justify-content: flex-start;
"
>
<span>{{ title.name }}-{{ index + 1 }}</span>
<a-popconfirm
:title="'是否删除该条' + title.name + '?'"
ok-text="是"
cancel-text="否"
@confirm="del(title.name, index)"
>
<div class="del">
<i class="delImg"></i>
<div>删除</div>
</div>
</a-popconfirm>
</div>
<div
class="form"
v-for="attr in props.configure.filter(
(item, index2) => item.name === title.name
)[0].list"
:key="'key2' + attr.name + index2"
>
<span>{{ attr.name }}</span>
<a-input
disabled
v-model:value="val[attr.field]"
:maxlength="24"
:placeholder="'请填写' + attr.name + ',不超过24个字符'"
v-if="attr.type == 'input'"
/>
<template v-if="attr.type == 'input2'">
<a-input
disabled
v-model:value="val[attr.field]"
:placeholder="'请填写' + attr.name"
/>
</template>
<a-textarea
disabled
v-model:value="val[attr.field]"
:showCount="true"
:maxlength="200"
:placeholder="'请填写' + attr.name"
v-else-if="attr.type == 'textArea'"
/>
<!-- <a-radio-group
v-model:value="val[attr.field]"
:options="val.options"
@change="radioChange"
v-else-if="attr.type == 'radio'"
/> -->
<div v-else-if="attr.type == 'radio'">
{{ val[attr.field] + (attr.company || '') }}
</div>
<span v-else-if="attr.type === 'image'">
<a-image :width="85" :height="60" :src="val.img" />
</span>
<!-- <upload
:key="showKey"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="val"
:list="[]"
tip="支持图片类型大小不超过100M"
v-else-if="val.type == 'image'"
></upload> -->
</div>
</div>
<!-- <div class="add" @click="add(title.name)">
添加更多{{ title.name }}
</div> -->
<div style="font-size: 0.18rem; font-weight: 600">
<span>{{ title.name }}-{{ data[title.name].length + 1 }}</span>
</div> </div>
<div class="add">添加更多{{ title.name }}</div>
<div <div
class="form" class="form"
v-for="(val, index) in props.configure.filter( v-for="(val, index) in props.configure.filter(
@ -112,7 +196,7 @@
</div> </div>
<div class="submit"> <div class="submit">
<a-button type="primary" @click="add(title.name)"> <a-button type="primary" @click="add(title.name)">
添加更多 添加更多{{ title.name }}
</a-button> </a-button>
</div> </div>
</div> </div>
@ -248,7 +332,7 @@
</a-button> </a-button>
<a-select <a-select
v-else-if="item.type == 'select' && item.name == '使用方式'" v-else-if="item.type == 'select' && item.name == '使用方式'"
style="width: 240px" style="width: 2.4rem"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请选择' + item.name" :placeholder="'请选择' + item.name"
@change="showTypeClick" @change="showTypeClick"
@ -263,7 +347,7 @@
</a-select> </a-select>
<a-select <a-select
v-else-if="item.type == 'select' && item.name !== '归属部门'" v-else-if="item.type == 'select' && item.name !== '归属部门'"
style="width: 240px" style="width: 2.4rem"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请选择' + item.name" :placeholder="'请选择' + item.name"
> >
@ -277,7 +361,7 @@
</a-select> </a-select>
<a-select <a-select
v-else-if="item.name === '归属部门'" v-else-if="item.name === '归属部门'"
style="width: 240px" style="width: 2.4rem"
v-model:value="item.note1" v-model:value="item.note1"
show-search show-search
placeholder="请输入关键字" placeholder="请输入关键字"
@ -314,7 +398,7 @@
:title="titleName" :title="titleName"
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
style="width: 960px" style="width: 9.6rem"
> >
<div> <div>
<a-transfer <a-transfer
@ -346,7 +430,6 @@
queryResourceRelByKeyId, queryResourceRelByKeyId,
filesUpload, filesUpload,
} from '@/api/personalCenter' } from '@/api/personalCenter'
import VueTemplateDemo from '@/views/personalCenter/VueTemplateDemo.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
const abilityToType = router.currentRoute.value.query.abilityToType const abilityToType = router.currentRoute.value.query.abilityToType
@ -813,22 +896,22 @@
<style></style> <style></style>
<style lang="less" scoped> <style lang="less" scoped>
.put-on-the-shelf { .put-on-the-shelf {
height: 680px; height: 6.8rem;
overflow: scroll; overflow: scroll;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 50px 100px 25px; padding: 0.5rem 1rem 0.25rem;
.Technical-text { .Technical-text {
height: 30px; height: 0.3rem;
width: 100px; width: 1rem;
border: 1px solid #bbd3ef; border: 0.01rem solid #bbd3ef;
border-radius: 6px; border-radius: 0.06rem;
background: #edf4fc; background: #edf4fc;
color: #0087ff; color: #0087ff;
font-size: 14px; font-size: 0.14rem;
text-align: center; text-align: center;
line-height: 30px; line-height: 0.3rem;
} }
.Technical-text:hover { .Technical-text:hover {
cursor: pointer; cursor: pointer;
@ -836,41 +919,41 @@
& > div { & > div {
width: 100%; width: 100%;
margin-top: 60px; margin-top: 0.6rem;
.top { .top {
color: #333333; color: #333333;
font-size: 22px; font-size: 0.22rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-bottom: 25px; margin-bottom: 0.25rem;
div:first-child, div:first-child,
div:last-child { div:last-child {
width: 245px; width: 2.45rem;
height: 1px; height: 0.01rem;
background: #f0f0f0; background: #f0f0f0;
} }
div:nth-child(2) { div:nth-child(2) {
margin: 0 30px; margin: 0 0.3rem;
} }
} }
.bottom { .bottom {
margin-top: 25px; margin-top: 0.25rem;
.items { .items {
background: #fafafa; background: #fafafa;
padding: 10px; padding: 0.1rem;
p { p {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
span:nth-of-type(1) { span:nth-of-type(1) {
width: 200px; width: 2rem;
} }
span:nth-of-type(2) { span:nth-of-type(2) {
@ -880,87 +963,69 @@
} }
p:nth-of-type(1) > span:nth-of-type(1) { p:nth-of-type(1) > span:nth-of-type(1) {
font-size: 18px; font-size: 0.18rem;
font-weight: 600; font-weight: 600;
} }
.del {
display: flex;
justify-content: flex-end;
align-items: center;
.delImg {
cursor: pointer;
display: inline-block;
width: 16px;
height: 18px;
background: url(~@/assets/home/sf_del.png) no-repeat;
margin-right: 5px;
}
div {
cursor: pointer;
}
}
} }
.add { .add {
margin-top: 10px; cursor: pointer;
font-size: 16px; margin-top: 0.1rem;
font-size: 0.16rem;
color: #007efb; color: #007efb;
} }
.form { .form {
margin-top: 20px; margin-top: 0.2rem;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
span:first-child { span:first-child {
width: 120px; width: 1.2rem;
} }
:deep(.ant-input-textarea) { :deep(.ant-input-textarea) {
width: 520px; width: 5.2rem;
} }
:deep(.ant-radio-group) { :deep(.ant-radio-group) {
width: 520px; width: 5.2rem;
} }
:deep(.ant-input-number) { :deep(.ant-input-number) {
width: 200px; width: 2rem;
} }
:deep(.ant-input) { :deep(.ant-input) {
resize: none; resize: none;
width: 520px; width: 5.2rem;
} }
.ant-btn { .ant-btn {
width: 160px; width: 1.6rem;
height: 32px; height: 0.32rem;
text-align: center; text-align: center;
background: #edf4fc; background: #edf4fc;
color: #0087ff; color: #0087ff;
border: 1px solid #bbd3ef; border: 0.01rem solid #bbd3ef;
border-radius: 6px; border-radius: 0.06rem;
} }
} }
.submit { .submit {
margin-top: 40px; margin-top: 0.4rem;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
.ant-btn { .ant-btn {
width: 80px; width: 1.8rem;
height: 28px; height: 0.3rem;
text-align: center; text-align: center;
background: #d9ebff; background: #d9ebff;
color: #0087ff; color: #0087ff;
border: 1px solid #0087ff; border: 0.01rem solid #0087ff;
border-radius: 6px; border-radius: 0.06rem;
} }
} }
} }
@ -972,24 +1037,24 @@
} }
.application-Area { .application-Area {
width: 520px; width: 5.2rem;
display: grid; display: grid;
margin-top: -5px; margin-top: -0.05rem;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
.application-Area-son { .application-Area-son {
cursor: pointer; cursor: pointer;
font-size: 14px; font-size: 0.14rem;
width: 90px; width: 0.9rem;
height: 26px; height: 0.26rem;
border-radius: 13px; border-radius: 0.13rem;
color: #333333; color: #333333;
background: #f5f5f5; background: #f5f5f5;
border: 1px #cccccc solid; border: 0.01rem #cccccc solid;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 10px; margin-top: 0.1rem;
font-weight: 500; font-weight: 500;
} }
@ -1006,27 +1071,27 @@
} }
:deep(.ant-modal) { :deep(.ant-modal) {
width: 960px; width: 9.6rem;
} }
:deep(.ant-transfer-list) { :deep(.ant-transfer-list) {
width: 39.5%; width: 39.5%;
height: 520px; height: 5.2rem;
} }
:deep(.ant-transfer-operation) { :deep(.ant-transfer-operation) {
flex-direction: row-reverse; flex-direction: row-reverse;
margin: 0 30px; margin: 0 0.3rem;
} }
:deep(.ant-btn) { :deep(.ant-btn) {
width: 56px; width: 0.56rem;
height: 40px; height: 0.4rem;
border-radius: 4px; border-radius: 0.04rem;
} }
:deep(.ant-btn:first-child) { :deep(.ant-btn:first-child) {
margin-left: 4px; margin-left: 0.04rem;
} }
:deep(.ant-modal-footer) { :deep(.ant-modal-footer) {
@ -1038,8 +1103,8 @@
} }
:deep(.ant-modal-title) { :deep(.ant-modal-title) {
line-height: 24px; line-height: 0.24rem;
font-size: 18px; font-size: 0.18rem;
color: #303133; color: #303133;
} }
@ -1056,7 +1121,7 @@
} }
:deep(.ant-transfer-list-header-title) { :deep(.ant-transfer-list-header-title) {
font-size: 16px; font-size: 0.16rem;
color: #303133; color: #303133;
font-weight: 400; font-weight: 400;
text-align: left; text-align: left;
@ -1065,6 +1130,27 @@
display: none !important; display: none !important;
} }
:deep(.ant-upload-list-item-name) { :deep(.ant-upload-list-item-name) {
width: 100px; width: 1rem;
}
.del {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 0.14rem;
margin-left: 0.2rem;
.delImg {
cursor: pointer;
display: inline-block;
width: 0.16rem;
height: 0.18rem;
background: url(~@/assets/home/sf_del.png) no-repeat;
margin-right: 0.05rem;
}
div {
cursor: pointer;
}
} }
</style> </style>