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

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

@ -72,11 +72,12 @@ export default {
},
mounted() {
console.log(this.fileUrl, 'fileUrl===');//'http://localhost:9001/epmet-work-pc/test1.xlsx'
const newUrl = this.fileUrl.replace(
/^https:\/\/elink-esua-epdc\.oss-cn-qingdao\.aliyuncs\.com/,
`${location.origin}`
);
this.urlToFile(newUrl,this.fileName)
// const newUrl = this.fileUrl.replace(
// /^https:\/\/elink-esua-epdc\.oss-cn-qingdao\.aliyuncs\.com/,
// `${location.origin}`
// );
// this.urlToFile(newUrl,this.fileName)
this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx',this.fileName)
},
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="steps1">
<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>
<el-step title="上传表格文件" :class="[this.progress == 2 || this.progress == 3 ? '' : 'showNum']"></el-step>
<el-step title="配置表格文字"></el-step>
<el-step title="智能填表设置" :class="[this.progress == 2 || this.progress == 3 ? '' : 'showNum']"></el-step>
<el-step title="数据填充范围"></el-step>
</el-steps>
</div>
<div v-show="progress == 1">
<el-form :model="formData" ref="ref_searchform" :label-width="'120px'">
<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 v-show="progress == 1" style="width: 80%; margin-top: 10px; font-size: 16px;">
<div class="flex" style="margin: 60px 0;">
<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">
<img style="width: 30px; height: 30px;" :src="item.image" alt="">
<span style="margin-top: 10px;">{{ item.name }}</span>
@ -32,7 +22,7 @@
</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-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">
@ -66,7 +56,7 @@
</el-table-column>
</el-table>
</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'">
<resi-search ref="resi_form"></resi-search>
</div>
@ -74,10 +64,13 @@
<HoseSearch ref="house_form"/>
</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 type="primary" @click="onClickNext()" >下一步</el-button>
</span>
</div>
</div>
</template>
<script>

Loading…
Cancel
Save