|
@@ -65,7 +65,10 @@
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
</view>
|
|
</view>
|
|
</uni-forms>
|
|
</uni-forms>
|
|
- <view class="btn-add" @click="addFormData">+ 新增</view>
|
|
|
|
|
|
+ <view class="btn-row">
|
|
|
|
+ <view class="btn-add" @click="addFormData">+ 新增</view>
|
|
|
|
+ <view class="btn-add" @click="deleteLog">删除</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="button" @click="submit">提 交</view>
|
|
<view class="button" @click="submit">提 交</view>
|
|
</view>
|
|
</view>
|
|
@@ -73,7 +76,11 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { createDaily } from "@/services/daily";
|
|
|
|
|
|
+import {
|
|
|
|
+ createDaily,
|
|
|
|
+ approvalLogDaily,
|
|
|
|
+ approvalDelLog,
|
|
|
|
+} from "@/services/daily";
|
|
import { mapState } from "vuex";
|
|
import { mapState } from "vuex";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -105,7 +112,7 @@ export default {
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
if (options.id) {
|
|
if (options.id) {
|
|
- this.initDate();
|
|
|
|
|
|
+ this.initDate(options.id);
|
|
}
|
|
}
|
|
this.log_id = options.id;
|
|
this.log_id = options.id;
|
|
},
|
|
},
|
|
@@ -146,7 +153,46 @@ export default {
|
|
uni.navigateBack();
|
|
uni.navigateBack();
|
|
}, 1800);
|
|
}, 1800);
|
|
},
|
|
},
|
|
- async initDate() {},
|
|
|
|
|
|
+ async initDate(id) {
|
|
|
|
+ this.formData = [
|
|
|
|
+ {
|
|
|
|
+ project_name: "11111",
|
|
|
|
+ code_id: "11111",
|
|
|
|
+ title: "11111",
|
|
|
|
+ content: "11111",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ project_name: "3333",
|
|
|
|
+ code_id: "22222",
|
|
|
|
+ title: "22222",
|
|
|
|
+ content: "22222",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ project_name: "45",
|
|
|
|
+ code_id: "111511",
|
|
|
|
+ title: "111161",
|
|
|
|
+ content: "111811",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ project_name: "110111",
|
|
|
|
+ code_id: "111911",
|
|
|
|
+ title: "111119",
|
|
|
|
+ content: "119111",
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ // const res = await approvalLogDaily({ id });
|
|
|
|
+ // console.log(res);
|
|
|
|
+ },
|
|
|
|
+ async deleteLog() {
|
|
|
|
+ await approvalDelLog(this.log_id);
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "删除成功",
|
|
|
|
+ });
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ uni.hideToast();
|
|
|
|
+ uni.navigateBack();
|
|
|
|
+ }, 1800);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -231,6 +277,10 @@ export default {
|
|
line-height: 100rpx;
|
|
line-height: 100rpx;
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
+.btn-row {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+}
|
|
.btn-add {
|
|
.btn-add {
|
|
width: 140rpx;
|
|
width: 140rpx;
|
|
height: 50rpx;
|
|
height: 50rpx;
|