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

1

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