特殊字段添加编辑功能 上架左侧添加进度条

This commit is contained in:
a0049873 2022-12-21 09:06:36 +08:00
parent bf9898abff
commit 84b0f2eba8
8 changed files with 1184 additions and 1078 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

View File

@ -230,7 +230,7 @@
:close-on-press-escape="false" :close-on-press-escape="false"
:destroy-on-close="true" :destroy-on-close="true"
:before-close="clear" :before-close="clear"
width="50%" width="60%"
> >
<putOnTheShelf <putOnTheShelf
ref="putOnTheShelf" ref="putOnTheShelf"
@ -271,6 +271,7 @@ export default {
radio: '', radio: '',
showPutOnTheShelfFlag: false, showPutOnTheShelfFlag: false,
showPutOnTheShelfFlag2: false, showPutOnTheShelfFlag2: false,
routePath: '',
submitFrom: { submitFrom: {
type: '组件服务', type: '组件服务',
deptId: '', deptId: '',
@ -629,6 +630,7 @@ export default {
}, },
// //
clear () { clear () {
this.$router.push(this.routePath)
console.log('清空----------------------------------------') console.log('清空----------------------------------------')
this.notFilled = [] this.notFilled = []
this.showPutOnTheShelfFlag = false this.showPutOnTheShelfFlag = false
@ -659,6 +661,7 @@ export default {
}) })
}, },
showPutOnTheShelfVue () { showPutOnTheShelfVue () {
this.routePath = this.$route.path
this.showPutOnTheShelfFlag = false this.showPutOnTheShelfFlag = false
this.showPutOnTheShelfFlag2 = true this.showPutOnTheShelfFlag2 = true
this.submitFrom.infoList[0].attrValue = this.radio this.submitFrom.infoList[0].attrValue = this.radio

View File

@ -217,7 +217,7 @@
:close-on-press-escape='false' :close-on-press-escape='false'
:destroy-on-close='true' :destroy-on-close='true'
:before-close='clear' :before-close='clear'
width="50%"> width="60%">
<putOnTheShelf :required="required" :notFilled="notFilled" :putOnTheShelfList='putOnTheShelfList' @changeInfoList='changeInfoList' :type='radio' :typeInput='typeInput'></putOnTheShelf> <putOnTheShelf :required="required" :notFilled="notFilled" :putOnTheShelfList='putOnTheShelfList' @changeInfoList='changeInfoList' :type='radio' :typeInput='typeInput'></putOnTheShelf>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="clear"> </el-button> <el-button @click="clear"> </el-button>
@ -271,6 +271,7 @@ export default {
insertList: [], insertList: [],
putOnTheShelfList: [], putOnTheShelfList: [],
showPutOnTheShelfFlag2: false, showPutOnTheShelfFlag2: false,
routePath: '',
submitFrom: { submitFrom: {
type: '应用资源', type: '应用资源',
deptId: '', deptId: '',
@ -594,6 +595,7 @@ export default {
}, },
// //
clear () { clear () {
this.$router.push(this.routePath)
this.notFilled = [] this.notFilled = []
this.showPutOnTheShelfFlag2 = false this.showPutOnTheShelfFlag2 = false
this.insertList = [] this.insertList = []
@ -615,6 +617,7 @@ export default {
}, },
// //
showPutOnTheShelf () { showPutOnTheShelf () {
this.routePath = this.$route.path
this.showPutOnTheShelfFlag2 = true this.showPutOnTheShelfFlag2 = true
this.$http.get('/category/getCategoryTree').then(res => { this.$http.get('/category/getCategoryTree').then(res => {
this.insertList = res.data.data.filter(item => item.name === '应用资源')[0] this.insertList = res.data.data.filter(item => item.name === '应用资源')[0]

View File

@ -86,7 +86,6 @@ js:
<el-date-picker v-model="data.note1" type="date" :placeholder="'选择' + name" value-format="yyyy-MM-dd"> <el-date-picker v-model="data.note1" type="date" :placeholder="'选择' + name" value-format="yyyy-MM-dd">
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:54:50 * @Date: 2022-07-08 09:54:50
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-07-28 20:09:53 * @LastEditTime: 2022-12-20 10:42:37
* @Description: 多条数据特殊处理 * @Description: 多条数据特殊处理
--> -->
<template> <template>
@ -28,7 +28,9 @@
<span v-else>{{ val[attr.field] + (attr.company || '') }}</span> <span v-else>{{ val[attr.field] + (attr.company || '') }}</span>
</p> </p>
<div class="del"> <div class="del">
<i class="delImg" @click="del( index)"></i> <i class="updateImg" @click="update(configure.name, index)"></i>
<div @click="update(configure.name, index)" style="margin-right:10px;">修改</div>
<i class="delImg" @click="del(configure.name, index)"></i>
<div @click="del(configure.name, index)">删除</div> <div @click="del(configure.name, index)">删除</div>
</div> </div>
</div> </div>
@ -171,6 +173,19 @@ export default {
delFlag: 0 delFlag: 0
}) })
}, },
update (title, index) {
const obj = this.data[index]
this.data.splice(index, 1)
const str = this.data.length > 0 ? JSON.stringify(this.data) : ''
this.$emit('changeInfoList', {
attrType: title,
attrValue: str,
delFlag: 0
})
this.configure.list.map(val => {
val.note1 = obj[val.field]
})
},
radioChange (e) { radioChange (e) {
console.log(e, 'wewewe') console.log(e, 'wewewe')
this.numType = e.target.value this.numType = e.target.value
@ -242,12 +257,21 @@ export default {
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
.updateImg {
cursor: pointer;
display: inline-block;
width: 16px;
height: 18px;
background: url("~@/assets/img/putOnTheShelf/update.png") no-repeat;
margin-right: 5px;
margin-bottom: 1px;
}
.delImg { .delImg {
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 18px; height: 18px;
background: url(~@/assets/img/putOnTheShelf/del.png) no-repeat; background: url("~@/assets/img/putOnTheShelf/del.png") no-repeat;
margin-right: 5px; margin-right: 5px;
} }

View File

@ -1,13 +1,19 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:48:52 * @Date: 2022-07-08 09:48:52
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-07-25 15:57:25 * @LastEditTime: 2022-12-20 09:50:01
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
<div class="put-on-the-shelf"> <div class="put-on-the-shelf">
<div v-for="parent in putOnTheShelfList" :key='parent.id'> <div class="left">
<a-anchor>
<a-anchor-link v-for="parent in putOnTheShelfList" :key="parent.id+'left'" :href="'#'+parent.name" :title="parent.name" />
</a-anchor>
</div>
<div class="right">
<div v-for="parent in putOnTheShelfList" :key='parent.id' :id="parent.name">
<div v-for='child in parent.children' :key='child.id'> <div v-for='child in parent.children' :key='child.id'>
<template v-if='judgmentType.filter(item => item.name==child.name).length === 0'> <template v-if='judgmentType.filter(item => item.name==child.name).length === 0'>
<div class="top">{{child.name}}</div> <div class="top">{{child.name}}</div>
@ -59,6 +65,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import inputSelectCheckbox from './components/inputSelectCheckbox' import inputSelectCheckbox from './components/inputSelectCheckbox'
@ -241,13 +248,23 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.put-on-the-shelf { .put-on-the-shelf {
height: 500px; // height: 500px;
display: flex;
padding: 0 50px; padding: 0 50px;
.left {
margin-right: 50px;
}
.right {
height: 500px;
overflow-y: scroll; overflow-y: scroll;
} }
.put-on-the-shelf::-webkit-scrollbar { .right::-webkit-scrollbar {
width: 0; width: 0;
} }
}
// .put-on-the-shelf::-webkit-scrollbar {
// width: 0;
// }
.top { .top {
color: #333333; color: #333333;

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

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: Light * @LastEditors: Light
* @LastEditTime: 2022-10-26 14:57:25 * @LastEditTime: 2022-12-20 11:39:05
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -50,17 +50,31 @@
" "
> >
<!-- <span>{{ title.name }}-{{ index + 1 }}</span> --> <!-- <span>{{ title.name }}-{{ index + 1 }}</span> -->
<div class="del">
<i class="updateImg" @click="update(title.name, index)"></i>
<div
@click="update(title.name, index)"
style="margin-right: 10px"
>
修改
</div>
<a-popconfirm <a-popconfirm
:title="'是否删除该条' + title.name + '?'" :title="'是否删除该条' + title.name + '?'"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@confirm="del(title.name, index)" @confirm="del(title.name, index)"
> >
<div class="del">
<i class="delImg"></i> <i class="delImg"></i>
<div>删除</div>
</div>
</a-popconfirm> </a-popconfirm>
<a-popconfirm
:title="'是否删除该条' + title.name + '?'"
ok-text="是"
cancel-text="否"
@confirm="del(title.name, index)"
>
<div>删除</div>
</a-popconfirm>
</div>
</div> </div>
<div <div
class="form" class="form"
@ -69,7 +83,6 @@
)[0].list" )[0].list"
:key="'key2' + attr.name + index2" :key="'key2' + attr.name + index2"
> >
<span>{{ attr.name }}:</span> <span>{{ attr.name }}:</span>
<a-input <a-input
style="width: 280px" style="width: 280px"
@ -95,7 +108,6 @@
v-model:value="val[attr.field]" v-model:value="val[attr.field]"
:maxlength="1000" :maxlength="1000"
:placeholder="'请填写' + attr.name + ',不超过1000个字符'" :placeholder="'请填写' + attr.name + ',不超过1000个字符'"
/> />
</template> </template>
<!-- <a-textarea <!-- <a-textarea
@ -113,7 +125,15 @@
<a-image :width="85" :height="60" :src="val.img" /> <a-image :width="85" :height="60" :src="val.img" />
</span> </span>
</div> </div>
<div style="margin-top:24px;height:1px;border-top: 1px dashed #dddee1; width: 1240px;font-size: 18px;"></div> <div
style="
margin-top: 24px;
height: 1px;
border-top: 1px dashed #dddee1;
width: 1240px;
font-size: 18px;
"
></div>
</div> </div>
<!-- <div style="font-size: 0.18rem; font-weight: 600border-top: 1px dashed grey; width: 1240px;font-size: 18px;"> <!-- <div style="font-size: 0.18rem; font-weight: 600border-top: 1px dashed grey; width: 1240px;font-size: 18px;">
@ -162,7 +182,6 @@
v-model:value="val.note1" v-model:value="val.note1"
:maxlength="1000" :maxlength="1000"
:placeholder="'请填写' + val.name + ',不超过1000个字符'" :placeholder="'请填写' + val.name + ',不超过1000个字符'"
/> />
</template> </template>
<!-- <a-textarea <!-- <a-textarea
@ -217,11 +236,19 @@
v-else-if="val.type == 'image'" v-else-if="val.type == 'image'"
></upload> ></upload>
</div> </div>
<div style="margin-top:24px;height:1px;border-top: 1px dashed #dddee1; width: 1240px;font-size: 18px;"></div> <div
style="
margin-top: 24px;
height: 1px;
border-top: 1px dashed #dddee1;
width: 1240px;
font-size: 18px;
"
></div>
<div class="submit"> <div class="submit">
<a-button type="primary" @click="add(title.name)"> <a-button type="primary" @click="add(title.name)">
<img <img
style="height: 12px; width: 12px;margin-top: -2px;" style="height: 12px; width: 12px; margin-top: -2px"
src="../../../assets/home/zhengjia.png" src="../../../assets/home/zhengjia.png"
alt="" alt=""
/> />
@ -261,14 +288,20 @@
<a-input <a-input
:maxLength="1000" :maxLength="1000"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请输入' + placeHolderWords(item.name)+',单位为元'" :placeholder="
'请输入' + placeHolderWords(item.name) + ',单位为元'
"
@change="changeIiem(item.name, item.note1)" @change="changeIiem(item.name, item.note1)"
/> />
<span style="color:red"> (单位为元*仅用于测算为部门节省资金)</span> <span style="color: red">
(单位为元*仅用于测算为部门节省资金)
</span>
</div> </div>
<a-input <a-input
:maxLength="1000" :maxLength="1000"
v-else-if="item.type == 'input' && item.name.indexOf('名称') == -1" v-else-if="
item.type == 'input' && item.name.indexOf('名称') == -1
"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请输入' + placeHolderWords(item.name)" :placeholder="'请输入' + placeHolderWords(item.name)"
@change="changeIiem(item.name, item.note1)" @change="changeIiem(item.name, item.note1)"
@ -416,7 +449,6 @@
</div> </div>
</div> </div>
<upload <upload
v-else-if="item.type == 'video'" v-else-if="item.type == 'video'"
type="视频" type="视频"
@ -970,6 +1002,20 @@ const del = (title, index) => {
delFlag: 0, delFlag: 0,
}) })
} }
const update = (title, index) => {
const obj = data.value[title][index]
data.value[title].splice(index, 1)
mybus.emit('chageDataFrom', {
attrType: title,
attrValue: JSON.stringify(data.value[title]),
delFlag: 0,
})
props.configure
.filter((item) => item.name === title)[0]
.list.map((val) => {
val.note1 = obj[val.field]
})
}
const ApplicationArea = (item, itemson) => { const ApplicationArea = (item, itemson) => {
if (item.note2.indexOf(itemson.dictLabel) === -1) { if (item.note2.indexOf(itemson.dictLabel) === -1) {
item.note2.push(itemson.dictLabel) item.note2.push(itemson.dictLabel)
@ -977,7 +1023,10 @@ const ApplicationArea = (item, itemson) => {
item.note2.splice(item.note2.indexOf(itemson.dictLabel), 1) item.note2.splice(item.note2.indexOf(itemson.dictLabel), 1)
} }
// //
if (item.note2.length !== 0 && changeField.value.indexOf('应用领域') == -1) { if (
item.note2.length !== 0 &&
changeField.value.indexOf('应用领域') == -1
) {
changeField.value.push('应用领域') changeField.value.push('应用领域')
} else if (item.note2.length == 0) { } else if (item.note2.length == 0) {
if (changeField.value.indexOf('应用领域') > -1) { if (changeField.value.indexOf('应用领域') > -1) {
@ -1347,7 +1396,7 @@ const applicationsOption = (input, option) => {
align-items: center; align-items: center;
span:first-child { span:first-child {
width: 1.0rem; width: 1rem;
} }
:deep(.ant-input-textarea) { :deep(.ant-input-textarea) {
@ -1402,7 +1451,7 @@ const applicationsOption = (input, option) => {
.ant-btn:active { .ant-btn:active {
background: #fff; background: #fff;
color: #0558e1; color: #0558e1;
opacity: 0.8 opacity: 0.8;
} }
} }
} }
@ -1569,7 +1618,15 @@ const applicationsOption = (input, option) => {
align-items: center; align-items: center;
font-size: 0.14rem; font-size: 0.14rem;
margin-left: 0.2rem; margin-left: 0.2rem;
.updateImg {
cursor: pointer;
display: inline-block;
width: 16px;
height: 18px;
background: url('~@/assets/home/update.png') no-repeat;
margin-right: 5px;
margin-bottom: 1px;
}
.delImg { .delImg {
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
@ -1578,6 +1635,9 @@ const applicationsOption = (input, option) => {
background: url(~@/assets/home/sf_del.png) no-repeat; background: url(~@/assets/home/sf_del.png) no-repeat;
margin-right: 0.05rem; margin-right: 0.05rem;
} }
& > span {
display: flex;
}
div { div {
cursor: pointer; cursor: pointer;