This commit is contained in:
yuping
2022-12-15 03:02:19 +08:00
parent 7091f153c8
commit bac238d801

View File

@@ -133,11 +133,10 @@
<div class="join"> <div class="join">
<el-input <el-input
v-model="textarea1" v-model="sbValue.content"
:autosize="{ minRows: 12.5, maxRows: 12.5 }" :autosize="{ minRows: 12.5, maxRows: 12.5 }"
resize="none" resize="none"
type="textarea" type="textarea"
@input="textareaInput"
/> />
</div> </div>
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
@@ -262,10 +261,10 @@ import { useRoute } from "vue-router/dist/vue-router";
const fileList = ref([]); const fileList = ref([]);
const uploadRef = ref(); const uploadRef = ref();
const showFileList = ref(0); const showFileList = ref(0);
const state = reactive({ const sbValue = ref({
textarea1: "", content: '',
}); attach: ''
const { textarea1 } = toRefs(state); })
const router = useRouter(); const router = useRouter();
const { const {
@@ -276,18 +275,18 @@ const { data } = useRequest(TASK_WORK_DETAIL, { workId, taskId });
const {data: submitList} = useRequest(TASK_WORK_SUBMIT_LIST, {workId}); const {data: submitList} = useRequest(TASK_WORK_SUBMIT_LIST, {workId});
const handleClick = () => { const handleClick = () => {
console.log(sbValue.value)
console.log(fileList)
request(TASK_WORK_COMMIT, { request(TASK_WORK_COMMIT, {
projectOrRouterLogo: type, projectOrRouterLogo: type,
workUploadContent: textarea1.value, workUploadContent: sbValue.value.content,
workUploadAddress: fileList.value.map(e => e.url).join(',') || '',
workId, workId,
taskId, taskId,
}).then((res) => { }).then((res) => {
submitList.value.unshift(res.data); submitList.value.unshift(res.data);
}); });
textarea1.value = ""; sbValue.value.content = "";
};
const textareaInput = (e) => {
state.textarea1 = e;
}; };
function remove(i) { function remove(i) {