Commit 3e995e0d authored by 罗超's avatar 罗超

1

parent fd2cea4a
......@@ -14,10 +14,9 @@
"@types/lockr": "^0.8.7",
"@types/lodash": "^4.14.175",
"@types/webpack-env": "^1.16.2",
"ant-design-vue": "^2.2.8",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"element-plus": "^1.2.0-beta.3",
"dayjs": "^1.10.7",
"katex": "^0.13.18",
"lockr": "^0.9.0-beta.0",
"lodash": "^4.17.21",
......
......@@ -29,7 +29,7 @@ module.exports = configure(function (ctx) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp', 'antDesign','naiveUI'],
boot: ['i18n', 'axios', 'dict', 'permission', 'globalcmp','naiveUI'],
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css: ['app.scss','svg.scss'],
......
......@@ -10,6 +10,6 @@ export default defineComponent({
</script>
<style lang="sass">
@import url('./css/font.sass')
@import url('//at.alicdn.com/t/font_2930340_5n2w0eo4056.css')
@import url('//at.alicdn.com/t/font_2930340_at4xv6vjdh.css')
@import url('./css/table.sass')
</style>
import { boot } from 'quasar/wrappers'
import Antd from 'ant-design-vue'
// import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'ant-design-vue/dist/antd.css'
export default boot(({ app }) => {
// Set Antd instance on app
app.use(Antd)
// app.use(ElementPlus)
})
import { boot } from 'quasar/wrappers'
import naive from 'naive-ui'
export default boot(({ app }) => {
// Set naive instance on app
app.use(naive)
......
......@@ -8,16 +8,16 @@
<q-input v-model="msg.Remark" maxlength="1000" type="textarea" placeholder="请填写跟进记录" />
<div class="file_box">
<div class="img_list">
<div v-for="(e,i) in msg.ImageList" :key="i" class="img_box">
<div v-for="(e, i) in msg.ImageList" :key="i" class="img_box">
<img :src="e" class="img" />
<q-icon name="cancel" color="primary" class="del_icon" @click="delImg(i)"/>
<q-icon name="cancel" color="primary" class="del_icon" @click="delImg(i)" />
</div>
</div>
<div class="file_list">
<div v-for="(e,i) in msg.FileList" :key="i" class="flex items-center file_box">
<div v-for="(e, i) in msg.FileList" :key="i" class="flex items-center file_box">
<div class="flex items-center">
附件:
<span style="color:#333">{{ e.FileName }}</span>
<span style="color: #333">{{ e.FileName }}</span>
({{ e.size }})
</div>
<div class="del_btn" @click="delFile(i)">删除</div>
......@@ -25,40 +25,23 @@
</div>
</div>
<div class="file_Space">
<div style="display:flex;align-items:center;">
<div style="display: flex; align-items: center">
<div>
<a-upload
accept="image/*"
v-model:file-list="data.imageList"
name="file"
:multiple="true"
:show-upload-list="false"
:customRequest="customUploadImg"
>
<i style="font-size:25px;cursor:pointer;" class="iconfont icon-picture"></i>
</a-upload>
<n-upload accept="image/*" multiple :show-file-list="false" v-model:file-list="data.imageList"
:custom-request="customUploadImg">
<i style="font-size: 25px; cursor: pointer" class="iconfont icon-picture"></i>
</n-upload>
</div>
<div style="margin-left:8px;">
<a-upload
v-model:file-list="data.fileList"
name="file"
:multiple="true"
:show-upload-list="false"
:customRequest="customUploadFile"
>
<i style="font-size:20px;cursor:pointer;" class="iconfont icon-paperclip"></i>
</a-upload>
<div style="margin-left: 8px">
<n-upload accept="image/*" multiple :show-file-list="false" v-model:file-list="data.fileList"
:custom-request="customUploadFile">
<i style="font-size: 20px; cursor: pointer" class="iconfont icon-paperclip"></i>
</n-upload>
</div>
</div>
<div>
<q-btn
color="myInput"
text-color="#000"
size="sm"
@click="data.isShowEdit = false"
label="取消"
/>
<q-btn color="primary" style="margin-left:10px;" size="sm" @click="save" label="确定" />
<q-btn color="myInput" text-color="#000" size="sm" @click="data.isShowEdit = false" label="取消" />
<q-btn color="primary" style="margin-left: 10px" size="sm" @click="save" label="确定" />
</div>
</div>
</div>
......@@ -66,129 +49,145 @@
</div>
</template>
<script lang="ts">
import {
reactive,
inject
} from 'vue'
import customer2 from '@/api/customer2'
import massage from "@/utils/message"
import { UploadSelfFile } from '@/utils/upload'
interface dataParam {
[key: string]: any
}
export default {
setup(props,ctx) {
let msg = reactive<dataParam>({
import {
reactive,
inject
} from 'vue'
import customer2 from '@/api/customer2'
import massage from '@/utils/message'
import {
UploadSelfFile
} from '@/utils/upload'
interface dataParam {
[key: string]: any
}
export default {
setup(props, ctx) {
let msg = reactive < dataParam > ({
CustomerId: inject('CustomerId'),
Remark: "",
Remark: '',
ImageList: [],
FileList: []
})
const data = reactive<dataParam>({
isShowEdit: false,
fileList: [],
imageList: []
})
let customUploadImg = (file) => {
UploadSelfFile('/horse', file.file, (res) => {
msg.ImageList.push(res.FileUrl )
})
}
let customUploadFile = (file) => {
UploadSelfFile('/horse', file.file, (res) => {
msg.FileList.push({ FileName: res.FileName, FileUrl: res.FileUrl, size: res.Size })
})
}
const delImg=(i)=>{
msg.ImageList.splice(i,1)
}
const delFile=(i)=>{
msg.FileList.splice(i,1)
}
const save = () => {
customer2.setCustomerTripFollowUpInfo(msg).then((res)=>{
massage.successMsg(res.data.Message)
msg.Remark=""
msg.ImageList=[]
msg.FileList=[]
ctx.emit("success")
const data = reactive < dataParam > ({
isShowEdit: false,
fileList: [],
imageList: []
})
}
let customUploadImg = file => {
console.log(82,file)
UploadSelfFile('/horse', file.file.file, res => {
msg.ImageList.push(res.FileUrl)
})
}
let customUploadFile = file => {
UploadSelfFile('/horse', file.file.file, res => {
msg.FileList.push({
FileName: res.FileName,
FileUrl: res.FileUrl,
size: res.Size
})
})
}
const delImg = i => {
msg.ImageList.splice(i, 1)
}
const delFile = i => {
msg.FileList.splice(i, 1)
}
const save = () => {
customer2.setCustomerTripFollowUpInfo(msg).then(res => {
massage.successMsg(res.data.Message)
msg.Remark = ''
msg.ImageList = []
msg.FileList = []
ctx.emit('success')
})
}
return {
msg,
data,
customUploadImg,
customUploadFile,
delImg,
delFile,
UploadSelfFile,
save
return {
msg,
data,
customUploadImg,
customUploadFile,
delImg,
delFile,
UploadSelfFile,
save
}
}
}
}
</script>
<style lang="scss" scoped>
.editer_input {
padding: 5px 0;
}
.editer_input {
padding: 5px 0;
}
.myInput {
background-color: #f6f6f6 !important;
}
.file_box {
margin-top: 5px;
.img_list {
display: flex;
flex-wrap: wrap;
.img_box {
width: 40px;
height: 40px;
margin: 10px;
.myInput {
background-color: #f6f6f6 !important;
}
position: relative;
.img {
width: 100%;
height: 100%;
overflow: hidden;
object-fit: cover;
}
.del_icon {
font-size: 18px;
position: absolute;
top: 0;
right: 0;
transform: translate(50%, -50%);
.file_box {
margin-top: 5px;
.img_list {
display: flex;
flex-wrap: wrap;
.img_box {
width: 40px;
height: 40px;
margin: 10px;
position: relative;
.img {
width: 100%;
height: 100%;
overflow: hidden;
object-fit: cover;
}
.del_icon {
font-size: 18px;
position: absolute;
top: 0;
right: 0;
transform: translate(50%, -50%);
}
}
}
}
.file_list {
.file_box {
font-size: 14px;
color: #9696a6;
.del_btn {
margin-left: 10px;
padding-left: 5px;
border-left: 1px solid var(--q-primary);
color: var(--q-primary);
cursor: pointer;
.file_list {
.file_box {
font-size: 14px;
color: #9696a6;
.del_btn {
margin-left: 10px;
padding-left: 5px;
border-left: 1px solid var(--q-primary);
color: var(--q-primary);
cursor: pointer;
}
}
}
}
}
.file_Space {
display: flex;
justify-content: space-between;
margin-top: 10px;
align-items: center;
}
.q-field__control {
background-color: #f6f6f6 !important;
}
.file_Space {
display: flex;
justify-content: space-between;
margin-top: 10px;
align-items: center;
}
.q-field__control {
background-color: #f6f6f6 !important;
}
.q-field--filled .q-field__control:hover:before {
opacity: 0;
}
.q-field--filled .q-field__control:hover:before {
opacity: 0;
}
</style>
This diff is collapsed.
......@@ -99,22 +99,10 @@
<q-input filled v-model="msg.Q_NotFollowUpDay" label="几天未跟进"></q-input>
</div>
<div class="col-3">
<!-- <selectTree
:treeData="data.EmployeeList"
:defaultArray="data.defaultArray"
nodeKey="newId"
:multiple="false"
labelKey="DeptName"
childrenKey="ChildList"
tipText="选择部门/人员"
@getChild="getChild"
></selectTree>-->
<n-cascader v-model:value="data.CascaderValue" clearable placeholder="选择部门/人员" check-strategy="all"
value-field="newId" label-field="DeptName" size="large" :show-path="false" max-tag-count="responsive"
:options="data.EmployeeList" cascade children-field="ChildList"
@update:value="CascaderUpdateValue" />
<!-- <Cascader :options="data.EmployeeList" optionLabel="DeptName" optionValue="newId" optionChildren="ChildList"
label="选择部门/人员" :multiple="true" /> -->
</div>
<div class="col-3">
<q-btn color="primary" size="sm" label="导入" />
......@@ -160,14 +148,10 @@
onMounted
} from 'vue'
import CustomerModule from '@/module/customer/customerModule'
// import selectTree from '@/components/common/selectTree.vue'
import customRight from '@/components/common/customRight.vue'
// import Cascader from "@/components/common/Cascader.vue"
export default defineComponent({
components: {
// selectTree,
customRight,
// Cascader
},
setup() {
let {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment