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