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

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,8 +217,8 @@
: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>
<el-button type="primary" @click="submitData"> </el-button> <el-button type="primary" @click="submitData"> </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

@ -81,12 +81,11 @@ js:
<!-- <el-radio-group v-model:value="data.note1" v-else-if="type == 'radio'"> <!-- <el-radio-group v-model:value="data.note1" v-else-if="type == 'radio'">
<el-radio v-for="item in options" :label="item.dictLabel" :key="item.dictLabel">{{item.dictLabel}}</el-radio> <el-radio v-for="item in options" :label="item.dictLabel" :key="item.dictLabel">{{item.dictLabel}}</el-radio>
</el-radio-group> --> </el-radio-group> -->
<a-textarea v-else-if="type == 'textArea'" @change="changeIiem(name,data.note1)" v-model:value="data.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + name" /> <a-textarea v-else-if="type == 'textArea'" @change="changeIiem(name,data.note1)" v-model:value="data.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + name" />
<div class="block" v-else-if="type == 'date'"> <div class="block" v-else-if="type == 'date'">
<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>
@ -179,7 +178,7 @@ export default {
}) })
} }
// }) // })
} }
}, },
chekBoxChange (list) { chekBoxChange (list) {
let str = '' let str = ''

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,61 +1,68 @@
<!-- <!--
* @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">
<div v-for='child in parent.children' :key='child.id'> <a-anchor>
<template v-if='judgmentType.filter(item => item.name==child.name).length === 0'> <a-anchor-link v-for="parent in putOnTheShelfList" :key="parent.id+'left'" :href="'#'+parent.name" :title="parent.name" />
<div class="top">{{child.name}}</div> </a-anchor>
<div v-for="item in child.children" :key="item.id" class='item' v-show="(item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档') && !( </div>
(showTypeName == '调用接口' && item.name == '平台地址') || <div class="right">
(showTypeName == '调用接口' && item.name == 'SDK安装包') || <div v-for="parent in putOnTheShelfList" :key='parent.id' :id="parent.name">
(showTypeName == '平台对接' && item.name == 'SDK安装包') || <div v-for='child in parent.children' :key='child.id'>
(showTypeName == '平台对接' && item.name == '接口请求方式') || <template v-if='judgmentType.filter(item => item.name==child.name).length === 0'>
(showTypeName == '平台对接' && item.name == '服务接口') || <div class="top">{{child.name}}</div>
(showTypeName == 'SDK' && item.name == '平台地址') || <div v-for="item in child.children" :key="item.id" class='item' v-show="(item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档') && !(
(showTypeName == 'SDK' && item.name == '接口请求方式') || (showTypeName == '调用接口' && item.name == '平台地址') ||
(showTypeName == 'SDK' && item.name == '服务接口') (showTypeName == '调用接口' && item.name == 'SDK安装包') ||
)"> (showTypeName == '平台对接' && item.name == 'SDK安装包') ||
<div class="box"> (showTypeName == '平台对接' && item.name == '接口请求方式') ||
<div> (showTypeName == '平台对接' && item.name == '服务接口') ||
<span class="required" v-if="required.indexOf(item.name) > -1">*</span> (showTypeName == 'SDK' && item.name == '平台地址') ||
{{ item.name }} (showTypeName == 'SDK' && item.name == '接口请求方式') ||
(showTypeName == 'SDK' && item.name == '服务接口')
)">
<div class="box">
<div>
<span class="required" v-if="required.indexOf(item.name) > -1">*</span>
{{ item.name }}
</div>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> -->
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.jpg,.jpeg,.png' :list="item" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1"
:dataList="item" tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="item" v-else-if="item.type == 'file' && item.name !== '使用手册'" type="文件" btnName="上传附件" :maxCount="1"
:dataList="item" tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="item" v-else-if="item.name == '使用手册'" type="文件" btnName="上传附件" :maxCount="1" :dataList="item" :busType="2"
tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.mp4' :list="item" v-else-if="item.type == 'video'" type="视频" btnName="上传视频" :maxCount="1" :dataList="item"
tip="支持视频类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.zip' :list="item" v-else-if="item.type == 'package' &&item.name != '上传附件'" type="安装包" btnName="上传安装包" :maxCount="1" :dataList="item"
tip="支持.zip类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx,.zip' :list="item" v-else-if="item.name == '上传附件'" type="附件" btnName="上传附件" :maxCount="1" :dataList="item"
tip="支持.doc,.docx,.zip,.ppt,.pdf类型大小不超过100M"></upload>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'AbilityType'" type="disabled" :data="item" :name="item.name" :value="typeInput"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'ComponentType'" type="disabled" :data="item" :name="item.name" :value="type"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'input'" type="input" :data="item" :name="item.name"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options" @show-type="showType"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'checkBox'" type="checkBox" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'radio'" type="radio" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'textArea'" type="textArea" :data="item" :name="item.name"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'date'" type="date" :data="item" :name="item.name"></input-select-checkbox>
</div> </div>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item" <div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='input' || item.type=='textArea') && changeField.indexOf(item.name) == -1">请填写{{item.name}}</div>
tip="支持图片类型大小不超过100M"></upload> --> <div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='select' || item.type=='checkBox' || item.type=='radio') && changeField.indexOf(item.name) == -1">请选择{{item.name}}</div>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.jpg,.jpeg,.png' :list="item" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" </div>
:dataList="item" tip="支持文件类型大小不超过100M"></upload> </template>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="item" v-else-if="item.type == 'file' && item.name !== '使用手册'" type="文件" btnName="上传附件" :maxCount="1" <template v-else>
:dataList="item" tip="支持文件类型大小不超过100M"></upload> <special @submitData="submitData" ref="specialRef" :configure='judgmentType.filter(item => item.name==child.name)[0]' :showData='child' @changeInfoList='changeInfoList'></special>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="item" v-else-if="item.name == '使用手册'" type="文件" btnName="上传附件" :maxCount="1" :dataList="item" :busType="2" </template>
tip="支持文件类型大小不超过100M"></upload> </div>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.mp4' :list="item" v-else-if="item.type == 'video'" type="视频" btnName="上传视频" :maxCount="1" :dataList="item"
tip="支持视频类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.zip' :list="item" v-else-if="item.type == 'package' &&item.name != '上传附件'" type="安装包" btnName="上传安装包" :maxCount="1" :dataList="item"
tip="支持.zip类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx,.zip' :list="item" v-else-if="item.name == '上传附件'" type="附件" btnName="上传附件" :maxCount="1" :dataList="item"
tip="支持.doc,.docx,.zip,.ppt,.pdf类型大小不超过100M"></upload>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'AbilityType'" type="disabled" :data="item" :name="item.name" :value="typeInput"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'ComponentType'" type="disabled" :data="item" :name="item.name" :value="type"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'input'" type="input" :data="item" :name="item.name"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options" @show-type="showType"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'checkBox'" type="checkBox" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'radio'" type="radio" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'textArea'" type="textArea" :data="item" :name="item.name"></input-select-checkbox>
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'date'" type="date" :data="item" :name="item.name"></input-select-checkbox>
</div>
<div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='input' || item.type=='textArea') && changeField.indexOf(item.name) == -1">请填写{{item.name}}</div>
<div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='select' || item.type=='checkBox' || item.type=='radio') && changeField.indexOf(item.name) == -1">请选择{{item.name}}</div>
</div>
</template>
<template v-else>
<special @submitData="submitData" ref="specialRef" :configure='judgmentType.filter(item => item.name==child.name)[0]' :showData='child' @changeInfoList='changeInfoList'></special>
</template>
</div> </div>
</div> </div>
</div> </div>
@ -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;
overflow-y: scroll; .left {
} margin-right: 50px;
.put-on-the-shelf::-webkit-scrollbar { }
width: 0; .right {
height: 500px;
overflow-y: scroll;
}
.right::-webkit-scrollbar {
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

File diff suppressed because it is too large Load Diff