|
@@ -212,8 +212,12 @@
|
|
|
<el-tab-pane label="数据统计" name="summary"><Summary ref="summary"></Summary></el-tab-pane>
|
|
|
|
|
|
</el-tabs>
|
|
|
+ <!-- 发布评论弹出层 -->
|
|
|
+
|
|
|
+ <!-- /发布评论弹出层 -->
|
|
|
+
|
|
|
<!--新增任务界面-->
|
|
|
- <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
|
|
|
+ <el-dialog class="jm" :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
|
|
|
<el-form ref="form1" :model="addForm" :rules="taskRules" label-width="100px">
|
|
|
<!--子任务需要选择任务列表 -->
|
|
|
<el-form-item label="任务列表" prop="stages" v-if="addForm.parentTid != null">
|
|
@@ -248,10 +252,13 @@
|
|
|
<el-option v-for="item in importanceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <!-- 富文本 -->
|
|
|
<el-form-item label="详细描述" >
|
|
|
<!-- <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor> -->
|
|
|
- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input>
|
|
|
+ <!-- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input> -->
|
|
|
+ <quill-edito v-model="addForm.taskDesc"></quill-edito>
|
|
|
</el-form-item>
|
|
|
+ <!-- 富文本 -->
|
|
|
<div v-if="addForm.id != null">
|
|
|
<el-divider ></el-divider>
|
|
|
<p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">子任务</i>
|
|
@@ -294,6 +301,45 @@
|
|
|
<!-- <el-link @click="backToParentTask"><i class="el-icon-arrow-left single_line">返回父级任务</i> | {{addForm.parentTname}}</el-link> -->
|
|
|
<el-page-header @back="backToParentTask" title="返回父任务" :content="addForm.parentTname"></el-page-header>
|
|
|
</div>
|
|
|
+ <!-- 评论 -->
|
|
|
+ <div class="remark">
|
|
|
+ <div class="player">
|
|
|
+ <p>评论</p>
|
|
|
+ <div class="bj">
|
|
|
+ <el-image style="width: 50px; height: 50px" :src="url" :fit="fit"></el-image>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="subject">
|
|
|
+ <div class="sub-all">所有动态</div>
|
|
|
+ <div class="sub-details" ref="main">
|
|
|
+ <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto" ref="contRoll">
|
|
|
+ <li v-for="i in count" class="infinite-list-item counli" :key="i">
|
|
|
+ <p><i class="el-icon-s-fold"></i> <em>屈经理完成了依赖任务</em><span>4月20日</span></p>
|
|
|
+ </li>
|
|
|
+ <li class="carts" v-for="item in commentList" :key="item.id">
|
|
|
+ <el-image style="width: 30px; height: 30px" :src="url" :fit="fit"></el-image>
|
|
|
+ <div>
|
|
|
+ <p>{{item.userName}}</p>
|
|
|
+ <em>{{item.content}}</em>
|
|
|
+ </div>
|
|
|
+ <span>{{item.createTime | relativeTime}}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="issue">
|
|
|
+ <!-- <el-input type="textarea" class="textareays" label-width="100%" label-height="140px"></el-input> -->
|
|
|
+ <el-input
|
|
|
+ class="issue-input"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ :autosize="{ minRows: 5, maxRows: 6}"
|
|
|
+ v-model.trim="textarea2">
|
|
|
+ </el-input>
|
|
|
+ <el-button class="issue-button" type="primary" @click="release()">发布</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 评论 -->
|
|
|
</el-dialog>
|
|
|
<!-- 子任务列表 -->
|
|
|
<el-dialog title="查看子任务" v-if="subTaskVisible" :visible.sync="subTaskVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
|
|
@@ -496,9 +542,19 @@ toolbar: 'bold italic underline strikethrough | fontsizeselect | forecolor backc
|
|
|
sleectId: null,
|
|
|
sleectProjectId: null,
|
|
|
sidebarIndex: null, // 侧边栏索引
|
|
|
+ url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
|
|
|
+ count: 0,
|
|
|
+ textarea2: '',
|
|
|
+ taskId: null,
|
|
|
+ commentList: []
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ load () {
|
|
|
+ if(this.count >= 6) return
|
|
|
+ this.count += 2
|
|
|
+ },
|
|
|
+
|
|
|
// 侧边栏的点击事件
|
|
|
retract() {
|
|
|
if (this.$refs.box.className == 'el-icon-arrow-left') {
|
|
@@ -822,12 +878,74 @@ toolbar: 'bold italic underline strikethrough | fontsizeselect | forecolor backc
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ // 点击卡片事件
|
|
|
editTask(task) {
|
|
|
+ console.log(task);
|
|
|
// this.addForm = JSON.parse(JSON.stringify(task));
|
|
|
this.addFormVisible = true;
|
|
|
this.addLoading = false;
|
|
|
this.title = "编辑任务";
|
|
|
this.getTaskDetail(task.id);
|
|
|
+ this.gain(task); // 获取评论列表
|
|
|
+ },
|
|
|
+ // 获取评论列表
|
|
|
+ gain (task) {
|
|
|
+ // this.http.get('/task-comment/getList', {params: {task: task.id}}),
|
|
|
+ // this.http.get('/task-comment/getList', task.id),
|
|
|
+ // this.http.get('/task-comment/getList', {task: task.id}),
|
|
|
+ this.taskId = task.id
|
|
|
+ this.http.post('/task-comment/getList', {taskId: task.id},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.commentList = res.data
|
|
|
+ // this.commentList.reverse()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 点击发布
|
|
|
+ release() {
|
|
|
+ if(this.textarea2.length <= 0) return this.$message({message: "请输入内容", type: "error"})
|
|
|
+ // console.log(this.taskId);
|
|
|
+ this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
|
|
|
+ res => {
|
|
|
+ if(res.code == "ok"){
|
|
|
+ this.commentList.push(res.data)
|
|
|
+ // this.commentList.reverse()
|
|
|
+ this.textarea2 = ""
|
|
|
+ this.contRoll() // 滚动到底部
|
|
|
+ // this.gain(this.taskId)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 滚动到底部
|
|
|
+ contRoll(){
|
|
|
+ console.log("滚动到底部");
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
|
|
|
+ })
|
|
|
},
|
|
|
getTaskDetail(id) {
|
|
|
this.http.post('/task/getTask',{id: id},
|
|
@@ -1566,4 +1684,123 @@ toolbar: 'bold italic underline strikethrough | fontsizeselect | forecolor backc
|
|
|
padding-left: 10px;
|
|
|
padding-right: 5px;
|
|
|
}
|
|
|
+
|
|
|
+/* 评论部分 */
|
|
|
+.remark {
|
|
|
+ width: 500px;
|
|
|
+ height: 100%;
|
|
|
+ background: #fff;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: -500px;
|
|
|
+ border-left: 3px solid #dddddd;
|
|
|
+}
|
|
|
+.jm {
|
|
|
+ margin-left: -500px;
|
|
|
+}
|
|
|
+
|
|
|
+.bj {
|
|
|
+ float: left;
|
|
|
+ width: 90%;
|
|
|
+ overflow: hidden;
|
|
|
+ height: 50px;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
+.player {
|
|
|
+ height: 15%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-left: 15px;
|
|
|
+ border-bottom: 1px solid #dddddd;
|
|
|
+}
|
|
|
+.player p {
|
|
|
+ margin: 0;
|
|
|
+ padding: 2% 0;
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+.player .el-image {
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+.subject {
|
|
|
+ height: 60%;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+.sub-all {
|
|
|
+ font-size: 20px;
|
|
|
+ padding: 15px 0 15px 15px;
|
|
|
+}
|
|
|
+.sub-details {
|
|
|
+ width: 100%;
|
|
|
+ height: 87%;
|
|
|
+ padding-right: 15px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow: hidden;
|
|
|
+ overflow-y: scroll
|
|
|
+}
|
|
|
+.sub-details li {
|
|
|
+ list-style:none
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.counli {
|
|
|
+ em {
|
|
|
+ font-style: normal;
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 9%;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+}
|
|
|
+.carts {
|
|
|
+ position: relative;
|
|
|
+ .el-image{
|
|
|
+ border-radius: 50%;
|
|
|
+ float: left;
|
|
|
+ width: 20%;
|
|
|
+ }
|
|
|
+ div {
|
|
|
+ text-align: left;
|
|
|
+ p {
|
|
|
+ text-align: left;
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-left: 13%;
|
|
|
+ }
|
|
|
+ em {
|
|
|
+ display: block;
|
|
|
+ font-style: normal;
|
|
|
+ margin-left: 13%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ font-size: 10px;
|
|
|
+ float: right;
|
|
|
+ margin-top: -40px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.issue {
|
|
|
+ height: 20%;
|
|
|
+ position: relative;
|
|
|
+ .textareays {
|
|
|
+ background: #000;
|
|
|
+ height: 140px;
|
|
|
+ border: 0;
|
|
|
+ .el-textarea__inner {
|
|
|
+ height: 85%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .issue-button {
|
|
|
+ // position: fixd;
|
|
|
+ // bottom: 0px;
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+}
|
|
|
+.issue-input {
|
|
|
+ // height: 140px;
|
|
|
+ /deep/ .el-textarea__inner {
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|