Browse Source

选择数据源的样式,以及回显

luckysheet-xiaowang-Intelligen
是小王呀\24601 9 months ago
parent
commit
d18d3899e5
  1. 92
      src/views/modules/base/smartExcel/cpts/acceptingPersonel.vue
  2. 11
      src/views/modules/base/smartExcel/cpts/excel-template-confirmation.vue
  3. 31
      src/views/modules/base/smartExcel/cpts/excel-upload-data.vue

92
src/views/modules/base/smartExcel/cpts/acceptingPersonel.vue

@ -21,7 +21,7 @@
<div> <div>
<el-tag v-for="tag in selfTag" :key="tag.staffId" closable @close="removeTag(tag)" <el-tag v-for="tag in selfTag" :key="tag.staffId" closable @close="removeTag(tag)"
style="margin-right: 10px;"> style="margin-right: 10px;">
<span> {{ tag.name }}</span> <span> {{ tag.userName?tag.userName:tag.name }}</span>
</el-tag> </el-tag>
</div> </div>
@ -97,50 +97,51 @@ export default {
created() { }, created() { },
methods: { methods: {
handleConfirm() { handleConfirm() {
let userIdList = this.selfTag.map(item => { console.log(this.selfTag),"dsfkljdslk";
return item.staffId // let userIdList = this.selfTag.map(item => {
}) // return item.staffId
if (this.showType == "adjust") { // })
let parms = { // if (this.showType == "adjust") {
userIdList: userIdList, // let parms = {
taskId: this.taskId, // userIdList: userIdList,
} // taskId: this.taskId,
this.updateState() // }
requestPost('/actual/base/communityOneTablePeriodPublish/changeAssignWorker', parms).then(res => { // this.updateState()
if (res.code === 0) { // requestPost('/actual/base/communityOneTablePeriodPublish/changeAssignWorker', parms).then(res => {
this.$message.success('转派成功') // if (res.code === 0) {
return this.$emit('handelPersonel') // this.$message.success('')
} else { // return this.$emit('handelPersonel')
this.$message.error(res.internalMsg) // } else {
} // this.$message.error(res.internalMsg)
}); // }
} else if (this.showType == "adjust1") { // });
let parms = { // } else if (this.showType == "adjust1") {
userId: userIdList.toString(), // let parms = {
id: this.taskId, // userId: userIdList.toString(),
reassignedReason: "" // id: this.taskId,
} // reassignedReason: ""
this.updateState() // }
requestPost('/actual/base/communityOneTablePeriodPublish/reAssignWorker', parms).then(res => { // this.updateState()
if (res.code === 0) { // requestPost('/actual/base/communityOneTablePeriodPublish/reAssignWorker', parms).then(res => {
this.$message.success('转派成功') // if (res.code === 0) {
return this.$emit('handelPersonel') // this.$message.success('')
} else { // return this.$emit('handelPersonel')
this.$message.error(res.internalMsg) // } else {
} // this.$message.error(res.internalMsg)
}); // }
} // });
else { // }
let parms = { // else {
userIdList: userIdList, // let parms = {
id: this.taskId, // userIdList: userIdList,
taskIntroduction: this.formData.taskIntroduction // id: this.taskId,
// taskIntroduction: this.formData.taskIntroduction
} // }
requestPost('/actual/base/communityOneTablePublish/update', parms).then(res => { // requestPost('/actual/base/communityOneTablePublish/update', parms).then(res => {
return this.$emit('handelPersonel') // return this.$emit('handelPersonel')
}); // });
} // }
}, },
async updateState() { async updateState() {
@ -165,7 +166,7 @@ export default {
taskNum: 0 taskNum: 0
} }
requestGet('/actual/base/communityOneTablePeriodPublish/page', parms).then(res => { requestGet('/actual/base/communityOneTablePeriodPublish/page', parms).then(res => {
this.tableData = res.data.list this.selfTag = res.data.list
}); });
}, },
getLastItem(list, vals, key) { getLastItem(list, vals, key) {
@ -232,7 +233,6 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
handleCancel() { handleCancel() {
this.$emit('handelPersonel') this.$emit('handelPersonel')
}, },

11
src/views/modules/base/smartExcel/cpts/excel-template-confirmation.vue

@ -72,11 +72,12 @@ export default {
}, },
mounted() { mounted() {
console.log(this.fileUrl, 'fileUrl===');//'http://localhost:9001/epmet-work-pc/test1.xlsx' console.log(this.fileUrl, 'fileUrl===');//'http://localhost:9001/epmet-work-pc/test1.xlsx'
const newUrl = this.fileUrl.replace( // const newUrl = this.fileUrl.replace(
/^https:\/\/elink-esua-epdc\.oss-cn-qingdao\.aliyuncs\.com/, // /^https:\/\/elink-esua-epdc\.oss-cn-qingdao\.aliyuncs\.com/,
`${location.origin}` // `${location.origin}`
); // );
this.urlToFile(newUrl,this.fileName) // this.urlToFile(newUrl,this.fileName)
this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx',this.fileName)
}, },
props: { props: {

31
src/views/modules/base/smartExcel/cpts/excel-upload-data.vue

@ -2,26 +2,16 @@
<div class="m-detail-main" v-loading="dataListLoading"> <div class="m-detail-main" v-loading="dataListLoading">
<div class="steps1"> <div class="steps1">
<el-steps :active="progress"> <el-steps :active="progress">
<el-step :class="[this.operatorName == null ? 'showNum' : '']" title="填写基本信息" <el-step :class="[this.operatorName == null ? 'showNum' : '']" title="选择数据源"
:description="`${this.operatorName}(${this.createdTime})`"></el-step> :description="`${this.operatorName}(${this.createdTime})`"></el-step>
<el-step title="上传表格文件" :class="[this.progress == 2 || this.progress == 3 ? '' : 'showNum']"></el-step> <el-step title="智能填表设置" :class="[this.progress == 2 || this.progress == 3 ? '' : 'showNum']"></el-step>
<el-step title="配置表格文字"></el-step> <el-step title="数据填充范围"></el-step>
</el-steps> </el-steps>
</div> </div>
<div v-show="progress == 1"> <div v-show="progress == 1" style="width: 80%; margin-top: 10px; font-size: 16px;">
<el-form :model="formData" ref="ref_searchform" :label-width="'120px'"> <div class="flex" style="margin: 60px 0;">
<el-form-item label="标题名称" prop="taskTitle">
<el-input v-model.trim="formData.taskTitle" type="textarea" size="small" clearable style=" height: 40px;"
placeholder="请输入">
</el-input>
<div style="margin-top: 10px;">5-30个字符</div>
</el-form-item>
<el-form-item label="请选择数据源" prop="taskTitle">
</el-form-item>
</el-form>
<div class="flex">
<div @click="onClickTab(item)" class="flex" <div @click="onClickTab(item)" class="flex"
style=" cursor: pointer; position: relative;display: flex; flex-direction: column; align-items: center; justify-content: center; width: 155px;height: 90px;background: #F1F4FA;border-radius: 4px; margin-left: 20px;" style=" cursor: pointer; position: relative;display: flex; flex-direction: column; align-items: center; justify-content: center; width: 155px;height: 90px;background: #F1F4FA;border-radius: 4px; margin-left: 60px;"
v-for="(item, index) in dataSourceList"> v-for="(item, index) in dataSourceList">
<img style="width: 30px; height: 30px;" :src="item.image" alt=""> <img style="width: 30px; height: 30px;" :src="item.image" alt="">
<span style="margin-top: 10px;">{{ item.name }}</span> <span style="margin-top: 10px;">{{ item.name }}</span>
@ -32,7 +22,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="dataList.length > 0 && progress == 2" style="height: 600px; overflow-y: scroll"> <div v-show="dataList.length > 0 && progress == 2" style="height: 600px; overflow-y: scroll;margin: 60px 0;">
<el-table ref="ref_table" :data="dataList" border class="m-table-item" style="width: 100%"> <el-table ref="ref_table" :data="dataList" border class="m-table-item" style="width: 100%">
<el-table-column label="序号" header-align="center" align="center" type="index" width="100"></el-table-column> <el-table-column label="序号" header-align="center" align="center" type="index" width="100"></el-table-column>
<el-table-column prop="userTableHeader" header-align="center" align="center" label="上传表格列" min-width="60"> <el-table-column prop="userTableHeader" header-align="center" align="center" label="上传表格列" min-width="60">
@ -66,7 +56,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div v-show="progress == 3"> <div v-show="progress == 3" style="height: 600px; overflow-y: scroll;margin: 60px 0;">
<div v-if="formData1.importCategory === 'BASEINFO'"> <div v-if="formData1.importCategory === 'BASEINFO'">
<resi-search ref="resi_form"></resi-search> <resi-search ref="resi_form"></resi-search>
</div> </div>
@ -74,10 +64,13 @@
<HoseSearch ref="house_form"/> <HoseSearch ref="house_form"/>
</div> </div>
</div> </div>
<span slot="footer" style="margin-top: 100px;"> <div>
<span slot="footer" style="margin-top: 30px; display: flex; justify-content: flex-end;">
<el-button v-if="progress != 1" @click="progress = progress - 1">上一步</el-button> <el-button v-if="progress != 1" @click="progress = progress - 1">上一步</el-button>
<el-button type="primary" @click="onClickNext()" >下一步</el-button> <el-button type="primary" @click="onClickNext()" >下一步</el-button>
</span> </span>
</div>
</div> </div>
</template> </template>
<script> <script>

Loading…
Cancel
Save