|
|
@@ -61,8 +61,35 @@
|
|
|
</td>
|
|
|
<td class="operationStyle">
|
|
|
<span @click="toggleModal">编辑</span>
|
|
|
- <!-- <span @click="del(index)">删除</span> -->
|
|
|
- <span @click="toggleModal2">删除</span>
|
|
|
+ <!-- <span @click="toDel(index)">删除</span> -->
|
|
|
+ <span
|
|
|
+ @click="
|
|
|
+ toggleModal2();
|
|
|
+ getIndex(index);nowIndex=index
|
|
|
+ "
|
|
|
+ >删除</span
|
|
|
+ >
|
|
|
+ <!-- <Modal2
|
|
|
+ v-show="showModal2"
|
|
|
+ v-on:closeme2="closeme2"
|
|
|
+ v-on:del="toDel2"
|
|
|
+ :itemIndex="index"
|
|
|
+ ></Modal2> -->
|
|
|
+ <div class="modal-backdrop" v-show="showModal2">
|
|
|
+ <div class="modal">
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="bodyRow">确认删除?</div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn-confirm" @click="toDel(nowIndex);closeme2()">
|
|
|
+ 确认
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn-close" @click="closeme2">
|
|
|
+ 取消
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
@@ -74,22 +101,20 @@
|
|
|
:dataset_title="tableData.articleTitle"
|
|
|
@update="editTitle"
|
|
|
></Modal>
|
|
|
+ <div class="timeLimitStyle">
|
|
|
+ <span>仅可对上传时间为{{ feedbackTimeLimit }}个月内的资料进行反馈</span>
|
|
|
+ </div>
|
|
|
<div class="fileOperation">
|
|
|
<span class="operationStyle">导入模板</span>
|
|
|
<button>导入</button>
|
|
|
<button>导出</button>
|
|
|
</div>
|
|
|
- <Modal2
|
|
|
- v-show="showModal2"
|
|
|
- v-on:closeme2="closeme2"
|
|
|
- v-on:del="del"
|
|
|
- ></Modal2>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Modal from "../../components/Modal";
|
|
|
-import Modal2 from "../../components/Modal2";
|
|
|
+/* import Modal2 from "../../components/Modal2"; */
|
|
|
export default {
|
|
|
props: {
|
|
|
isManufacturer: {
|
|
|
@@ -99,12 +124,14 @@ export default {
|
|
|
},
|
|
|
components: {
|
|
|
Modal,
|
|
|
- Modal2,
|
|
|
+ /* Modal2, */
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ feedbackTimeLimit: 6,
|
|
|
showModal: false,
|
|
|
showModal2: false,
|
|
|
+ sonConsfirmFlag: false,
|
|
|
// 表格配置
|
|
|
sum: 240, // 一共有多少条数据
|
|
|
pageSize: 20, // 每页展示的数据
|
|
|
@@ -223,12 +250,12 @@ export default {
|
|
|
toggleModal2: function () {
|
|
|
this.showModal2 = !this.showModal2;
|
|
|
},
|
|
|
- closeme2: function () {
|
|
|
+ closeme2: function () {
|
|
|
this.showModal2 = !this.showModal2;
|
|
|
},
|
|
|
editTitle: function (val) {
|
|
|
this.dataset_title = new Array(val);
|
|
|
- console.log("Link:", this.dataset_title);
|
|
|
+ console.log("inEditTitle:", this.dataset_title);
|
|
|
},
|
|
|
/* add: function () {
|
|
|
this.myData.push({
|
|
|
@@ -237,20 +264,30 @@ export default {
|
|
|
});
|
|
|
(this.username = ""), (this.age = "");
|
|
|
}, */
|
|
|
- del: function (n) {
|
|
|
- this.showModal2 = !this.showModal2;
|
|
|
- //清空数据
|
|
|
- if (n == -2) {
|
|
|
- this.tableData = "";
|
|
|
- }
|
|
|
- //清空某一项数据
|
|
|
- {
|
|
|
- let obj = this.tableData[n];
|
|
|
- console.log(obj);
|
|
|
- Object.keys(obj).forEach((key) => {
|
|
|
- obj[key] = "";
|
|
|
- });
|
|
|
- }
|
|
|
+ toDel: function (n) {
|
|
|
+ console.log("inToDel:", n, this.sonConsfirmFlag);
|
|
|
+ // if (this.sonConsfirmFlag) {
|
|
|
+ //清空数据
|
|
|
+ if (n == -2) {
|
|
|
+ this.tableData = "";
|
|
|
+ }
|
|
|
+ //清空某一项数据
|
|
|
+ {
|
|
|
+ let obj = this.tableData[n];
|
|
|
+ console.log(obj);
|
|
|
+ Object.keys(obj).forEach((key) => {
|
|
|
+ obj[key] = "";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // }
|
|
|
+ // this.sonConsfirmFlag = false;
|
|
|
+ },
|
|
|
+ /* toDel2: function (flag) {
|
|
|
+ this.sonConsfirmFlag = flag;
|
|
|
+ console.log("inToDel2:", this.sonConsfirmFlag);
|
|
|
+ }, */
|
|
|
+ getIndex: function (index) {
|
|
|
+ console.log("inGetIndex", index);
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
@@ -364,4 +401,67 @@ export default {
|
|
|
margin: 10px;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+.timeLimitStyle {
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.modal-backdrop {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ background-color: rgba(0, 0, 0, 0.3);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.modal {
|
|
|
+ background-color: #eeeeee;
|
|
|
+ box-shadow: 2px 2px 20px 1px;
|
|
|
+ overflow-x: auto;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ border-radius: 16px;
|
|
|
+ width: 1030px;
|
|
|
+}
|
|
|
+.modal-header {
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ color: #313131;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 15px;
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.modal-footer {
|
|
|
+ border-top: 1px solid #eee;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 15px;
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.modal-body {
|
|
|
+ position: relative;
|
|
|
+ padding: 20px 150px 20px 150px;
|
|
|
+}
|
|
|
+.btn-close,
|
|
|
+.btn-confirm {
|
|
|
+ border-radius: 8px;
|
|
|
+ margin-left: 16px;
|
|
|
+ width: 56px;
|
|
|
+ height: 36px;
|
|
|
+ border: none;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.btn-close {
|
|
|
+ color: #313131;
|
|
|
+ background-color: gray;
|
|
|
+}
|
|
|
+.btn-confirm {
|
|
|
+ color: #fff;
|
|
|
+ background-color: #2d8cf0;
|
|
|
+}
|
|
|
+.bodyRow {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
</style>
|