tangning 1 year ago
parent
commit
0698163757
1 changed files with 13 additions and 5 deletions
  1. 13 5
      src/app/mirror/App.vue

+ 13 - 5
src/app/mirror/App.vue

@@ -31,6 +31,7 @@
       <el-input
       <el-input
         class="title"
         class="title"
         type="textarea"
         type="textarea"
+        maxlength="100"
         :autosize="{ minRows: 1, maxRows: 4 }"
         :autosize="{ minRows: 1, maxRows: 4 }"
         v-model="project.title"
         v-model="project.title"
       />
       />
@@ -60,6 +61,7 @@
               :autosize="{ minRows: 3 }"
               :autosize="{ minRows: 3 }"
               v-model="row.name"
               v-model="row.name"
               :row="3"
               :row="3"
+              maxlength="1000"
               placeholder="概括拍摄内容"
               placeholder="概括拍摄内容"
             />
             />
           </template>
           </template>
@@ -71,6 +73,7 @@
               class="gray"
               class="gray"
               type="textarea"
               type="textarea"
               :autosize="{ minRows: 3 }"
               :autosize="{ minRows: 3 }"
+              maxlength="1000"
               v-model="row.desc"
               v-model="row.desc"
               :row="3"
               :row="3"
               placeholder="详细描述分镜"
               placeholder="详细描述分镜"
@@ -132,6 +135,7 @@
           <template v-slot="{ row }">
           <template v-slot="{ row }">
             <el-input
             <el-input
               class="gray"
               class="gray"
+              maxlength="1000"
               type="textarea"
               type="textarea"
               :autosize="{ minRows: 3 }"
               :autosize="{ minRows: 3 }"
               v-model="row.words"
               v-model="row.words"
@@ -145,6 +149,7 @@
             <div class="marksDiv">
             <div class="marksDiv">
               <el-input
               <el-input
                 class="gray"
                 class="gray"
+                  maxlength="1000"
                 type="textarea"
                 type="textarea"
                 :autosize="{ minRows: 3 }"
                 :autosize="{ minRows: 3 }"
                 v-model="row.marks"
                 v-model="row.marks"
@@ -197,7 +202,7 @@ link.setAttribute("href", linkIco);
 
 
 const caseId = ref(null);
 const caseId = ref(null);
 const project = reactive({
 const project = reactive({
-  title: "",
+  title: '我的脚本',
 });
 });
 const DrawFormats = [".jpg", ".jpeg", ".png",".mp4",".m4v",".mp3",".aac", ".wav"]
 const DrawFormats = [".jpg", ".jpeg", ".png",".mp4",".m4v",".mp3",".aac", ".wav"]
 const isNotFound = ref(false);
 const isNotFound = ref(false);
@@ -315,9 +320,9 @@ onMounted(async () => {
 function getCaseScriptList() {
 function getCaseScriptList() {
   getCaseScriptInfo(caseId.value)
   getCaseScriptInfo(caseId.value)
     .then((res) => {
     .then((res) => {
-      project.title = res.name || '我的脚本';
-      data.list = res.content || [];
-      data.newSortList = res.content || [];
+      project.title = res && res.name || '我的脚本';
+      data.list = res && res.content || [];
+      data.newSortList = res && res.content || [];
       const idList = data.list.map((ele) => ele.id);
       const idList = data.list.map((ele) => ele.id);
       active.value = idList.length == 0 ? 0 : Math.max.apply(null, idList) || 1;
       active.value = idList.length == 0 ? 0 : Math.max.apply(null, idList) || 1;
       sortList.value = data.list.map((_, index) => index);
       sortList.value = data.list.map((_, index) => index);
@@ -341,7 +346,10 @@ function handleAdd() {
   // let content = sortList.value.map((index) => data.list[index]);
   // let content = sortList.value.map((index) => data.list[index]);
   // data.list.length = 0;
   // data.list.length = 0;
   // Object.assign(data.list, content);
   // Object.assign(data.list, content);
-  console.log("add", data.newSortList);
+  console.log("add", data.list, data.newSortList);
+  if(data.newSortList.length == 0){
+
+  }
   for (var i = 1; i <= addLine.value; i++) {
   for (var i = 1; i <= addLine.value; i++) {
     console.log(i);
     console.log(i);
     data.newSortList.push({
     data.newSortList.push({